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  /
NumberFormat

  • NumberFormat is an option for NumberForm and related functions which specifies how the mantissa, base and exponent should be assembled into a final print form.
  • With the setting NumberFormat -> f, the function f is supplied with three arguments: the mantissa, base and exponent of each number to be printed.
  • The arguments are all given as strings.
  • When no exponent is to be printed, the third argument is given as "".
  • The function f must return the final format for the number.
  • See the Mathematica book: Section 2.8.7.
  • See also: ExponentFunction.

    Further Examples

    The default is to use scientific notation for all numbers with exponents outside the range -5 to 5.

    In[1]:=

    Out[1]=

    This gives the exponents in Fortran-like e-format.

    In[2]:=

    Out[2]//NumberForm=