WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 123624
Precision errors in Math.cbrt() on GTK, EFL
https://bugs.webkit.org/show_bug.cgi?id=123624
Summary
Precision errors in Math.cbrt() on GTK, EFL
Zan Dobersek
Reported
2013-11-01 10:47:18 PDT
Math.cbrt(), introduced in
r158401
, is returning unexpected values in the js/math.html layout test (and the related stress tests) that are indicating precision errors. This only occurs on GTK and EFL.
http://trac.webkit.org/changeset/158401
The precision error originates in the underlying cbrt() call in JSC::mathProtoFuncCbrt. pow() works as expected, FWIW. Diff: --- /home/slave/webkitgtk/gtk-linux-64-release/build/layout-test-results/js/math-expected.txt +++ /home/slave/webkitgtk/gtk-linux-64-release/build/layout-test-results/js/math-actual.txt @@ -184,8 +184,8 @@ PASS Math.cbrt(NaN) is NaN PASS Math.cbrt(0) is 0 PASS Math.cbrt(-0) is -0 -PASS Math.cbrt(27) is 3 -PASS Math.cbrt(-27) is -3 +FAIL Math.cbrt(27) should be 3. Was 3.0000000000000004. +FAIL Math.cbrt(-27) should be -3. Was -3.0000000000000004. PASS Math.cbrt(Infinity) is Infinity PASS Math.cbrt(-Infinity) is -Infinity PASS Math.cosh(NaN) is NaN
Attachments
Patch
(1.89 KB, patch)
2013-11-02 08:20 PDT
,
Zan Dobersek
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Oliver Hunt
Comment 1
2013-11-01 15:28:54 PDT
Try changing the test to +/-8 -> +/-2
Zan Dobersek
Comment 2
2013-11-02 08:20:07 PDT
Created
attachment 215808
[details]
Patch
Csaba Osztrogonác
Comment 3
2013-11-03 13:56:03 PST
Comment on
attachment 215808
[details]
Patch LGTM
WebKit Commit Bot
Comment 4
2013-11-03 14:24:57 PST
Comment on
attachment 215808
[details]
Patch Clearing flags on attachment: 215808 Committed
r158545
: <
http://trac.webkit.org/changeset/158545
>
WebKit Commit Bot
Comment 5
2013-11-03 14:25:00 PST
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 6
2013-11-03 17:02:06 PST
This patch just stops testing for this bug, it doesn’t fix the bug. Do we want to fix the bug?
Oliver Hunt
Comment 7
2013-11-04 10:01:27 PST
(In reply to
comment #6
)
> This patch just stops testing for this bug, it doesn’t fix the bug. Do we want to fix the bug?
The bug is lack of precision in the linux/gtk lib math, it can't be fixed in JSC short of us reimplementing cbrt entirely
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug