From e0737c56c1e384e05064a0c6e1ac46979371041b Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Wed, 19 Dec 2018 22:58:32 +0100 Subject: New upstream version 2.0.0+repack --- .../doc/html/math_toolkit/constants_intro.html | 131 +++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 boost/libs/math/doc/html/math_toolkit/constants_intro.html (limited to 'boost/libs/math/doc/html/math_toolkit/constants_intro.html') diff --git a/boost/libs/math/doc/html/math_toolkit/constants_intro.html b/boost/libs/math/doc/html/math_toolkit/constants_intro.html new file mode 100644 index 00000000..cd88c306 --- /dev/null +++ b/boost/libs/math/doc/html/math_toolkit/constants_intro.html @@ -0,0 +1,131 @@ + + + +Introduction + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +

+ Boost.Math provides a collection of mathematical constants. +

+
+ + Why + use Boost.Math mathematical constants? +
+
    +
  • +

    + Readable. For the very many jobs just using built-in like double, you can just write expressions like +

    +
    double area = pi * r * r;
    +

    + (If that's all you want, jump direct to use + in non-template code!) +

    +
  • +
  • + Effortless - avoiding a search of reference sources. +
  • +
  • + Usable with both builtin floating point types, and user-defined, possibly + extended precision, types such as NTL, MPFR/GMP, mp_float: in the latter + case the constants are computed to the necessary precision and then cached. +
  • +
  • + Accurate - ensuring that the values are as accurate as possible for the + chosen floating-point type +
      +
    • + No loss of accuracy from repeated rounding of intermediate computations. +
    • +
    • + Result is computed with higher precision and only rounded once. +
    • +
    • + Less risk of inaccurate result from functions pow, trig and log at + corner cases. +
    • +
    • + Less risk of cancellation + error. +
    • +
    +
  • +
  • + Portable - as possible between different systems using different floating-point + precisions: see use in template + code. +
  • +
  • + Tested - by comparison with other published sources, or separately computed + at long double precision. +
  • +
  • + Faster - can avoid (re-)calculation at runtime. +
      +
    • + If the value returned is a builtin type then it's returned by value + as a constexpr (C++11 + feature, if available). +
    • +
    • + If the value is computed and cached (or constructed from a string + representation and cached), then it's returned by constant reference.
      + This can be significant if: +
    • +
    • + Functions pow, trig or log are used. +
    • +
    • + Inside an inner loop. +
    • +
    • + Using a high-precision UDT like Boost.Multiprecision. +
    • +
    • + Compiler optimizations possible with built-in types, especially + double, are not available. +
    • +
    +
  • +
+
+ + + +
+
+
+PrevUpHomeNext +
+ + -- cgit v1.2.3