Re: [Boost-bugs] [Boost C++ Libraries] #12408: cpp_dec_float_50 x = x*x*x gives wrong result!!!

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #12408: cpp_dec_float_50 x = x*x*x gives wrong result!!!
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-08-23 11:47:24


#12408: cpp_dec_float_50 x = x*x*x gives wrong result!!!
----------------------------------------+---------------------
  Reporter: Dave Nalepa <denalepa1@…> | Owner:
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: None
   Version: Boost 1.61.0 | Severity: Problem
Resolution: | Keywords:
----------------------------------------+---------------------

Comment (by Dave Nalepa <denalepa1@…>):

 #include <iomanip>

 #include <iostream>

 #include <boost/multiprecision/cpp_dec_float.hpp>


 using boost::multiprecision::cpp_dec_float_50;


 int main()

 {

         cpp_dec_float_50 f2 = (cpp_dec_float_50)(1.03559);

         f2 = f2*f2*f2;

         std::cout << "f2 = " << f2 << std::endl;

     return 0;

 }

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12408#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC