Subject: [Boost-bugs] [Boost C++ Libraries] #11608: boost::spirit::double_ yields wrong result
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-09-01 09:32:08
#11608: boost::spirit::double_ yields wrong result
---------------------------------+------------------------------
Reporter: Tobias Reh <treh@â¦> | Type: Bugs
Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.59.0
Severity: Regression | Keywords:
---------------------------------+------------------------------
Since 1.59.0, spirit fails to parse large doubles when they are written
out.
{{{#!C++
#include <boost/spirit/include/qi_real.hpp>
#include <iostream>
int main()
{
// 2^100, exactly representable as double
auto str = "1267650600228229401496703205376";
double f;
boost::spirit::qi::parse(str, str + strlen(str), boost::spirit::double_,
f);
// The following code line prints
// 1.26765e+30 (with boost 1.58.0, correct)
// -9.25596e+61 (with boost 1.59.0)
std::cout << f << std::endl;
return 0;
}
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11608> 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:18 UTC