/////////////////////////////////////////////////////////////// // Copyright 2011 John Maddock. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt #include #include #include void t1() { //[debug_adaptor_eg //=#include //=#include using namespace boost::multiprecision; typedef number > > fp_type; fp_type denom = 1; fp_type sum = 1; for(unsigned i = 2; i < 50; ++i) { denom *= i; sum += 1 / denom; } std::cout << std::setprecision(std::numeric_limits::digits) << sum << std::endl; //] } int main() { t1(); return 0; }