WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
166413
Math.min changes behavior with negative zero when tiering up
https://bugs.webkit.org/show_bug.cgi?id=166413
Summary
Math.min changes behavior with negative zero when tiering up
Keith Miller
Reported
2016-12-21 21:46:45 PST
It looks like the code converts the min(a, b) into a < b ? a : b. This does not work for -0.0 and 0.0: Test case: function test(value, iter) { if (Infinity/value !== -Infinity) throw new Error(iter); } noInline(test); function foo(a, b, iter) { test(Math.min(a, b), iter); } noInline(foo); for (let i = 0; i < 10000; i++) { foo(-0.0, 0.0, i); }
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2016-12-21 21:47:23 PST
<
rdar://problem/29783164
>
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