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

Documentation / Mathematica / Built-in Functions / Input and Output / Number Formatting /

NumberForm

FilledSmallSquare NumberForm[expr, n] prints with approximate real numbers in expr given to n-digit precision.

FilledSmallSquare NumberForm[expr, n, f] prints with approximate real numbers having n digits, with f digits to the right of the decimal point.

FilledSmallSquare NumberForm works on integers as well as approximate real numbers.

FilledSmallSquare The following options can be given:

FilledSmallSquare All options except ExponentFunction apply to integers as well as approximate real numbers.

FilledSmallSquare You can mix NumberForm and BaseForm.

FilledSmallSquare NumberForm acts as a "wrapper", which affects printing, but not evaluation.

FilledSmallSquare See Section 2.9.7.

FilledSmallSquare See also: ScientificForm, EngineeringForm, AccountingForm, BaseForm, PaddedForm, N.

FilledSmallSquare New in Version 1; modified in 3.

Further Examples