]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/math/example/policy_ref_snip4.cpp
1 // Copyright John Maddock 2007.
2 // Copyright Paul A. Bristow 2010.
3 // Use, modification and distribution are subject to the
4 // Boost Software License, Version 1.0. (See accompanying file
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 // Note that this file contains quickbook mark-up as well as code
8 // and comments, don't change any of the special comment mark-ups!
11 # pragma warning (disable : 4305) // 'initializing' : truncation from 'long double' to 'const eval_type'
12 # pragma warning (disable : 4244) // 'conversion' : truncation from 'long double' to 'const eval_type'
17 #include <boost/math/distributions/normal.hpp>
18 using boost::math::normal_distribution
;
20 using namespace boost::math::policies
;
27 // Define the new normal distribution using my_policy:
28 typedef normal_distribution
<float, my_policy
> my_norm
;
31 float q
= quantile(my_norm(), 0.05f
);
33 //] [policy_ref_snip4]
36 using std::cout
; using std::endl
;
40 cout
<< " quantile(my_norm(), 0.05f) = " << q
<< endl
; // -1.64485