Re: Converting from string to real
- To: mathgroup at smc.vnet.net
- Subject: [mg126771] Re: Converting from string to real
- From: "Nasser M. Abbasi" <nma at 12000.org>
- Date: Thu, 7 Jun 2012 05:15:32 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <jqn5mn$her$1@smc.vnet.net>
- Reply-to: nma at 12000.org
On 6/6/2012 3:51 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
>
>
>
You can change the PrintPrecision to larger value
--------------------------------------------------
SetOptions[$FrontEndSession,PrintPrecision->15]
ToExpression["109266.75"]
109266.75
------------------------------------------------
To make it permanent, search your advanced
preferences (Options Inspector) for PrintPrecision
and change it there from the default 6 to any other value.
--Nasser