I'm looking to convert a string to a float with out loss of data; for example if I use istringstream or ::atof(x.c_str()) I loose data due to rounding I guess.
Normally this isn't a issue for me but I'm using data that has to be the same as its read. Here's a example of a number and what it's converted to.
-8.000001 -> -8
-0.6257381 -> -0.625738
12.0 -> 12 (drops the .0)
If anyone could help me out I'd be very grateful
Thanks Matt