/Miranda IM - CK Release/Miranda/boost/libs/math/example/owens_t_example.cpp
C++ | 109 lines | 86 code | 18 blank | 5 comment | 2 complexity | 18ae42b92b26dfb808533fea551a3acf MD5 | raw file
Possible License(s): GPL-2.0, MPL-2.0-no-copyleft-exception, LGPL-3.0, AGPL-1.0, BSD-3-Clause, LGPL-2.1
- // (C) Benjamin Sobotta 2012
- // Use, modification and distribution are subject to the
- // Boost Software License, Version 1.0. (See accompanying file
- // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- #include <boost/math/special_functions/owens_t.hpp>
- #include <iostream>
- int main()
- {
- double h = 0.0,a;
- std::cout << std::setprecision(20);
-
- static const double a_vec[] = {
- 0.5000000000000000E+00,
- 0.1000000000000000E+01,
- 0.2000000000000000E+01,
- 0.3000000000000000E+01,
- 0.5000000000000000E+00,
- 0.1000000000000000E+01,
- 0.2000000000000000E+01,
- 0.3000000000000000E+01,
- 0.5000000000000000E+00,
- 0.1000000000000000E+01,
- 0.2000000000000000E+01,
- 0.3000000000000000E+01,
- 0.5000000000000000E+00,
- 0.1000000000000000E+01,
- 0.2000000000000000E+01,
- 0.3000000000000000E+01,
- 0.5000000000000000E+00,
- 0.1000000000000000E+01,
- 0.2000000000000000E+01,
- 0.3000000000000000E+01,
- 0.1000000000000000E+02,
- 0.1000000000000000E+03 };
- static const double h_vec[] = {
- 0.1000000000000000E+01,
- 0.1000000000000000E+01,
- 0.1000000000000000E+01,
- 0.1000000000000000E+01,
- 0.5000000000000000E+00,
- 0.5000000000000000E+00,
- 0.5000000000000000E+00,
- 0.5000000000000000E+00,
- 0.2500000000000000E+00,
- 0.2500000000000000E+00,
- 0.2500000000000000E+00,
- 0.2500000000000000E+00,
- 0.1250000000000000E+00,
- 0.1250000000000000E+00,
- 0.1250000000000000E+00,
- 0.1250000000000000E+00,
- 0.7812500000000000E-02,
- 0.7812500000000000E-02,
- 0.7812500000000000E-02,
- 0.7812500000000000E-02,
- 0.7812500000000000E-02,
- 0.7812500000000000E-02 };
- static const double t_vec[] = {
- 0.4306469112078537E-01,
- 0.6674188216570097E-01,
- 0.7846818699308410E-01,
- 0.7929950474887259E-01,
- 0.6448860284750376E-01,
- 0.1066710629614485E+00,
- 0.1415806036539784E+00,
- 0.1510840430760184E+00,
- 0.7134663382271778E-01,
- 0.1201285306350883E+00,
- 0.1666128410939293E+00,
- 0.1847501847929859E+00,
- 0.7317273327500385E-01,
- 0.1237630544953746E+00,
- 0.1737438887583106E+00,
- 0.1951190307092811E+00,
- 0.7378938035365546E-01,
- 0.1249951430754052E+00,
- 0.1761984774738108E+00,
- 0.1987772386442824E+00,
- 0.2340886964802671E+00,
- 0.2479460829231492E+00 };
- for(unsigned i = 0; i != 22; ++i)
- {
- h = h_vec[i];
- a = a_vec[i];
- const double t = boost::math::owens_t(h, a);
- std::cout << "h=" << h << "\ta=" << a << "\tcomp="
- << t << "\ttab=" << t_vec[i]
- << "\tdiff=" << std::fabs(t_vec[i]-t) << std::endl;;
- }
- return 0;
- }
- // EOF