Re: [boost] improve <boost/math/constants.hpp>
I forgot my test case int main() { std::cout << std::setprecision(100); std::cout << "boost pi" << std::endl; { const auto pi = boost::math::constants::pistd::float16_t(); std::cout << pi << std::endl; } { constexpr auto pi = boost::math::constants::pistd::float128_t(); std::cout << pi << std::endl; } { constexpr auto pi = boost::math::constants::piboost::multiprecision::float128(); std::cout << pi << std::endl; } { const auto pi = boost::math::constants::piboost::multiprecision::cpp_bin_float_100(); std::cout << pi << std::endl; } std::cout << "my pi" << std::endl; { constexpr auto pi = boost::math::constants::my_pistd::float16_t(); std::cout << pi << std::endl; } { constexpr auto pi = boost::math::constants::my_pistd::float128_t(); std::cout << pi << std::endl; } { constexpr auto pi = boost::math::constants::my_piboost::multiprecision::float128(); std::cout << pi << std::endl; } { const auto pi = boost::math::constants::my_piboost::multiprecision::cpp_bin_float_100(); std::cout << pi << std::endl; } return EXIT_SUCCESS; } boost pi 3.140625000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 3.141592653589793238462643383279502797479068098137295573004504331874296718662975536062731407582759857 3.141592653589793238462643383279502797479068098137295573004504331874296718662975536062731407582759857 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117068 my pi 3.140625000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 3.141592653589793238462643383279502797479068098137295573004504331874296718662975536062731407582759857 3.141592653589793238462643383279502797479068098137295573004504331874296718662975536062731407582759857 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117068
participants (1)
-
Gero Peterhoff