You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This function is very similar to https://en.cppreference.com/w/cpp/numeric/math/frexp[frexp], but returns the significand and an integral power of 10 since the `FLT_RADIX` of this type is 10.
460
460
The significand is normalized to the number of digits of precision the type has (e.g. for decimal32 it is [1'000'000, 9'999'999]).
461
+
462
+
=== trunc_to
463
+
464
+
[source, c++]
465
+
----
466
+
template <typename Decimal>
467
+
constexpr Decimal trunc_to(Decimal val, int precision = 0);
468
+
----
469
+
470
+
The function returns the decimal type with number of fractional digits equal to the value of precision.
471
+
`trunc_to` is similar to https://en.cppreference.com/w/cpp/numeric/math/trunc[trunc], and with the default precision argument of 0 it is identical.
- `BOOST_DECIMAL_FAST_MATH` performs optimizations similar to that of the `-ffast-math` compiler flag such as removing all checks for non-finite values.
30
+
This flag increases the performance of the basis operations (e.g. add, sub, mul, div, and comparisons) by up to 20%.
0 commit comments