GNOME Bugzilla – Bug 571007
Error in trigonometric functions
Last modified: 2009-02-28 06:40:37 UTC
Please describe the problem: Tan(90) is undefined (Though conceptually one usually thinks of it as infinity). When you enter Tan(90) into gcalctool you get Tan(90°)=-8.618206661e+214 which is a finite number. Though I understand a number of this magnitude in practice, is though of as infinite, it would be nice if the calculator returned the correct answer. Steps to reproduce: 1. Enter Tan(90) into gcalctool 2. See finite number 3. Actual results: See the finite number: -8.618206661e+214 Expected results: return "undefined" or at least "infinity" Does this happen every time? Yes Other information:
This bug was reported in Launchpad for Ubuntu: https://bugs.launchpad.net/ubuntu/+source/gcalctool/+bug/327019
Confirmed. I believe this is due to the rounding from degrees to radian.
This is because cos(90) != 0 due to rounding errors (bug #527540)
Fixed in 5.26.0: http://svn.gnome.org/viewvc/gcalctool?view=revision&revision=2401