0

I start using boost multiprecision, and I don't know what to do to display numbers properly ... I tried to do it the same way as documented:

#include <boost/multiprecision/cpp_dec_float.hpp>
#include <iostream>

int main()
{
   using namespace boost::multiprecision;
   std::cout.precision(std::numeric_limits<cpp_dec_float_100>::digits10);
   cpp_dec_float_100 lol = 1.28908408397287846738682223;
   std::cout << lol << std::endl;
   return 0;
}

It doesn't work. Instead of what I want I get:

1.2890840839728785471862693157163448631763458251953125

Please, help me.

LogicStuff
  • 19,397
  • 6
  • 54
  • 74
  • 5
    http://stackoverflow.com/questions/33494620/higher-precision-floating-point-using-boost-lib-higher-then-16-digits – llonesmiz Nov 22 '15 at 15:17
  • Why the hell does everyone know the dupe, upvote the comment and not dupevote :) Don't tell me every one had too low rep (because that would make no sense with the average number of views [tag:boost] questions get) – sehe Nov 22 '15 at 19:37

0 Answers0