[Webkit-unassigned] [Bug 204457] New: Math.max() can yield the wrong result for max(-0, 0).
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Nov 21 09:47:47 PST 2019
https://bugs.webkit.org/show_bug.cgi?id=204457
Bug ID: 204457
Summary: Math.max() can yield the wrong result for max(-0, 0).
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: mark.lam at apple.com
Spec says 0 is greater than -0. See https://www.ecma-international.org/ecma-262/6.0/#sec-math.max.
POC:
function foo(x, y) {
return Math.max(x, y);
}
for (var i = 0; i < 30000; ++i) {
x = 100/foo(0.0, -0.0);
if (x < 0)
throw "FAILED";
}
Expected: should run to completion silently.
Actual: throws "FAILED".
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20191121/e5fbf42f/attachment.htm>
More information about the webkit-unassigned
mailing list