78
$\begingroup$

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?

$\endgroup$
1
  • $\begingroup$ Scientific notation is very convenient in programming. $\endgroup$
    – dtn
    Jan 15, 2020 at 6:10

3 Answers 3

111
$\begingroup$

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.

$\endgroup$
5
  • 2
    $\begingroup$ Yeah... 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). $\endgroup$ Oct 31, 2014 at 8:44
  • 2
    $\begingroup$ That 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? $\endgroup$ May 2, 2017 at 18:07
  • 3
    $\begingroup$ @Ralph: Because in Mathematica E already means $e\approx 2.718$, so 3E-3 is interpreted as $3e-3$. $\endgroup$
    – user484
    May 2, 2017 at 18:38
  • 1
    $\begingroup$ It's so easy to think of and to write 3*10^-3 that people might not be motivated to look for another way. I've seen hundreds of notebooks and only very rarely seen the *^ notation. $\endgroup$
    – Reb.Cabin
    Oct 13, 2018 at 3:17
  • $\begingroup$ The E notation works when importing data from a file with a CSV extension and in which the data values are separated by commas. $\endgroup$
    – CElliott
    Aug 21, 2019 at 14:32
2
$\begingroup$

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.

$\endgroup$
1
0
$\begingroup$

Sure, easy.

100,000 = 1*^5
1/10 = 1*^-1
6/10 = 6*^-1
3200 = 32 *^ 2

Try it and see!

$\endgroup$
2
  • 1
    $\begingroup$ Is the $1/6 $ an error ? That would rather be 6^-1 $\endgroup$
    – Dunlop
    Jan 14, 2020 at 19:56
  • $\begingroup$ Sorry 6*^-1 = 6/10 = 3/5 $\endgroup$
    – Ratch
    Jan 15, 2020 at 5:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.