[Webkit-unassigned] [Bug 187650] Number.toPrecision returns a wrong value

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 6 17:46:26 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=187650

Alexey Shvayka <shvaikalesh at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |shvaikalesh at gmail.com
         Resolution|---                         |WONTFIX

--- Comment #1 from Alexey Shvayka <shvaikalesh at gmail.com> ---
(In reply to isol2 from comment #0)
> 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. 

Thank you for report!

This is most certainly a IEEE 754 precision issue like 0.1 + 0.2 != 0.3.
The spec prose is worded to highlight the inaccuracy: please see step 10.a of https://tc39.es/ecma262/#sec-number.prototype.toprecision.

-- 
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/20210507/3c411341/attachment.htm>


More information about the webkit-unassigned mailing list