MathGroup Archive 2012

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

Search the Archive

Re: Converting from string to real


Am 06.06.2012 10:51, schrieb fcaleyo:
> 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.

it doesn't round, it just doesn't print more than 6 digits with the 
default settings.

> Any idea to solve this?

You can use InputForm to see that it really knows all digits (and will 
use them for any further calculation):

ToExpression["109266.75"]//InputForm

You could also change the "Displayed precision" from Edit -> Preferences 
in the Apearance -> Numbers -> Formatting tab.

Other than that, there isn't anything to solve really :-)

hth,

albert




  • Prev by Date: please help using NDSolve and FindFit
  • Next by Date: Re: Converting from string to real
  • Previous by thread: Re: Converting from string to real
  • Next by thread: Re: Converting from string to real