# Scientific Notation for Quantities

I am using Quantities (units) in Mathematica 11.3 and would like to express the numerical portion of the output in scientific notation. The command ScientificForm[quantity] does not work.

• Example code please. Mar 3, 2019 at 17:31
• Typically the output is scientific notation - for instance Quantity[0.000000000000009, "Joules"] has the output Quantity[9.\[CenterDot]10^-15, "Joules"]. If you're using something like Quantity[9/Pi*-1000000, "Joules"], you may need to do N@Quantity[9/Pi*-1000000, "Joules"], which results in the output Quantity[-2.86479\[CenterDot]10^6, "Joules"]. Mar 3, 2019 at 17:38
• Does ScientificForm[N @ quantity] do what you want? Mar 3, 2019 at 23:57

When the argument to Quantity is in arbitrary precision (e.g. an exact integer), it does not get converted automatically to scientific notation. You can force the conversion if you numericize the input, converting it e.g. to machine precision:

Quantity[2000000, "Kilograms"]
N @ Quantity[2000000, "Kilograms"]  Note that, however, even machine precision numbers whose exponents are "small" according to some preset threshold do not get converted to scientific notation.

Quantity[2000., "Kilograms"] I have not (yet) found a way to force that conversion at will.

• Looking at some DVs (QuantityUnitsPrivatemakeNumberValue) it looks like the 10^6 cutoff is hardcoded... Mar 4, 2019 at 0:40
• @b3m2a1 Interesting, thank you for digging it up. It's unfortunate that the cutoff is hardcoded. Mar 4, 2019 at 1:30
• On the other hand this should work (it does for me): Quantity[ScientificForm[10.^5], "USDollars"] Mar 4, 2019 at 1:31
• @b3m2a1 ... as does, interestingly, ScientificForm[N@Quantity[1000, "Kilograms"]] which, I see now, was suggested by Carl Woll in comment. Mar 4, 2019 at 1:40