 
 
 
 
 
 
Re: Severe ToExpression Fault?
- To: mathgroup at smc.vnet.net
- Subject: [mg42923] Re: Severe ToExpression Fault?
- From: koopman at sfu.ca (Ray Koopman)
- Date: Sat, 2 Aug 2003 04:12:54 -0400 (EDT)
- References: <bgcujv$9pj$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
nils at theune.com (Nils Theune) wrote in message 
news:<bgcujv$9pj$1 at smc.vnet.net>...
> Hi folks,
> 
> running Mathematica 4.0.1 I am stuck with the following problem:
> 
> Input:
> Print["-1,97E-04"];
> Print[StringReplace["-1,97E-04", {"," -> "."}]];
> Print[ToExpression[StringReplace["-1,97E-04", {"," -> "."}]]];
> 
> Output:
> -1,97E-04
> -1.97E-04
> -9.35502
> 
> Can somebody explain this to me? Why does the ToExpression Function
> not make the decimal -1.97E-04 out of the String "-1.97E-04". What in
> the hell is going wrong (-9.35502->"Where does this number come
> from?") and what can be done to circumvent the ToExpression function.
> 
> I am greatful for any kind of comments on this problem/bug.
> 
> regards
> Nils
-1.97E = -5.35502, but why it got parsed that way is beyond me!

