3 <meta http-equiv=
"Content-Type" content=
"text/html; charset=US-ASCII">
4 <title>Policies
</title>
5 <link rel=
"stylesheet" href=
"../math.css" type=
"text/css">
6 <meta name=
"generator" content=
"DocBook XSL Stylesheets V1.77.1">
7 <link rel=
"home" href=
"../index.html" title=
"Math Toolkit 2.5.1">
8 <link rel=
"up" href=
"../overview.html" title=
"Chapter 1. Overview">
9 <link rel=
"prev" href=
"config_macros.html" title=
"Configuration Macros">
10 <link rel=
"next" href=
"threads.html" title=
"Thread Safety">
12 <body bgcolor=
"white" text=
"black" link=
"#0000FF" vlink=
"#840084" alink=
"#0000FF">
13 <table cellpadding=
"2" width=
"100%"><tr>
14 <td valign=
"top"><img alt=
"Boost C++ Libraries" width=
"277" height=
"86" src=
"../../../../../boost.png"></td>
15 <td align=
"center"><a href=
"../../../../../index.html">Home
</a></td>
16 <td align=
"center"><a href=
"../../../../../libs/libraries.htm">Libraries
</a></td>
17 <td align=
"center"><a href=
"http://www.boost.org/users/people.html">People
</a></td>
18 <td align=
"center"><a href=
"http://www.boost.org/users/faq.html">FAQ
</a></td>
19 <td align=
"center"><a href=
"../../../../../more/index.htm">More
</a></td>
22 <div class=
"spirit-nav">
23 <a accesskey=
"p" href=
"config_macros.html"><img src=
"../../../../../doc/src/images/prev.png" alt=
"Prev"></a><a accesskey=
"u" href=
"../overview.html"><img src=
"../../../../../doc/src/images/up.png" alt=
"Up"></a><a accesskey=
"h" href=
"../index.html"><img src=
"../../../../../doc/src/images/home.png" alt=
"Home"></a><a accesskey=
"n" href=
"threads.html"><img src=
"../../../../../doc/src/images/next.png" alt=
"Next"></a>
26 <div class=
"titlepage"><div><div><h2 class=
"title" style=
"clear: both">
27 <a name=
"math_toolkit.intro_pol_overview"></a><a class=
"link" href=
"intro_pol_overview.html" title=
"Policies">Policies
</a>
28 </h2></div></div></div>
30 Policies are a powerful fine-grain mechanism that allow you to customise the
31 behaviour of this library according to your needs. There is more information
32 available in the
<a class=
"link" href=
"pol_tutorial.html" title=
"Policy Tutorial">policy tutorial
</a>
33 and the
<a class=
"link" href=
"pol_ref.html" title=
"Policy Reference">policy reference
</a>.
36 Generally speaking, unless you find that the
<a class=
"link" href=
"pol_tutorial/policy_tut_defaults.html" title=
"Policies Have Sensible Defaults">default
37 policy behaviour
</a> when encountering 'bad' argument values does not meet
38 your needs, you should not need to worry about policies.
41 Policies are a compile-time mechanism that allow you to change error-handling
42 or calculation precision either program wide, or at the call site.
45 Although the policy mechanism itself is rather complicated, in practice it
46 is easy to use, and very flexible.
49 Using policies you can control:
51 <div class=
"itemizedlist"><ul class=
"itemizedlist" style=
"list-style-type: disc; ">
53 <a class=
"link" href=
"pol_ref/error_handling_policies.html" title=
"Error Handling Policies">How results
54 from 'bad' arguments are handled
</a>, including those that cannot be
58 How
<a class=
"link" href=
"pol_ref/internal_promotion.html" title=
"Internal Floating-point Promotion Policies">accuracy is
59 controlled by internal promotion
</a> to use more precise types.
62 What working
<a class=
"link" href=
"pol_ref/precision_pol.html" title=
"Precision Policies">precision
</a>
63 should be used to calculate results.
66 What to do when a
<a class=
"link" href=
"pol_ref/assert_undefined.html" title=
"Mathematically Undefined Function Policies">mathematically
67 undefined function
</a> is used: Should this raise a run-time or compile-time
71 Whether
<a class=
"link" href=
"pol_ref/discrete_quant_ref.html" title=
"Discrete Quantile Policies">discrete
72 functions
</a>, like the binomial, should return real or only integral
73 values, and how they are rounded.
76 How many iterations a special function is permitted to perform in a series
77 evaluation or root finding algorithm before it gives up and raises an
78 <a class=
"link" href=
"error_handling.html#math_toolkit.error_handling.evaluation_error">evaluation_error
</a>.
82 You can control policies:
84 <div class=
"itemizedlist"><ul class=
"itemizedlist" style=
"list-style-type: disc; ">
86 Using
<a class=
"link" href=
"pol_ref/policy_defaults.html" title=
"Using Macros to Change the Policy Defaults">macros
</a>
87 to change any default policy: the is the preferred method for installation
91 At your chosen
<a class=
"link" href=
"pol_ref/namespace_pol.html" title=
"Setting Polices at Namespace Scope">namespace
92 scope
</a> for distributions and/or functions: this is the preferred
93 method for project, namespace, or translation unit scope policies.
96 In an ad-hoc manner
<a class=
"link" href=
"pol_tutorial/ad_hoc_sf_policies.html" title=
"Changing the Policy on an Ad Hoc Basis for the Special Functions">by
97 passing a specific policy to a special function
</a>, or to a
<a class=
"link" href=
"pol_tutorial/ad_hoc_dist_policies.html" title=
"Setting Policies for Distributions on an Ad Hoc Basis">statistical
102 <table xmlns:
rev=
"http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width=
"100%"><tr>
103 <td align=
"left"></td>
104 <td align=
"right"><div class=
"copyright-footer">Copyright
© 2006-
2010,
2012-
2014 Nikhar Agrawal,
105 Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos, Hubert
106 Holin, Bruno Lalande, John Maddock, Jeremy Murphy, Johan R
åde, Gautam Sewani,
107 Benjamin Sobotta, Thijs van den Berg, Daryle Walker and Xiaogang Zhang
<p>
108 Distributed under the Boost Software License, Version
1.0. (See accompanying
109 file LICENSE_1_0.txt or copy at
<a href=
"http://www.boost.org/LICENSE_1_0.txt" target=
"_top">http://www.boost.org/LICENSE_1_0.txt
</a>)
114 <div class=
"spirit-nav">
115 <a accesskey=
"p" href=
"config_macros.html"><img src=
"../../../../../doc/src/images/prev.png" alt=
"Prev"></a><a accesskey=
"u" href=
"../overview.html"><img src=
"../../../../../doc/src/images/up.png" alt=
"Up"></a><a accesskey=
"h" href=
"../index.html"><img src=
"../../../../../doc/src/images/home.png" alt=
"Home"></a><a accesskey=
"n" href=
"threads.html"><img src=
"../../../../../doc/src/images/next.png" alt=
"Next"></a>