Lack of precision for sin/cos
Originally reported on Google Code with ID 8
What steps will reproduce the problem?
1. sin( pi ) = 0 (0.05480366514878953089 is returned)
2. cos( pi ) = 1 (0.99849714986386383364 is returned)
What is the expected output? What do you see instead?
0 and 1
Reported by e8johan
on 2006-09-08 13:07:02
Comments (8)
-
Account Deleted -
Account Deleted ```
GNU libc returns sin(M_PI) = 1.22461e-16 and sinl(M_PIl) = -5.42101e-20 Still, a calculator that is not limited by speed should do it better. My pocket calculator returns sin(pi) = 0 and sin(pi - 10^-5) = 0.00001 ```
Reported by `lopezibanez` on 2006-09-11 00:37:09
-
Account Deleted ``` And by the way, cos(pi) = -1 ```
Reported by `lopezibanez` on 2006-09-11 00:38:41
-
Account Deleted ``` And by the way 2, Google's calculator is awesome: http://www.google.com/intl/en/help/features.html#calculator ```
Reported by `lopezibanez` on 2006-09-11 00:41:41
-
Account Deleted ``` Ups! Stupid as I am sometimes, I was using degrees instead of radians.SpeedCrunch gives the correct answer when using radians. Please close this and let's forget about it. ```
Reported by `lopezibanez` on 2006-09-12 14:18:09
-
Account Deleted ``` Closing it. ```
Reported by `ariya.hidayat` on 2006-10-08 04:32:28 - Status changed: `Verified`
-
repo owner - changed milestone to 0.7
- edited description
-
repo owner - changed status to closed
- Log in to comment
``` This bug is present also in KCalc. ```
Reported by `lopezibanez` on 2006-09-11 00:14:49