Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica >

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.
Display numbers in a Fortran-like form:
Display only the mantissas:
Display the exponents after converting to scientific form:
Display numbers in a Fortran-like form:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]//NumberForm=
Display only the mantissas:
In[3]:=
Click for copyable input
Out[3]//NumberForm=
Display the exponents after converting to scientific form:
In[4]:=
Click for copyable input
Out[4]//NumberForm=
Display numbers as lists containing the mantissa, base and exponent:
Do the same for ScientificForm:
The arguments are strings:
If there is no exponent, the third argument is an empty string:
New in 2
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team