Bug 181875

Summary: sin and cos function aren't working
Product: [Applications] kcalc Reporter: Salvo "LtWorf" Tomaselli <tiposchi>
Component: generalAssignee: Klaus Niederkrüger <kniederk>
Status: RESOLVED FIXED    
Severity: normal CC: david, philip.smith.ucl
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:

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