I need to play with a lot of powers such as 10^-3. 1E-3 does not work for it. Is there any short form for it?
Asked
Active
Viewed 6.5k times
82
hhh
- 2,603
- 2
- 19
- 30
-
Scientific notation is very convenient in programming. – dtn Jan 15 '20 at 06:10
3 Answers
119
I'm surprised there isn't a question about this (i.e. entering numbers in scientific notation) already.
To enter $3\times10^{-3}$, you can write 3*^-3.
For further reference, see Input Syntax: Numbers.
gyger
- 101
- 4
-
2Yeah... it's indeed very surprising. Even Google does a bad job of leading to the correct syntax (of course that's before this answer became popular — now this is one of the top answers). – Shashank Sawant Oct 31 '14 at 08:44
-
3That notation looks SO funny and wrong to me. Where did it come from, and why not use the old E notation which many people already know? – Ralph Dratman May 02 '17 at 18:07
-
3@Ralph: Because in Mathematica
Ealready means $e\approx 2.718$, so3E-3is interpreted as $3e-3$. – May 02 '17 at 18:38 -
1It's so easy to think of and to write
3*10^-3that people might not be motivated to look for another way. I've seen hundreds of notebooks and only very rarely seen the*^notation. – Reb.Cabin Oct 13 '18 at 03:17 -
The E notation works when importing data from a file with a CSV extension and in which the data values are separated by commas. – CElliott Aug 21 '19 at 14:32
3
I ran into this as well teaching some solubility chemistry (it's logs all the way down). The notation can get in the way, but most students can keep up with 1×10^-5 syntax - just don't forget to wrap it in brackets i.e.:
1*^-10/1*^-5 == (1×10^-10)/(1×10^-5)
(* True *)
NB: the × in 1×10 is added automatically when pushing space.
J. M.'s missing motivation
- 124,525
- 11
- 401
- 574
Joe
- 1,467
- 7
- 13
0
Sure, easy.
100,000 = 1*^5
1/10 = 1*^-1
6/10 = 6*^-1
3200 = 32 *^ 2
Try it and see!
Paul Du Bois
- 103
- 3
Ratch
- 39
- 4