Summary: | Finish MPFR support | ||
---|---|---|---|
Product: | [Applications] kcalc | Reporter: | Aaron Williams <aaronw> |
Component: | general | Assignee: | Evan Teran <evan.teran> |
Status: | RESOLVED FIXED | ||
Severity: | task | CC: | cfeck, marcelo.hs.mariano |
Priority: | NOR | ||
Version First Reported In: | 19.04 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/kcalc/2a05545830fdc9a2fe6a1d249d9eff52c53b7d1f | Version Fixed In: | 19.08.0 |
Sentry Crash Report: |
Description
Aaron Williams
2019-05-08 01:03:47 UTC
Is your KCalc compiled using MPFR dependency? You can find out by using 'ldd' command in Konsole: ldd /usr/bin/kcalc | grep mp This should show both 'libgmp' as well as 'libmpfr'. Never mind; MPFR support was disabled with https://commits.kde.org/kcalc/9e1dd53d4cda09d2d395dbd5caa9f403d36c9b03 ldd /usr/bin/kcalc | grep mp libgmp.so.10 => /usr/lib64/libgmp.so.10 (0x00007fb0a9875000) libKF5Completion.so.5 => /usr/lib64/libKF5Completion.so.5 (0x00007fb0a09dc000) This is the version supplied by OpenSUSE in their latest up-to-date repository (not the standard repository). According to a friend of mine who developed his own calculator, he says that libgmp has a lot of accuracy bugs so he is using a different library. I can find out which one he uses. His calculator did give the correct answer. My coworker suggests using libarb instead of libgmp since libgmp cannot guarantee precision. See http://arblib.org He ran into the same issue when he developed his calculator app using libgmp as I ran into with KCalc and he switched to libarb to solve that problem. I wrote the knumber library that wraps gmp in kcalc. It is definitely in need of some modernization and perhaps arblib is worth looking into as a replacement for it's big number capabilities. I'll look into it! Add review request https://phabricator.kde.org/D21495. 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 132158, bug 148357 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 |