Bug 138168 - a special calculation displays wrong result: log(192!)/log(2)
Summary: a special calculation displays wrong result: log(192!)/log(2)
Status: RESOLVED DUPLICATE of bug 132158
Alias: None
Product: kcalc
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Klaus Niederkrüger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-30 16:24 UTC by aeinstein
Modified: 2007-01-16 09:27 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***