]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/math/example/owens_t_example.cpp
1 // Copyright Benjamin Sobotta 2012
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)
8 # pragma warning(disable : 4127) // conditional expression is constant.
11 #include <boost/math/special_functions/owens_t.hpp>
17 std::cout
<< std::setprecision(20);
19 static const double a_vec
[] = {
20 0.5000000000000000E+00,
21 0.1000000000000000E+01,
22 0.2000000000000000E+01,
23 0.3000000000000000E+01,
24 0.5000000000000000E+00,
25 0.1000000000000000E+01,
26 0.2000000000000000E+01,
27 0.3000000000000000E+01,
28 0.5000000000000000E+00,
29 0.1000000000000000E+01,
30 0.2000000000000000E+01,
31 0.3000000000000000E+01,
32 0.5000000000000000E+00,
33 0.1000000000000000E+01,
34 0.2000000000000000E+01,
35 0.3000000000000000E+01,
36 0.5000000000000000E+00,
37 0.1000000000000000E+01,
38 0.2000000000000000E+01,
39 0.3000000000000000E+01,
40 0.1000000000000000E+02,
41 0.1000000000000000E+03 };
43 static const double h_vec
[] = {
44 0.1000000000000000E+01,
45 0.1000000000000000E+01,
46 0.1000000000000000E+01,
47 0.1000000000000000E+01,
48 0.5000000000000000E+00,
49 0.5000000000000000E+00,
50 0.5000000000000000E+00,
51 0.5000000000000000E+00,
52 0.2500000000000000E+00,
53 0.2500000000000000E+00,
54 0.2500000000000000E+00,
55 0.2500000000000000E+00,
56 0.1250000000000000E+00,
57 0.1250000000000000E+00,
58 0.1250000000000000E+00,
59 0.1250000000000000E+00,
60 0.7812500000000000E-02,
61 0.7812500000000000E-02,
62 0.7812500000000000E-02,
63 0.7812500000000000E-02,
64 0.7812500000000000E-02,
65 0.7812500000000000E-02 };
67 static const double t_vec
[] = {
68 0.4306469112078537E-01,
69 0.6674188216570097E-01,
70 0.7846818699308410E-01,
71 0.7929950474887259E-01,
72 0.6448860284750376E-01,
73 0.1066710629614485E+00,
74 0.1415806036539784E+00,
75 0.1510840430760184E+00,
76 0.7134663382271778E-01,
77 0.1201285306350883E+00,
78 0.1666128410939293E+00,
79 0.1847501847929859E+00,
80 0.7317273327500385E-01,
81 0.1237630544953746E+00,
82 0.1737438887583106E+00,
83 0.1951190307092811E+00,
84 0.7378938035365546E-01,
85 0.1249951430754052E+00,
86 0.1761984774738108E+00,
87 0.1987772386442824E+00,
88 0.2340886964802671E+00,
89 0.2479460829231492E+00 };
91 for(unsigned i
= 0; i
!= 22; ++i
)
95 const double t
= boost::math::owens_t(h
, a
);
96 std::cout
<< "h=" << h
<< "\ta=" << a
<< "\tcomp="
97 << t
<< "\ttab=" << t_vec
[i
]
98 << "\tdiff=" << std::fabs(t_vec
[i
]-t
) << std::endl
;;