WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
200412
Jitted code gives different floating point result
https://bugs.webkit.org/show_bug.cgi?id=200412
Summary
Jitted code gives different floating point result
Vanessa Freudenberg
Reported
2019-08-02 17:10:41 PDT
Created
attachment 375469
[details]
html and js demonstrating the bug Example code (runnable at
https://croquet.studio/static/math-bug.html
): const pow = require("@stdlib/math/base/special/pow"); window.StdlibMath = { pow }; const func = () => window.StdlibMath.pow( 8.96096203115875, -0.6403121474522467 ); console.log(func()); let x = 0; for (let i = 0; i < 1000000; i++) x += func(); console.log(func()); This code prints the same result twice if running in the Safari debugger, and on every other browser (Chrome, Firefox): 0.24558156189439845 0.24558156189439845 But the second result is different when run without debugger in Safari on Mac and iOS. 0.24558156189439845 0.24558156189439848 Re-running the code also sometimes prints a different second result randomly. (we're using stdlib-js to avoid the built-in transcendental Math functions because we need deterministic results)
Attachments
html and js demonstrating the bug
(19.53 KB, application/zip)
2019-08-02 17:10 PDT
,
Vanessa Freudenberg
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2019-08-04 11:21:18 PDT
<
rdar://problem/53919887
>
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