New answers tagged

3

you are fighting with windmills. Interpreter["Number"]["4.5E-7"] gives you 4.5*10^-7


7

An enhanced version of kirma's answer, which handles expressions like 5 e 4: ClearAll@fn; SetAttributes[fn, HoldAll] fn[m_. e + e_] := m 10^e fn[a_. e b_] := a 10^b fn[5 e 4] (* 50000 *)


7

Closest to sensible I can imagine would be wrapping these numbers individually with a function if e is always followed by sign (+or -): ClearAll@fn; fn[m_. e + e_] := m 10^e; fn[m_. e] := m; fn[_] := 0; fn[1.13903 e - 08] 1.13903*10^-8 Handling the case where + is implicit seems awfully convoluted to get right. I also thought of redefining e as an ...


Top 50 recent answers are included