The following code snippet is a boiled down test case from Boost lexical_cast:
const char* p = "2.718281828459045235360287471352662497757247093e0";
s << p;
long double x;
s >> x;
When x is type long double (and compiled with VC8) it gets the spurious value 5.6611421590039250e-015, but when x is declared as a double it does work as expected.
Thanks, John Maddock.
Log in to post a comment.