Skip to main content
added 2 characters in body
Source Link

Suppose I have a string containing the C-representation of a floating point number,number; for example

s = "1.23e-5" 

and I want to convert this to a MathematicaMathematica number. How can I do this?

ToExpression[s] gives Plus[-5, Times[1.23`, e]].

Suppose I have a string containing the C-representation of a floating point number, for example

s = "1.23e-5" 

and I want to convert this to a Mathematica number. How can I do this?

ToExpression[s] gives Plus[-5, Times[1.23`, e]].

Suppose I have a string containing the C-representation of a floating point number; for example

s = "1.23e-5" 

and I want to convert this to a Mathematica number. How can I do this?

ToExpression[s] gives Plus[-5, Times[1.23`, e]].

Tweeted twitter.com/#!/StackMma/status/173060057905369088
format
Source Link
Brett Champion
  • 21k
  • 2
  • 67
  • 124

Suppose I have a string containing the C-representation of a floating point number, for example

s = "1.23e-5" 

and I want to convert this to a Mathematica number. How can I do this?

ToExpression[s] gives Plus[-5, Times[1.2323`, e]], e]]`.

Suppose I have a string containing the C-representation of a floating point number, for example

s = "1.23e-5" 

and I want to convert this to a Mathematica number. How can I do this?

ToExpression[s] gives Plus[-5, Times[1.23, e]]`.

Suppose I have a string containing the C-representation of a floating point number, for example

s = "1.23e-5" 

and I want to convert this to a Mathematica number. How can I do this?

ToExpression[s] gives Plus[-5, Times[1.23`, e]].

edited tags
Link
added 4 characters in body
Source Link
Szabolcs
  • 238.9k
  • 32
  • 653
  • 1.3k
Loading
Source Link
Ian Hinder
  • 2.1k
  • 1
  • 14
  • 23
Loading