On 2012.06.06. 10:51, fcaleyo wrote:
> Hi guys, I've got a problem with ToExpression[].
> It seems to round large real numbers off, e.g.
> ToExpression["109266.75"] returns 109267., still a real, yet not exactly what the original string meant.
> Any idea to solve this?
By default machine precision number are displayed only with six digits,
but the precision is still there. If you position the cursor on the
output cell and press space, you'll see this.
Also try FractionalPart@ToExpression["109266.75"]
So don't worry, only the display is truncated for convenience (in your
case inconvenience but most of the time it's better not to see all 15 or
so digits all at once)
--
Szabolcs Horvát
Visit Mathematica.SE: http://mathematica.stackexchange.com/