GNOME Bugzilla – Bug 728657
Calculating log(x) for x 0<x<1 results in error
Last modified: 2014-12-22 20:48:15 UTC
Hi, if you try to calculate i.e. log(1/2), gnome-calculator answers with "*** ERROR OCCURRED IN LNS, NEWTON ITERATION NOT CONVERGING PROPERLY ***". Calculating values bigger than 1 is fine, but calculating negative values results wrong values i think. log(-1) should produce pi*i but shows 1,364376354i Im running gnome-calculator 3.12.1 on ArchLinux with german locale Regards
you are confusing log and ln ln -1 = pi * i log -1 = ln -1 / ln 10 = 1.36... * i
I can reproduce the bug too. It's also affecting numbers bigger than one, e.g. log_2(15) in my case.. I've tested it in gnome-calculator build from source got via jhbuild on 2014-05-19.
Hi, I can reproduce the bug too, with either log(1/2) or log_2(15). I encountered this bus when trying to evaluate this formula: 3×ln (1−e(−(500×3)÷10000)). gnome-calculator manages to evaluate it when replacing 500 by 499 or 501 in the above formula I am using gnome-calculator 3.12.3 on Arch Linux (French locale, however I do not think locale matters).
*** Bug 734607 has been marked as a duplicate of this bug. ***
Moritz, Thank you for the bug report. The issue has been fixed in master branch. The Calculator now generates correct answer for all the inputs discussed in the conversation. Reference commit : https://git.gnome.org/browse/gnome-calculator/commit/?id=0e863eeb121d670d8f5266a82b6152e98b2428ea Hope this helps.. :)