This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

NumberForm

NumberForm[expr, n]
prints with approximate real numbers in expr given to n-digit precision.
  • NumberForm[expr, {n, f}] prints with approximate real numbers having n digits, with f digits to the right of the decimal point.
  • NumberForm works on integers as well as approximate real numbers.
  • The following options can be given:
DigitBlockInfinitynumber of digits between breaks
ExponentFunctionAutomaticfunction to apply to exponents
ExponentStep1steps by which exponents can increase
NumberFormatAutomaticfunction used to assemble mantissa, base, exponent
NumberMultiplier"×"string to use to indicate multiplication
NumberPadding{"","0"}strings to use for left and right padding
NumberPoint"."decimal point string
NumberSeparator{",", " "}string to insert at breaks between blocks
NumberSigns{"-",""}strings to use for signs of negative and positive numbers
SignPaddingFalsewhether to insert padding after the sign
  • NumberForm acts as a "wrapper", which affects printing, but not evaluation.
Display the first 10 digits of a numeric approximation to :
In[1]:=
Click for copyable input
Out[1]//NumberForm=
 
Display a number with 3 precise digits and 4 digits to the right of the decimal:
In[1]:=
Click for copyable input
Out[1]//NumberForm=
New in 1 | Last modified in 3