
1 Apr
2007
1 Apr
'07
5:02 a.m.
Hello, I am seeing this behavious with boost::lexical_caststd::string(double) occasionaly numbers like 76.32 are being converted to strings of the form 76.319999999 The expected behavior is seen for almost all doubles except for a few which are reproducible e.g. 76.32.. here is a simple program, int main() { double d=76.32; std::string s = boost::lexical_caststd::string(d); cout << s << endl; } output 76.319999999... a) am i doing something wrong ?? b) if this is not wrong s this standard behavior ?? Thanks Digz