#include <boost/math/special_functions/expm1.hpp>
namespace boost{ namespace math{ template <class T> calculated-result-type expm1(T x); template <class T, class Policy> calculated-result-type expm1(T x, const Policy&); }} // namespaces Returns ex - 1.
The return type of this function is computed using the result
type calculation rules: the return is
The final Policy argument is optional and can be used to control the behaviour of the function: how it handles errors, what level of precision to use etc. Refer to the policy documentation for more details.
For small x, then
Finally when BOOST_HAS_EXPM1 is defined then the The following graph illustrates the behaviour of expm1:
Accuracy
For built in floating point types TestingA mixture of spot test sanity checks, and random high precision test values calculated using NTL::RR at 1000-bit precision. |