Do you think you understand enough about how computers and calculators find numerical solutions for real number problems? Try to compute on your favorite calculator or computer. If you are lucky, it will indicate an error. Even Mathematica 4.0 reports wrong answers as witnessed below.
The following answers were computed in Mathematica 4.0 -- and are totally WRONG!
The following asks that the exact value Sin[Exp] be computed with the ANSWER precise to 18 digits.
Mathematica operation N[___, m] will give reliable answers by using advanced software algorithms to compute to the desired precision for any m>16. If the m argument is missing (N[___]), or for m<=16, Mathematica will use hardware computations where each value is restricted by hardware to have about 16 significant digits. This is not enough digits to compute as we explain below. The incorrect values of the previous section can be traced to this hardware restriction.
How would you find a sin value for a large argument, such as 181π / 6? Subtract off multiples of 2π. Since 180π / 6 is 30π, this leaves only 1π / 6 and sin(181π / 6) = sin(181π / 6 - 30π) = sin(π / 6) = 1/2. Let's try the same thing with sin(), starting with a value for that has 22 significant digits.
First, let's find n so that (n 2 Pi) < Exp < ((n+1)2 Pi).
This is the exact integer n. Let's compute (n 2 Pi) with 22 significant digits.
Now, subtract Exp - (n 2 Pi). Notice that e40 and n2pi agree to 17 digits.
See the loss of significant digits! But we still get 5 reliable digits in the answer.
The problem with most calculators and computers, including decimals in Mathematica, is that only about 16 digits are saved in each calculation, so that subtraction of e40 and n2pi leaves only incorrect noise.