Version: 2.0.2 (using KDE 3.5.2, Gentoo) Compiler: gcc version 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8) OS: Linux (i686) release 2.6.15-gentoo-r1 log(10^m) = m. In kcalc if m is more than 308, log function gives the wrong answer. For example, Log(10^309) gives 1.797693134862315908e+308
*** Bug 138168 has been marked as a duplicate of this bug. ***
I think this is, because the result is stored in a double and they have an upper limit from 1.79769313486231 57E+308. I now, this isn't a solution, but a possible reason.
Many functions use standard C math functions taking double values. The fix will require changes to the underlying math engine (currently based on libgmp).
The kcalc which will ship with KDE 4.10 has a newly rewritten knumber core library, which aims to make things simpler and easier to code with. After the 4.10 release, I will start to work on using MPFR (A high precision math library which can do trig functions with GMP types). Some work has already been done in this area, but I wanted to minimize the changes in this release to make it easier to find any regressions. Hopefully the following release will have support for higher precision trig functions :-).
Git commit 2a05545830fdc9a2fe6a1d249d9eff52c53b7d1f by Christoph Feck, on behalf of Marcelo Mariano. Committed on 23/06/2019 at 10:21. Pushed by cfeck into branch 'master'. Use MPFR in knumber_float in order to improve floating-point precision Related: bug 148357, bug 407318 FIXED-IN: 19.08.0 Differential Revision: https://phabricator.kde.org/D21495 M +8 -0 CMakeLists.txt M +2 -2 knumber/knumber.cpp M +0 -3 knumber/knumber_base.h M +80 -415 knumber/knumber_float.cpp M +14 -8 knumber/knumber_float.h M +8 -1 knumber/knumber_integer.cpp M +3 -2 knumber/tests/CMakeLists.txt https://commits.kde.org/kcalc/2a05545830fdc9a2fe6a1d249d9eff52c53b7d1f