After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 571007 - Error in trigonometric functions
Error in trigonometric functions
Status: RESOLVED FIXED
Product: gnome-calculator
Classification: Core
Component: general
5.24.x
Other All
: Normal normal
: ---
Assigned To: gcalctool maintainers
gcalctool maintainers
Depends on: 527540
Blocks:
 
 
Reported: 2009-02-09 00:22 UTC by Joseph Smidt
Modified: 2009-02-28 06:40 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24



Description Joseph Smidt 2009-02-09 00:22:35 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:
Comment 1 Joseph Smidt 2009-02-09 00:23:58 UTC
This bug was reported in Launchpad for Ubuntu: https://bugs.launchpad.net/ubuntu/+source/gcalctool/+bug/327019
Comment 2 Robert Ancell 2009-02-15 08:41:30 UTC
Confirmed.  I believe this is due to the rounding from degrees to radian.
Comment 3 Robert Ancell 2009-02-28 04:06:31 UTC
This is because cos(90) != 0 due to rounding errors (bug #527540)
Comment 4 Robert Ancell 2009-02-28 06:40:37 UTC
Fixed in 5.26.0:
http://svn.gnome.org/viewvc/gcalctool?view=revision&revision=2401