|
| T | exp_down (const T &x) |
| | A lower bound for the exponential of x.
|
| T | exp_up (const T &x) |
| | A upper bound for the exponential of x.
|
| T | log_down (const T &x) |
| | A lower bound for the natural logarithm of x.
|
| T | log_up (const T &x) |
| | A upper bound for the natural logarithm of x.
|
| T | sin_down (const T &x) |
| | A lower bound for the sine of x.
|
| T | sin_up (const T &x) |
| | A upper bound for the sine of x.
|
| T | cos_down (const T &x) |
| | A lower bound for the cosine of x.
|
| T | cos_up (const T &x) |
| | A upper bound for the cosine of x.
|
| T | tan_down (const T &x) |
| | A lower bound for the tangent of x.
|
| T | tan_up (const T &x) |
| | A upper bound for the tangent of x.
|
| T | asin_down (const T &x) |
| | A lower bound for the arcsine of x.
|
| T | asin_up (const T &x) |
| | A upper bound for the arcsine of x.
|
| T | acos_down (const T &x) |
| | A lower bound for the arccosine of x.
|
| T | acos_up (const T &x) |
| | A upper bound for the arccosine of x.
|
| T | atan_down (const T &x) |
| | A lower bound for the arctangent of x.
|
| T | atan_up (const T &x) |
| | A upper bound for the arctangent of x.
|
| T | sinh_down (const T &x) |
| | A lower bound for the hyperbolic sine of x.
|
| T | sinh_up (const T &x) |
| | A upper bound for the hyperbolic sine of x.
|
| T | cosh_down (const T &x) |
| | A lower bound for the hyperbolic cosine of x.
|
| T | cosh_up (const T &x) |
| | A upper bound for the hyperbolic cosine of x.
|
| T | tanh_down (const T &x) |
| | A lower bound for the hyperbolic tangent of x.
|
| T | tanh_up (const T &x) |
| | A upper bound for the hyperbolic tangent of x.
|
| T | asinh_down (const T &x) |
| | A lower bound for the inverse hyperbolic sine of x.
|
| T | asinh_up (const T &x) |
| | A upper bound for the inverse hyperbolic sine of x.
|
| T | acosh_down (const T &x) |
| | A lower bound for the inverse hyperbolic cosine of x.
|
| T | acosh_up (const T &x) |
| | A upper bound for the inverse hyperbolic cosine of x.
|
| T | atanh_down (const T &x) |
| | A lower bound for the inverse hyperbolic tangent of x.
|
| T | atanh_up (const T &x) |
| | A upper bound for the inverse hyperbolic tangent of x.
|
template<typename T>
struct sigma::detail_::rounded_transc_guarded< T >
Outward rounding for the transcendental functions.
Boost ships three transcendental rounding policies, and all three obtain a directed rounding by switching the FPU's rounding mode around a call to the platform's libm (rounded_transc_std, rounded_transc_opp) or by trusting libm to be exact (rounded_transc_exact). None of them is safe here, for two separate reasons:
- libm is not required to honor the rounding mode for the transcendental functions, and a libm that ignores it makes f_down(x) and f_up(x) return the same value. The interval then claims a degenerate enclosure for an inexact result, i.e., that log is exact – which is not merely loose, it excludes the true value.
- Worse, a libm that partially honors the mode is actively harmful. Its internal steps each round in the requested direction, so the accumulated error can carry the final result past the correctly rounded one and out the other side. Measured on macOS, atanh() evaluated in downward mode returns a value two ulps above the correctly rounded result, so the "lower bound" is not a lower bound at all.
This policy therefore never asks libm to round: every function is evaluated in to-nearest mode, which is the mode libm implementations are actually written and tested for, and the result is then widened outward by k_error_ulps_ ulps to cover libm's error. The arithmetic operators and sqrt() keep boost's hardware-directed rounding (rounded_arith_opp), which IEEE-754 does require to be correctly rounded, so they stay exactly as tight as they were.
Every function below is named with an explicit std::. Boost's own policies reach them through the BOOST_NUMERIC_INTERVAL_using_math and _using_ahyp macros, which expand to nothing on some platforms (MSVC among them); the call is then unqualified and finds sigma's overload for Interval rather than the scalar one.
- Template Parameters
-
| T | The floating point type being rounded. |