DecimalForm

DecimalForm[expr]

prints with approximate real numbers in expr always given in decimal form, without scientific notation.

DecimalForm[expr,n]

prints with approximate real numbers given in decimal form to n-digit precision.

DecimalForm[expr,{n,f}]

prints with approximate real numbers having n digits, with f digits to the right of the decimal point.

Details and Options

Examples

open allclose all

Basic Examples  (2)

This approximate number is displayed by default in scientific notation:

In[1]:=
Click for copyable input
Out[1]=

Show it in decimal form:

In[2]:=
Click for copyable input
Out[2]//DecimalForm=

Show all 9 digits:

In[3]:=
Click for copyable input
Out[3]//DecimalForm=

Display a small length in decimal form:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]//DecimalForm=

Scope  (5)

Options  (8)

Properties & Relations  (2)

Possible Issues  (1)

See Also

NumberForm  AccountingForm  ScientificForm  PaddedForm  N  RealDigits

Introduced in 2017
(11.2)