Bug 181875 - sin and cos function aren't working
Summary: sin and cos function aren't working
Status: RESOLVED FIXED
Alias: None
Product: kcalc
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Klaus Niederkrüger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-25 16:18 UTC by Salvo "LtWorf" Tomaselli
Modified: 2009-03-18 14:19 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Salvo "LtWorf" Tomaselli 2009-01-25 16:18:56 UTC
Version:           KCalc: 2.4 (using KDE 4.1.96)
OS:                Linux
Installed from:    Debian testing/unstable Packages

On a first look, looks like that sin and cos function return some kind of random value.
In fact they return the same result of the previous operation. And when another operation is done, they will result the same result of the operation.

Makes kcalc quite useless...
Comment 1 Salvo "LtWorf" Tomaselli 2009-01-25 16:49:25 UTC
It appears that angles in radiants work, but not in deg.
Comment 2 David Johnson 2009-01-29 22:54:54 UTC
I'm not able to reproduce this on a 32-bit system built from trunk. I do not have a 64-bit system for testing. Can you provide steps and results, and more information on your system? 
Comment 3 Salvo "LtWorf" Tomaselli 2009-01-30 19:53:12 UTC
Just doing 4+4 ENTER
and 30 sin
will result 8.

What kind of additional information you need?
Comment 4 David Johnson 2009-01-31 22:08:06 UTC
SVN commit 919386 by brandybuck:

BUG: 181875
kcalc was not initializing the angle mode. This caused the trig functions to
be noops. The fix was to save/restore the angle mode as a configuration item.
The angle mode is now initialized from the config. Also did the same for
the numeric base.


 M  +23 -9     kcalc.cpp  
 M  +6 -5      kcalc.h  
 M  +8 -0      kcalc.kcfg  
 M  +1 -3      kcalc_settings.kcfgc  


WebSVN link: http://websvn.kde.org/?view=rev&revision=919386