Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #10382
| From | Bob Hanlon <hanlonr357@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Converting from string to real |
| Date | 2012-06-07 09:25 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jqps1v$2h2$1@smc.vnet.net> (permalink) |
| References | <201206060853.EAA17920@smc.vnet.net> |
You are seeing the effect of the preference setting for the
PrintPrecision display option. All of the digits can be seen by
controlling the display (or changing the preference).
x = {ToExpression["109266.75"], Pi//N}
{109267.,3.14159}
x//InputForm
{109266.75, 3.141592653589793}
x//FullForm
List[109266.75`,3.141592653589793`]
NumberForm[x,8]
{109266.75,3.1415927}
Bob Hanlon
On Wed, Jun 6, 2012 at 4:53 AM, fcaleyo <fcaleyo@gmail.com> 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
>
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Converting from string to real Bob Hanlon <hanlonr357@gmail.com> - 2012-06-07 09:25 +0000
csiph-web