]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/math/tools/ellint_pi2_data.cpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / libs / math / tools / ellint_pi2_data.cpp
CommitLineData
7c673cae
FG
1// Copyright John Maddock 2006.
2// Use, modification and distribution are subject to the
3// Boost Software License, Version 1.0.
4// (See accompanying file LICENSE_1_0.txt
5// or copy at http://www.boost.org/LICENSE_1_0.txt)
20effc67 6#include "mp_t.hpp"
7c673cae
FG
7#include <boost/math/tools/test_data.hpp>
8#include <boost/test/included/prg_exec_monitor.hpp>
9#include <boost/math/special_functions/ellint_2.hpp>
10#include <boost/math/special_functions/ellint_3.hpp>
11#include <fstream>
12#include <boost/math/tools/test_data.hpp>
7c673cae
FG
13
14using namespace boost::math::tools;
15using namespace boost::math;
16using namespace std;
17
18int cpp_main(int argc, char*argv [])
19{
20 using namespace boost::math::tools;
21
22 parameter_info<mp_t> arg1, arg2;
23 test_data<mp_t> data;
24
25 bool cont;
26 std::string line;
27
28 if(argc < 1)
29 return 1;
30
31 do{
32 if(0 == get_user_parameter_info(arg1, "n"))
33 return 1;
34 if(0 == get_user_parameter_info(arg2, "k"))
35 return 1;
36
37 mp_t (*fp)(mp_t, mp_t) = &ellint_3;
38 data.insert(fp, arg2, arg1);
39
40 std::cout << "Any more data [y/n]?";
41 std::getline(std::cin, line);
42 boost::algorithm::trim(line);
43 cont = (line == "y");
44 }while(cont);
45
46 std::cout << "Enter name of test data file [default=ellint_pi2_data.ipp]";
47 std::getline(std::cin, line);
48 boost::algorithm::trim(line);
49 if(line == "")
50 line = "ellint_pi2_data.ipp";
51 std::ofstream ofs(line.c_str());
52 line.erase(line.find('.'));
53 ofs << std::scientific << std::setprecision(40);
54 write_code(ofs, data, line.c_str());
55
56 return 0;
57}
58
59