MathGroup Archive 2012

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

Search the Archive

Re: Converting from string to real

  • To: mathgroup at smc.vnet.net
  • Subject: [mg126793] Re: Converting from string to real
  • From: Peter Breitfeld <phbrf at t-online.de>
  • Date: Thu, 7 Jun 2012 05:23:09 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <jqn5mn$her$1@smc.vnet.net>

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
>  
This is only due to the fact, that Mathematica displays 6 Digits of precision.
If you use

ToExpression["109266.75"]//InputForm

you will see, that all digits are present.

-- 
_________________________________________________________________
Peter Breitfeld | Bad Saulgau, Germany | http://www.pBreitfeld.de



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