common_overviews.qbk 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. [/These are templates used in many other Quickbook files.]
  2. [template policy_overview[]
  3. Policies are a powerful fine-grain mechanism that allow you to customise the
  4. behaviour of this library according to your needs. There is more information
  5. available in the [link math_toolkit.pol_tutorial policy tutorial]
  6. and the [link math_toolkit.pol_ref policy reference].
  7. Generally speaking, unless you find that the
  8. [link math_toolkit.pol_tutorial.policy_tut_defaults
  9. default policy behaviour]
  10. when encountering 'bad' argument values does not meet your needs,
  11. you should not need to worry about policies.
  12. Policies are a compile-time mechanism that allow you to change
  13. error-handling or calculation precision either
  14. program wide, or at the call site.
  15. Although the policy mechanism itself is rather complicated,
  16. in practice it is easy to use, and very flexible.
  17. Using policies you can control:
  18. * [link math_toolkit.pol_ref.error_handling_policies How results from 'bad' arguments are handled],
  19. including those that cannot be fully evaluated.
  20. * How [link math_toolkit.pol_ref.internal_promotion accuracy is controlled by internal promotion] to use more precise types.
  21. * What working [link math_toolkit.pol_ref.precision_pol precision] should be used to calculate results.
  22. * What to do when a [link math_toolkit.pol_ref.assert_undefined mathematically undefined function]
  23. is used: Should this raise a run-time or compile-time error?
  24. * Whether [link math_toolkit.pol_ref.discrete_quant_ref discrete functions],
  25. like the binomial, should return real or only integral values, and how they are rounded.
  26. * How many iterations a special function is permitted to perform in
  27. a series evaluation or root finding algorithm before it gives up and raises an
  28. __evaluation_error.
  29. You can control policies:
  30. * Using [link math_toolkit.pol_ref.policy_defaults macros] to
  31. change any default policy: the is the preferred method for installation
  32. wide policies.
  33. * At your chosen [link math_toolkit.pol_ref.namespace_pol
  34. namespace scope] for distributions and/or functions: this is the
  35. preferred method for project, namespace, or translation unit scope
  36. policies.
  37. * In an ad-hoc manner [link math_toolkit.pol_tutorial.ad_hoc_sf_policies
  38. by passing a specific policy to a special function], or to a
  39. [link math_toolkit.pol_tutorial.ad_hoc_dist_policies
  40. statistical distribution].
  41. ] [/template policy_overview]
  42. [template performance_overview[]
  43. By and large the performance of this library should be acceptable
  44. for most needs. However, often the library has to make a choice whether to
  45. be accurate or fast and by default it chooses accuracy over speed. If
  46. you would rather have fast rather than fully accurate routines, then
  47. refer to the [link perf performance section] for information and examples on how to
  48. achieve this.
  49. In terms of the algorithms used, this library aims to use the same "best
  50. of breed" algorithms as many other libraries: the principle difference
  51. is that this library is implemented in C++ - taking advantage of all
  52. the abstraction mechanisms that C++ offers - where as most traditional
  53. numeric libraries are implemented in C or FORTRAN. Traditionally
  54. languages such as C or FORTRAN are perceived as easier to optimise
  55. than more complex languages like C++, so in a sense this library
  56. provides a good test of current compiler technology, and the
  57. "abstraction penalty" - if any - of C++ compared to other languages.
  58. The three most important things you can do to ensure the best performance
  59. from this library are:
  60. # Turn on your compilers optimisations: the difference between "release"
  61. and "debug" builds can easily be a [link math_toolkit.getting_best factor of 20].
  62. # Pick your compiler carefully: [link math_toolkit.comp_compilers
  63. performance differences of up to
  64. 8 fold] have been found between some Windows compilers for example.
  65. # Disable internal use of `long double`, this will reduce accuracy but
  66. typically yield a 2x speedup on modern x64 hardware/compilers.
  67. The [link perf performance section] contains more
  68. information on the performance
  69. of this library, what you can do to fine tune it, and how this library
  70. compares to some other open source alternatives.
  71. ] [/template performance_overview]
  72. [template compilers_overview[]
  73. This section contains some information about how various compilers
  74. work with this library.
  75. It is not comprehensive and updated experiences are always welcome.
  76. Some effort has been made to suppress unhelpful warnings but it is
  77. difficult to achieve this on all systems.
  78. [table Supported/Tested Compilers
  79. [[Platform][Compiler][Has long double support][Notes]]
  80. [[Windows][MSVC 7.1 and later][Yes]
  81. [All tests OK.
  82. We aim to keep our headers warning free at level 4 with
  83. this compiler.]]
  84. [[Windows][Intel 8.1 and later][Yes]
  85. [All tests OK.
  86. We aim to keep our headers warning free at level 4 with
  87. this compiler. However, The tests cases tend to generate a lot of
  88. warnings relating to numeric underflow of the test data: these are
  89. harmless.]]
  90. [[Windows][GNU Mingw32 C++][Yes]
  91. [All tests OK.
  92. We aim to keep our headers warning free with -Wall with this compiler.]]
  93. [[Windows][GNU Cygwin C++][No]
  94. [All tests OK.
  95. We aim to keep our headers warning free with -Wall with this compiler.
  96. Long double support has been disabled because there are no native
  97. long double C std library functions available.]]
  98. [[Windows][Borland C++ 5.8.2 (Developer studio 2006)][No]
  99. [We have only partial compatibility with this compiler:
  100. Long double support has been disabled because the native
  101. long double C standard library functions really only forward to the
  102. double versions. This can result in unpredictable behaviour when
  103. using the long double overloads: for example `sqrtl` applied to a
  104. finite value, can result in an infinite result.
  105. Some functions still fail to compile, there are no known workarounds at present.]]
  106. [[Windows 7/Netbeans 7.2][Clang 3.1][Yes][Spot examples OK. Expect all tests to compile and run OK.]]
  107. [[Linux][GNU C++ 3.4 and later][Yes]
  108. [All tests OK.
  109. We aim to keep our headers warning free with -Wall with this compiler.]]
  110. [[Linux][Clang 3.2][Yes][All tests OK.]]
  111. [[Linux][Intel C++ 10.0 and later][Yes]
  112. [All tests OK.
  113. We aim to keep our headers warning free with -Wall with this compiler.
  114. However, The tests cases tend to generate a lot of
  115. warnings relating to numeric underflow of the test data: these are
  116. harmless.]]
  117. [[Linux][Intel C++ 8.1 and 9.1][No]
  118. [All tests OK.
  119. Long double support has been disabled with these compiler releases
  120. because calling the standard library long double math functions
  121. can result in a segfault. The issue is Linux distribution and
  122. glibc version specific and is Intel bug report #409291. Fully up to date
  123. releases of Intel 9.1 (post version l_cc_c_9.1.046)
  124. shouldn't have this problem. If you need long
  125. double support with this compiler, then comment out the define of
  126. BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS at line 55 of
  127. [@../../../../boost/math/tools/config.hpp boost/math/tools/config.hpp].
  128. We aim to keep our headers warning free with -Wall with this compiler.
  129. However, The tests cases tend to generate a lot of
  130. warnings relating to numeric underflow of the test data: these are
  131. harmless.]]
  132. [[Linux][QLogic PathScale 3.0][Yes]
  133. [Some tests involving conceptual checks fail to build, otherwise
  134. there appear to be no issues.]]
  135. [[Linux][Sun Studio 12][Yes]
  136. [Some tests involving function overload resolution fail to build,
  137. these issues should be rarely encountered in practice.]]
  138. [[Solaris][Sun Studio 12][Yes]
  139. [Some tests involving function overload resolution fail to build,
  140. these issues should be rarely encountered in practice.]]
  141. [[Solaris][GNU C++ 4.x][Yes]
  142. [All tests OK.
  143. We aim to keep our headers warning free with -Wall with this compiler.]]
  144. [[HP Tru64][Compaq C++ 7.1][Yes]
  145. [All tests OK.]]
  146. [[HP-UX Itanium][HP aCC 6.x][Yes]
  147. [All tests OK.
  148. Unfortunately this compiler emits quite a few warnings from libraries
  149. upon which we depend (TR1, Array etc).]]
  150. [[HP-UX PA-RISC][GNU C++ 3.4][No]
  151. [All tests OK.]]
  152. [[Apple Mac OS X, Intel][Darwin/GNU C++ 4.x][Yes][All tests OK.]]
  153. [[Apple Mac OS X, PowerPC][Darwin/GNU C++ 4.x][No]
  154. [All tests OK.
  155. Long double support has been disabled on this platform due to the
  156. rather strange nature of Darwin's 106-bit long double
  157. implementation. It should be possible to make this work if someone
  158. is prepared to offer assistance.]]
  159. [[Apple Mac OS X,][Clang 3.2][Yes][All tests expected to be OK.]]
  160. [[IBM AIX][IBM xlc 5.3][Yes]
  161. [All tests pass except for our fpclassify tests which fail due to a
  162. bug in `std::numeric_limits`, the bug effects the test code, not
  163. fpclassify itself. The IBM compiler group are aware of the problem.]]
  164. ]
  165. [table Unsupported Compilers
  166. [[Platform][Compiler]]
  167. [[Windows][Borland C++ 5.9.2 (Borland Developer Studio 2007)]]
  168. [[Windows][MSVC 6 and 7]]
  169. ]
  170. If your compiler or platform is not listed above, please try running the
  171. regression tests: cd into boost-root/libs/math/test and do a:
  172. bjam mytoolset
  173. where "mytoolset" is the name of the
  174. [@http://www.boost.org/doc/html/bbv2.html Boost.Build]
  175. toolset used for your
  176. compiler. The chances are that [*many of the accuracy tests will fail
  177. at this stage] - don't panic - the default acceptable error tolerances
  178. are quite tight, especially for long double types with an extended
  179. exponent range (these cause more extreme test cases to be executed
  180. for some functions).
  181. You will need to cast an eye over the output from
  182. the failing tests and make a judgement as to whether
  183. the error rates are acceptable or not.
  184. ] [/template compilers_overview]
  185. [/ common_overviews.qbk
  186. Copyright 2007, 2012, 2014 John Maddock and Paul A. Bristow.
  187. Distributed under the Boost Software License, Version 1.0.
  188. (See accompanying file LICENSE_1_0.txt or copy at
  189. http://www.boost.org/LICENSE_1_0.txt).
  190. ]