[Webkit-unassigned] [Bug 187650] New: Number.toPrecision returns a wrong value
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jul 13 11:16:43 PDT 2018
https://bugs.webkit.org/show_bug.cgi?id=187650
Bug ID: 187650
Summary: Number.toPrecision returns a wrong value
Product: WebKit
Version: Safari 11
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: isol2 at cin.ufpe.br
Version: JavaScriptCore v233804
OS: Ubuntu 16.04 x64
Hi everyone,
I found an issue on a test case using Number.toPrecision that I don’t know if it is considered as an incompatibility issue between engines or a real bug example, but according with ES6 specs some values are described as "approximately" maybe this is a case of it.
V8, JSC and SpiderMonkey returns the wrong value if param > 17, only Chakra works as expected.
Steps to reproduce:
print(123.56.toPrecision(18) === "123.560000000000000");
print(123.56.toPrecision(18))
Actual results:
False
123.560000000000002
Expected results:
True
123.560000000000000
--
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/20180713/9a507823/attachment.html>
More information about the webkit-unassigned
mailing list