[Webkit-unassigned] [Bug 15631] Arithmetic errors with LOG10E

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 12 18:39:08 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=15631





------- Comment #1 from hortont424 at gmail.com  2009-01-12 18:39 PDT -------
I don't think this is actually a calculation problem, nor a problem with the
constant.

Floating point representations are fundamentally flawed - not all numbers can
be represented, and you will /quite/ often get strange errors like the one you
described, even with very simple tests.

All numbers in JavaScriptCore (as far as I know) are represented internally as
double-precision floating point numbers, thus everything is susceptible to this
problem.

Take a peek:

http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems

or, if you're really interested:

http://docs.sun.com/source/806-3568/ncg_goldberg.html

But I might be wrong. The fact that the constant is different than in FF/IE is
strange, though. Actually, Mathematica agrees with FF/IE (in that LOG10E should
be ~0.4342944819032518276511)... so maybe it /is/ a bug!


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list