Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / math / doc / overview / result_type_calc.qbk
index da50d0e..9a98027 100644 (file)
@@ -1,4 +1,3 @@
-
 [section:result_type Calculation of the Type of the Result]
 
 The functions in this library are all overloaded to accept
@@ -58,7 +57,23 @@ returns a `float`, since the first argument is not a template argument and
 so doesn't effect the result: without this rule functions that take
 explicitly integer arguments could never return `float`.
 
-And for user-defined types, all of the following return an `NTL::RR` result:
+And for user-defined types, typically __multiprecision,
+
+All of the following return a `boost::multiprecision::cpp_bin_quad_float` result:
+
+   cyl_bessel_j(0, boost::multiprecision::cpp_bin_quad_float(2));
+
+   cyl_bessel_j(boost::multiprecision::cpp_bin_quad_float(2), 3);
+
+   cyl_bessel_j(boost::multiprecision::cpp_bin_quad_float(2), boost::multiprecision::cpp_bin_quad_float(3));
+
+but rely on the parameters provided being exactly representable, avoiding loss of precision from construction from `double`.
+
+[tip All new projects should use Boost.Multiprecision.] 
+
+During development of Boost.Math, __NTL was invaluable to create highly precise tables.
+
+All of the following return an `NTL::RR` result:
 
    cyl_bessel_j(0, NTL::RR(2));
 
@@ -70,12 +85,13 @@ In the last case, `quad_float` is convertible to `RR`, but not vice-versa, so
 the result will be an `NTL::RR`.  Note that this assumes that you are using
 a [link math_toolkit.high_precision.use_ntl patched NTL library].
 
+
 These rules are chosen to be compatible with the behaviour of
 ['ISO/IEC 9899:1999 Programming languages - C]
 and with the
 [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf Draft Technical Report on C++ Library Extensions, 2005-06-24, section 5.2.1, paragraph 5].
 
-[endsect]
+[endsect] [/section:result_type Calculation of the Type of the Result]
 
 [/
   Copyright 2006, 2012 John Maddock and Paul A. Bristow.