...one of the most highly
regarded and expertly designed C++ library projects in the
world. — Herb Sutter and Andrei
provides optional standardized floating-point
typedefs having specified
widths. These are useful for writing portable code because they
should behave identically on all platforms. These
are the floating-point analog of specified-width integers in
typedefs are based on N3626
proposed for a new C++14 standard header
proposed for a new C language standard header
typedefs are in
(would be in namespace
if eventually standardized).
float16_t, float32_t, float64_t, float80_t, float128_t, their corresponding least and
fast types, and the corresponding maximum-width type. The
are based on underlying built-in types such as
double, or the proposed N2016
short float type, or based on other compiler-specific non-standardized
types such as
underlying types of these
must conform with the corresponding specifications of binary16, binary32, binary64,
and binary128 in IEEE_floating_point
floating-point format, and
The 128-bit floating-point type (of great interest in scientific and numeric programming) is not required in the Boost header, and may not be supplied for all platforms/compilers, because compiler support for a 128-bit floating-point type is not mandated by either the C standard or the C++ standard.
If 128-bit floating-point is supported, then including
a native 128-bit type, and includes other
headers in folder
that provide C++ quad support for C
math functions in
<complex>, and the available floating-point types.
One can also, more robustly, include
this provides a thin wrapper selecting the appropriate 128-bit native type
cstdfloat if available,
or else a 128-bit multiprecision type.
See Jahnke-Emden-Lambda function
example for an example using both a
function and a Boost.Math function to evaluate a moderately interesting function,
function and normal
distribution as an example of a statistical distribution from Boost.Math.