diff options
| author | Christoph Berg <myon@debian.org> | 2020-05-11 22:17:58 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2020-05-11 22:17:58 +0200 |
| commit | 32a41b1abe1a4aab0892c9c2051be6ba5b379f1e (patch) | |
| tree | c6e107c1ee4d70610e43a7912e57c720334a08c7 /boost/libs/math/tools/tgamma_large_data.cpp | |
| parent | 08299e8b2bf50ba90daf570f57def529dd29d6e7 (diff) | |
New upstream version 2.2.0~rc1+repackupstream/2.2.0_rc1+repack
Diffstat (limited to 'boost/libs/math/tools/tgamma_large_data.cpp')
| -rw-r--r-- | boost/libs/math/tools/tgamma_large_data.cpp | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/boost/libs/math/tools/tgamma_large_data.cpp b/boost/libs/math/tools/tgamma_large_data.cpp deleted file mode 100644 index dbf6ef34..00000000 --- a/boost/libs/math/tools/tgamma_large_data.cpp +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright John Maddock 2013. -// 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) - -//[special_data_example - -#include <boost/multiprecision/mpfr.hpp> -#include <boost/math/tools/test_data.hpp> -#include <boost/test/included/prg_exec_monitor.hpp> -#include <boost/math/tools/tuple.hpp> -#include <fstream> - -using namespace boost::math::tools; -using namespace boost::math; -using namespace std; -using namespace boost::multiprecision; - -typedef number<mpfr_float_backend<1000> > mp_type; - - -boost::math::tuple<mp_type, mp_type, mp_type> generate(mp_type a) -{ - mp_type tg, lg; - mpfr_gamma(tg.backend().data(), a.backend().data(), GMP_RNDN); - mpfr_lngamma(lg.backend().data(), a.backend().data(), GMP_RNDN); - return boost::math::make_tuple(a, tg, lg); -} - -int cpp_main(int argc, char*argv []) -{ - parameter_info<mp_type> arg1, arg2; - test_data<mp_type> data; - - bool cont; - std::string line; - - if(argc < 1) - return 1; - - do{ - // - // User interface which prompts for - // range of input parameters: - // - if(0 == get_user_parameter_info(arg1, "a")) - return 1; - arg1.type |= dummy_param; - - data.insert(&generate, arg1); - - std::cout << "Any more data [y/n]?"; - std::getline(std::cin, line); - boost::algorithm::trim(line); - cont = (line == "y"); - }while(cont); - // - // Just need to write the results to a file: - // - std::cout << "Enter name of test data file [default=gamma.ipp]"; - std::getline(std::cin, line); - boost::algorithm::trim(line); - if(line == "") - line = "gamma.ipp"; - std::ofstream ofs(line.c_str()); - line.erase(line.find('.')); - ofs << std::scientific << std::setprecision(500); - write_code(ofs, data, line.c_str()); - - return 0; -} - -//] - |
