# Value of sine(π)

1. Jul 21, 2014

I know it should be absolute zero, but in a scientific calculator, which is an app actually, its value is shown 1.224646799x10^(-16). The value is so small, but it is not zero. I wanted to be sure that this is a bug or really it has a value. App's name is Calc&Graph, on Google play.

2. Jul 21, 2014

### maajdl

You could say it is a bug.
You could also consider that any calculator only returns an approximate value.
Often, on handlheld calculators, the approximation for trig functions is based on the CORDIC algorithm.
http://en.wikipedia.org/wiki/CORDIC
It is much more precise than a MacLaurin development would be, because it relies on exact trig relations.
However, the arithmetic calculations are carried out with a finite number of digits (bits) and therefore even multiplications or divisions are approximate.

You need also to take care of the precision of the data you have input to the calculator.
For example, this is an "exact" result:

Sin[3.14159265358979] = 3.23109*10^-15

but it could be that the precision of the calculator can't handle more decimals after 3.1415...879 .

3. Jul 21, 2014

### pasmith

$\sin(\pi) = 0$.

Calculators do not understand irrational numbers; they can only ever deal with a finite subset of the rational numbers. Occasionally this will cause them to get things wrong. But a decent calculator should be able to tell the difference between "sine of (user pressed the pi button)" and "sine of (some number starting with 3.14)" and will return the correct value for the former.

This can also cause discrepancies between "user wants the cube root of -27, apparently that's -3" and "user wants to raise -27 to the power 0.333333333333; I don't know how to do that with a negative base".

Last edited: Jul 21, 2014
4. Jul 21, 2014

Oh thank you, I got it. That is calculating value of sine(3.14...), and the close it is to π, closer my answer is to zero. Thanks, I didn't think of that.