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
Radar WebKit Bug Importer
Comment 1 2016-12-21 21:47:23 PST
Note You need to log in before you can comment on or make changes to this bug.