Multiprecision Support¶
Some O₂scl classes support floating-point types beyond
double
. Generally, these classes support both long double
and
the boost::multiprecision
types. (Though some of the boost
multiprecision types require additional libraries, such as GMP.)
In some cases, O₂scl classes use adaptive multiprecision, i.e.,
the are able to choose among several different floating point
types to perform a calculation to a specified accuracy.
See also Multiprecision Support for Particles and EOSs.
Unfortunately, the multiprecision support also dramatically increases the compilation time and the associated memory requirements.
List of classes which support adaptive multiprecision:
Function evaluation: funct_multip_tl
Numerical differentiation: deriv_gsl
Root-finding: root_brent_gsl
Integration: inte_kronrod_boost, inte_double_exp_boost. inte_gauss_cern, and inte_adapt_cern_tl.
List of classes which support multiprecision types:
Numerical differentiation: deriv_gsl
Function approximation: cheb_approx_tl
Root-finding: root_brent_gsl and root_toms748
String to and from floating-point conversions:
o2scl::dtos()
,o2scl::function_to_fp()
, ando2scl::function_to_fp_nothrow()
.Polynomial solving: quadratic_real_coeff_gsl2, quadratic_complex_std, cubic_real_coeff_cern, cubic_real_coeff_gsl2 and cubic_complex_std.
Mathematical expression evaluation calc_utf8
Constant library find_constants
Integration: inte_gauss56_cern.
Many of the vector and matrix functions in Arrays, Vectors, Matrices, and Tensors section also support multiprecision.
Multiprecision function typedefs¶
-
typedef std::function<long double(long double)> o2scl::funct_ld
One-dimensional long double function in src/base/funct_multip.h.
-
typedef std::function<cpp_dec_float_25(cpp_dec_float_25)> o2scl::funct_cdf25¶
One-dimensional Boost 25-digit function in src/base/funct_multip.h.
-
typedef std::function<mpfr_25(mpfr_25)> o2scl::funct_mpfr25¶
One-dimensional function typedef in src/base/funct.h.
This typedef is defined only if —enable-mpfr is selected when when O2scl is configured.