]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/math/example/luroth.cpp
7bb33e55453f7e1cec58afd631a9272155b98cac
[ceph.git] / ceph / src / boost / libs / math / example / luroth.cpp
1 // (C) Copyright Nick Thompson 2020.
2 // Use, modification and distribution are subject to the
3 // Boost Software License, Version 1.0. (See accompanying file
4 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
6 #include <iostream>
7 #include <boost/math/tools/luroth_expansion.hpp>
8 #include <boost/math/constants/constants.hpp>
9
10 #ifndef BOOST_MATH_STANDALONE
11 #include <boost/multiprecision/mpfr.hpp>
12 using boost::multiprecision::mpfr_float;
13 #endif // BOOST_MATH_STANDALONE
14
15 using boost::math::constants::pi;
16 using boost::math::tools::luroth_expansion;
17
18 int main() {
19 #ifndef BOOST_MATH_STANDALONE
20 using Real = mpfr_float;
21 mpfr_float::default_precision(1024);
22 #else
23 using Real = long double;
24 #endif
25
26 auto luroth = luroth_expansion(pi<Real>());
27 std::cout << luroth << "\n";
28 }