Value of Sine(π) - Calc&Graph on Google Play

  • Thread starter Thread starter Adit
  • Start date Start date
  • Tags Tags
    Value
Adit
Messages
3
Reaction score
2
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.
 
  • Like
Likes Modulo2pi
Physics news on Phys.org
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 .
 
  • Like
Likes Modulo2pi
Adit said:
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.

\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:
  • Like
Likes Modulo2pi
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.
 
  • Like
Likes Modulo2pi
The world of 2\times 2 complex matrices is very colorful. They form a Banach-algebra, they act on spinors, they contain the quaternions, SU(2), su(2), SL(2,\mathbb C), sl(2,\mathbb C). Furthermore, with the determinant as Euclidean or pseudo-Euclidean norm, isu(2) is a 3-dimensional Euclidean space, \mathbb RI\oplus isu(2) is a Minkowski space with signature (1,3), i\mathbb RI\oplus su(2) is a Minkowski space with signature (3,1), SU(2) is the double cover of SO(3), sl(2,\mathbb C) is the...

Similar threads

Replies
1
Views
1K
Replies
8
Views
2K
Replies
10
Views
10K
Replies
19
Views
4K
Replies
3
Views
2K
Replies
20
Views
4K
Back
Top