...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Since few compilers implement a true 128-bit floating-point, and language features
like the suffix Q, and C++ Standard library functions are as-yet missing or
incomplete in C++11, this Boost.Math implementation wraps __float128
provided by the GCC compiler or the _Quad
type provided by the Intel compiler.
This is provided to in order to demonstrate, and users to evaluate, the feasibility and benefits of higher-precision floating-point, especially to allow use of the full Boost.Math library of functions and distributions at high precision.
(It is also possible to use Boost.Math with Boost.Multiprecision decimal and binary, but since these are entirely software solutions, allowing much higher precision or arbitrary precision, they are likely to be slower).
We also provide (we believe full) support for <limits>, <cmath>
, I/O stream operations in <iostream>
, and <complex>
.
As a prototype for a future C++ standard, we place all these in namespace std
.
This contravenes the existing C++ standard of course, so selecting any compiler
that promises to check conformance will fail.
Tip | |
---|---|
For GCC, compile with |
The __float128
type is provided
by the libquadmath
library on GCC or by Intel's FORTRAN library with Intel C++.
A typical invocation of the compiler is
g++ -O3 -std=gnu++11 test.cpp -I/c/modular-boost -lquadmath -o test.exe
Tip | |
---|---|
If you are trying to use the develop branch of Boost.Math, then make |
g++ -O3 -std=gnu++11 test.cpp -I/c/modular-boost/libs/math/include -I/c/modular-boost -lquadmath -o test.exe
Note | |
---|---|
So far, the only missing detail that we have noted is in trying to use |