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