MathGroup Archive 2007

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

Search the Archive

Re: ToExpression again


nils wrote:

>Hello,
>
>when I evaluate
>
>ToExpression["1.23456789"]
>
>the result is
>
>1.23457
>
>What do I have to do to get the result
>
>1.23456789 (that is with all the digits)?
>
>Thanx to everybody who has an idea..
>Nils
>
>  
>
Do you want a machine number or an extended precision number? If you 
want a machine number, then the result of ToExpression gives you what 
you want:

In[237]:= ToExpression["1.23456789"] // InputForm

Out[237]//InputForm=
1.23456789

If you want an extended precision number, you can add a tick:

In[238]:= ToExpression["1.23456789`9"]

Out[238]= 1.23456789

Carl Woll
Wolfram Research


  • Prev by Date: Re: ToExpression again
  • Next by Date: why no result & no error from this recursion
  • Previous by thread: Re: ToExpression again
  • Next by thread: Re: ToExpression again