Bug 138168

Summary: a special calculation displays wrong result: log(192!)/log(2)
Product: [Applications] kcalc Reporter: aeinstein <chr_bl>
Component: generalAssignee: Klaus Niederkrüger <kniederk>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description aeinstein 2006-11-30 16:24:42 UTC
Version:           2.0.1 (using KDE KDE 3.5.1)
Installed from:    SuSE RPMs
OS:                Linux

My OS is German Suse Linux 10.1
My Processor: Intel(R) Pentium(R) 4 CPU 3.00 GHz

I did this:

192   display:192 (n=192)
x!    display:3,54996793147+356
log   display:1,79769313486e+308  <---wrong!!! it must be something about 356,.....

the highest n that gives the right value is 170. All numbers above 170 cause a wrong result.
Problem with log-function???

Christoph
Comment 1 Klaus Niederkrüger 2006-12-13 00:57:03 UTC
For now kcalc does standard arithmetic with arbitrary precision numbers, but the special functions like sin, cos, log, etc. are implemented by using the standard double-functions of the C-library. This gives the observed problems.

What to do about this is unclear. Either we could link with another library, implementing also arbitrary precision for special functions, or?? Don't know.

Klaus
Comment 2 Klaus Niederkrüger 2007-01-16 09:27:57 UTC

*** This bug has been marked as a duplicate of 132158 ***