MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Converting from string to real


All the digits are there.

Use InputForm[] to see what the number really is. By default, Mathematica just shows 6 digits of a real number (when it can).

In[1]:= ToExpression["109266.75"]
Out[1]= 109267.

In[2]:= InputForm[%]
Out[2]//InputForm=
109266.75


george woodrow


On Jun 6, 2012, at 4:53 AM, 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?
> Many thanks
> fcaleyo
> 
> 
> 
> 




  • Prev by Date: Re: Stop on message?
  • Next by Date: Re: Converting from string to real
  • Previous by thread: Converting from string to real
  • Next by thread: Re: Converting from string to real