]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/math/example/policy_ref_snip10.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!
10 // Setting precision in a single function call using make_policy.
13 using std::cout
; using std::endl
;
17 #include <boost/math/special_functions/gamma.hpp>
18 using boost::math::tgamma
;
20 using namespace boost::math::policies
;
22 double t
= tgamma(12, policy
<digits10
<5> >()); // Concise make_policy.
24 //] //[/policy_ref_snip10]
30 cout
<< "tgamma(12, policy<digits10<5> >()) = "<< t
<< endl
;
37 tgamma(12, policy<digits10<5> >()) = 3.99168e+007