Fractions & Decimals

Out[]=
The Wolfram|Alpha Chemistry Team
The difference between exact and approximate numbers may not be the first thing you think of in the morning but it is crucial in computations.
Some numbers, such as the subscripts in a chemical formula, are exact. Exact numbers have no uncertainty and are therefore infinitely precise. In the Wolfram Language, exact inputs will provide exact output.
Use  +
/
to enter fractions:
2+3​​Precision[%]
Out[]=
5
Out[]=
∞
1
4
+
1
3
​​Precision[%]
Out[]=
7
12
Out[]=
∞
Fractions can be put over their lowest common denominator with
Together
.
Together
1
a
+
1
b

Out[]=
a+b
ab
Use
N
to get a numerical approximation of an exact result.
N
1
4
+
1
7

Out[]=
0.392857
A desired accuracy for display can be specified:
N
1
4
+
1
7
,10
Out[]=
0.3928571429
Any input containing decimals gives approximate, rather than exact, output.
Around[0.25,.01]+
1
3
Out[]=
0.583
±
0.010
0.25+
1
3
Out[]=
0.583333
Some numbers are better expressed in
ScientificForm
.
ScientificForm[Around[1234578,5]]
Out[]//ScientificForm=
1.23457
(
8
±
5
)
×
6
10
ScientificForm[0.00123]
Out[]//ScientificForm=
1.23×
-3
10
ScientificForm
is applied automatically when appropriate:
N[100!]
Out[]=
9.33262×
157
10
Out[]=
Close
TOC