Open
Description
In https://tc39.es/ecma402/#sec-tointlmathematicalvalue, the range of the Intl MV is limited to the range of MVs that round to a finite nonzero Number.
For small numbers, this behavior is exposed for example with this code:
new Intl.NumberFormat("en", { maximumSignificantDigits: 1 }).format("1e-1000")
Firefox correctly prints "0", but Chrome prints "0.0000....00001" (with 1000 fraction digits), which is not spec-compliant. Part of the goal of the spec is to keep the length of the output string on the same order of magnitude as the length of the input string in order to prevent arbitrary-length strings being formattable.
As part of this issue, please thoroughly test the boundaries on ToIntlMathematicalValue
, both upper and lower, as well as the exact largest and smallest string values that are admissible.
CC @FrankYFTang
Metadata
Metadata
Assignees
Labels
No labels