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

Exact and Approximate Results

A standard electronic calculator does all your calculations to a particular accuracy, say ten decimal digits. With Mathematica, however, you can often get exact results.
Mathematica gives an exact result for 2100, even though it has 31 decimal digits.
In[1]:=
Click for copyable input
Out[1]=
You can tell Mathematica to give you an approximate numerical result, just as a calculator would, by ending your input with //N. The N stands for "numerical". It must be a capital letter. "Special Ways to Input Expressions" will explain what the // means.
This gives an approximate numerical result.
In[2]:=
Click for copyable input
Out[2]=
Mathematica can give results in terms of rational numbers.
In[3]:=
Click for copyable input
Out[3]=
//N always gives the approximate numerical result.
In[4]:=
Click for copyable input
Out[4]=
expr//Ngive an approximate numerical value for expr

Getting numerical approximations.

When you type in an integer like 7, Mathematica assumes that it is exact. If you type in a number like 4.5, with an explicit decimal point, Mathematica assumes that it is accurate only to a fixed number of decimal places.
This is taken to be an exact rational number, and reduced to its lowest terms.
In[5]:=
Click for copyable input
Out[5]=
Whenever you give a number with an explicit decimal point, Mathematica produces an approximate numerical result.
In[6]:=
Click for copyable input
Out[6]=
Here again, the presence of the decimal point makes Mathematica give you an approximate numerical result.
In[7]:=
Click for copyable input
Out[7]=
When any number in an arithmetic expression is given with an explicit decimal point, you get an approximate numerical result for the whole expression.
In[8]:=
Click for copyable input
Out[8]=