diff --git a/config/Jamfile.v2 b/config/Jamfile.v2
index d5d2fee5..5fc023db 100644
--- a/config/Jamfile.v2
+++ b/config/Jamfile.v2
@@ -3,6 +3,13 @@
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt.
+# Several tests to check configuration of multiprecision configuration.
+# Note all are explicit, so much each or all be specified to actually check a specific configuration.
+# Examples:
+# \boost\libs\multiprecision\config>b2 toolset=clang-win-9.0.0 cxxstd=2a release address-model=64 has_float128 has_constexpr_limits has_is_constant_evaluated > MP_config_clangwin900.log
+# \boost\libs\multiprecision\config>b2 -a --debug-configuration toolset=gcc-8.1.0 cxxstd=2a release address-model=64 has_float128 has_constexpr_limits has_is_constant_evaluated >MP_config_gcc810.log
+# \boost\libs\multiprecision\config>b2 toolset=msvc-14.2 cxxstd=latest release address-model=64 has_float128 has_constexpr_limits has_is_constant_evaluated >MP_config_msvc142.log
+
import modules ;
import path ;
@@ -34,6 +41,7 @@ project : requirements
exp f infinity integer_modulus of overlap
Optional requirements have default implementations that are called if the
- backend doesn't provide it's own. Typically the backend will implement these
+ backend doesn't provide its own. Typically the backend will implement these
to improve performance.
diff --git a/doc/html/boost_multiprecision/ref/cpp_bin_float_ref.html b/doc/html/boost_multiprecision/ref/cpp_bin_float_ref.html
index 64ca0063..3e33d776 100644
--- a/doc/html/boost_multiprecision/ref/cpp_bin_float_ref.html
+++ b/doc/html/boost_multiprecision/ref/cpp_bin_float_ref.html
@@ -113,7 +113,7 @@
Internally, an N-bit
- Not a numbe rin it's own right, and hard to use as a result.
+ Not a number in its own right, and hard to use as a result.
It's also possible to access the underlying
Things you should know when using this type:
diff --git a/doc/html/boost_multiprecision/tut/conversions.html b/doc/html/boost_multiprecision/tut/conversions.html
index e7550090..b8c8b028 100644
--- a/doc/html/boost_multiprecision/tut/conversions.html
+++ b/doc/html/boost_multiprecision/tut/conversions.html
@@ -77,8 +77,10 @@
diff --git a/doc/html/boost_multiprecision/tut/floats.html b/doc/html/boost_multiprecision/tut/floats.html
index cd23879d..f89bb867 100644
--- a/doc/html/boost_multiprecision/tut/floats.html
+++ b/doc/html/boost_multiprecision/tut/floats.html
@@ -36,6 +36,8 @@
diff --git a/doc/html/boost_multiprecision/tut/floats/cpp_bin_float.html b/doc/html/boost_multiprecision/tut/floats/cpp_bin_float.html
index 75b2cd9f..3f6943c1 100644
--- a/doc/html/boost_multiprecision/tut/floats/cpp_bin_float.html
+++ b/doc/html/boost_multiprecision/tut/floats/cpp_bin_float.html
@@ -159,6 +159,7 @@
cpp_int
+ right shift operator when shifting negative values - semantics now gives
+ the same values as shifting 2's compliment integers, though not the same
+ bit pattern.
cpp_bin_float
is represented as an N-bit unsigned integer along with an exponent and a
- sign. The integer part is normalized so that it's most significant bit is
+ sign. The integer part is normalized so that its most significant bit is
always 1. The decimal point is assumed to be directly after the most significant
bit of the integer part. The special values zero, infinity and NaN all have
the integer part set to zero, and the exponent to one of 3 special values
diff --git a/doc/html/boost_multiprecision/tut.html b/doc/html/boost_multiprecision/tut.html
index 7c9151c9..40da2aaa 100644
--- a/doc/html/boost_multiprecision/tut.html
+++ b/doc/html/boost_multiprecision/tut.html
@@ -49,6 +49,8 @@
diff --git a/doc/html/boost_multiprecision/tut/complex/mpc_complex.html b/doc/html/boost_multiprecision/tut/complex/mpc_complex.html
index d2ca6dd1..9190cff7 100644
--- a/doc/html/boost_multiprecision/tut/complex/mpc_complex.html
+++ b/doc/html/boost_multiprecision/tut/complex/mpc_complex.html
@@ -89,7 +89,8 @@
mpc_t
- via the data() member function of mpfr_float_backend.
+ via the data()
+ member function of mpfr_float_backend.
#include <boost/multiprecision/cpp_bin_float.hpp>
#include <boost/math/special_functions/gamma.hpp>
+
#include <iostream>
int main()
@@ -169,14 +170,17 @@
cpp_bin_float_100 b = 2;
std::cout << std::numeric_limits<cpp_bin_float_100>::digits << std::endl;
std::cout << std::numeric_limits<cpp_bin_float_100>::digits10 << std::endl;
+
// We can use any C++ std lib function, lets print all the digits as well:
std::cout << std::setprecision(std::numeric_limits<cpp_bin_float_100>::max_digits10)
<< log(b) << std::endl; // print log(2)
+
// We can also use any function from Boost.Math:
std::cout << boost::math::tgamma(b) << std::endl;
// These even work when the argument is an expression template:
std::cout << boost::math::tgamma(b * b) << std::endl;
- // And since we have an extended exponent range we can generate some really large
+
+ // And since we have an extended exponent range we can generate some really large
// numbers here (4.0238726007709377354370243e+2564):
std::cout << boost::math::tgamma(cpp_bin_float_100(1000)) << std::endl;
return 0;
diff --git a/doc/html/boost_multiprecision/tut/floats/cpp_dec_float.html b/doc/html/boost_multiprecision/tut/floats/cpp_dec_float.html
index 4f7b80ce..086a425e 100644
--- a/doc/html/boost_multiprecision/tut/floats/cpp_dec_float.html
+++ b/doc/html/boost_multiprecision/tut/floats/cpp_dec_float.html
@@ -75,7 +75,7 @@
digit counts.
- There is full standard library and numeric_limits
+ There is full standard library and std::numeric_limits
support available for this type.
diff --git a/doc/html/boost_multiprecision/tut/floats/float128.html b/doc/html/boost_multiprecision/tut/floats/float128.html index 601d1bb2..68e0ddfa 100644 --- a/doc/html/boost_multiprecision/tut/floats/float128.html +++ b/doc/html/boost_multiprecision/tut/floats/float128.html @@ -46,7 +46,7 @@ with FORTRAN's 128-bit QUAD real.
- All the usual standard library and numeric_limits
+ All the usual standard library and std::numeric_limits
support are available, performance should be equivalent to the underlying
native types: for example the LINPACK benchmarks for GCC's float128
and boost::multiprecision::float128 both achieved 5.6 MFLOPS[3].
@@ -129,6 +129,18 @@
as the suffix 'Q' is a GNU extension. Compilation fails with the flag
--std=c++11/14/17 unless you also use -fext-numeric-literals.
+
libquadmath.dll
+ with the link command -lquadmath and ensure that the DLL
+ is visible by the linker. If you are using the B2/bjam build system
+ then commands<linkflags>-lQUADMATH
+ and <linkflags>-L"path/to/lib" will be needed.
+ std::numeric_limits<float128> and extremely close but
+ not identical to those from the equivalent precision and
+ range multiprecision types std::numeric_limits<cpp_bin_float_quad> and std::numeric_limits<cpp_dec_float_quad>.
+
+ The type float128 provides operations at 128-bit precision with Quadruple-precision
+ floating-point format and have full std::numeric_limits
+ support:
+
float128 b = 2; ++
+ There are 15 bits of (biased) binary exponent and 113-bits of significand + precision +
+std::cout << std::numeric_limits<float128>::digits << std::endl; ++
+ or 33 decimal places: +
+std::cout << std::numeric_limits<float128>::digits10 << std::endl; ++
+ We can use any C++ std library function, so let's show all the at-most + 36 potentially significant digits, and any trailing zeros, as well: +
+std::cout.setf(std::ios_base::showpoint); // Include any trailing zeros. +std::cout << std::setprecision(std::numeric_limits<float128>::max_digits10) + << log(b) << std::endl; // Shows log(2) = 0.693147180559945309417232121458176575 ++
+ We can also use any function from Boost.Math, for example, the 'true gamma'
+ function tgamma:
+
std::cout << boost::math::tgamma(b) << std::endl; ++
+ And since we have an extended exponent range, we can generate some really + large numbers here (4.02387260077093773543702433923004111e+2564): +
+std::cout << boost::math::tgamma(float128(1000)) << std::endl; ++
+ We can declare constants using GCC or Intel's native types, and literals
+ with the Q suffix, and these can be declared constexpr
+ if required:
+
constexpr float128 pi = 3.14159265358979323846264338327950Q; ++
+ Values for std::numeric_limits<float128>
+ are:
+
GCC 8.1.0 - // Operations at 128-bit precision and full numeric_limits support: - float128 b = 2; - // There are 113-bits of precision: - std::cout << std::numeric_limits<float128>::digits << std::endl; - // Or 34 decimal places: - std::cout << std::numeric_limits<float128>::digits10 << std::endl; - // We can use any C++ std lib function, lets print all the digits as well: - std::cout << std::setprecision(std::numeric_limits<float128>::max_digits10) - << log(b) << std::endl; // print log(2) = 0.693147180559945309417232121458176575 - // We can also use any function from Boost.Math: - std::cout << boost::math::tgamma(b) << std::endl; - // And since we have an extended exponent range we can generate some really large - // numbers here (4.02387260077093773543702433923004111e+2564): - std::cout << boost::math::tgamma(float128(1000)) << std::endl; - // - // We can declare constants using GCC or Intel's native types, and the Q suffix, - // these can be declared constexpr if required: - - constexpr float128 pi = 3.1415926535897932384626433832795028841971693993751058Q; - - return 0; -} +Type name is float128_t: +Type is g +std::is_fundamental<> = true +std::is_signed<> = true +std::is_unsigned<> = false +std::is_integral<> = false +std::is_arithmetic<> = true +std::is_const<> = false +std::is_trivial<> = true +std::is_standard_layout<> = true +std::is_pod<> = true +std::numeric_limits::<>is_exact = false +std::numeric_limits::<>is bounded = true +std::numeric_limits::<>is_modulo = false +std::numeric_limits::<>is_iec559 = true +std::numeric_limits::<>traps = false +std::numeric_limits::<>tinyness_before = false +std::numeric_limits::<>max() = 1.18973149535723176508575932662800702e+4932 +std::numeric_limits::<>min() = 3.36210314311209350626267781732175260e-4932 +std::numeric_limits::<>lowest() = -1.18973149535723176508575932662800702e+4932 +std::numeric_limits::<>min_exponent = -16381 +std::numeric_limits::<>max_exponent = 16384 +std::numeric_limits::<>epsilon() = 1.92592994438723585305597794258492732e-34 +std::numeric_limits::<>radix = 2 +std::numeric_limits::<>digits = 113 +std::numeric_limits::<>digits10 = 33 +std::numeric_limits::<>max_digits10 = 36 +std::numeric_limits::<>has denorm = true +std::numeric_limits::<>denorm min = 6.47517511943802511092443895822764655e-4966 +std::denorm_loss = false +limits::has_signaling_NaN == false +std::numeric_limits::<>quiet_NaN = nan +std::numeric_limits::<>infinity = inf