nanoseconds: Number.MAX_VALUE in precision-exact-mathematical-values
FrankYFTang opened this issue · comments
@anba @ryzokuken @ben-allen @sffc
I have a problem with the test case of
// ~1.7976931348623157e+308 / 10^9
// = ~1.7976931348623157 × 10^299
{
seconds: 0,
milliseconds: 0,
microseconds: 0,
nanoseconds: Number.MAX_VALUE,
},
f
What is the expected output in this test? It is not clear what you intend to test here.
Can you give a link to the test file where this occurs?
Intl.DurationFormat
uses mathematical values, which means Number.MAX_VALUE
mustn't be formatted by Intl.DurationFormat
as a IEEE-754 double value, but instead its exact value must be used. IOW, the output must resemble the output of Intl.NumberFormat("en").format(BigInt(Number.MAX_VALUE))
and not the output of Intl.NumberFormat("en").format(Number.MAX_VALUE)
.
Related: Updates for tc39/proposal-intl-duration-format#173 are in #3988.
ok, that make sense.