This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
 Documentation / Mathematica / Built-in Functions / Input and Output / Number Formatting  /

  • 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:
  • All options except ExponentFunction apply to integers as well as approximate real numbers.
  • You can mix NumberForm and BaseForm.
  • NumberForm acts as a "wrapper", which affects printing, but not evaluation.
  • See the Mathematica book: Section 2.8.7.
  • See also: ScientificForm, EngineeringForm, AccountingForm, BaseForm, PaddedForm, N.

    Further Examples

    This breaks digits into blocks of length 3.



    You can specify any string to use as a separator between blocks of digits.



    This gives an explicit plus sign for positive numbers, and uses | in place of a decimal point.