serenity
serenity copied to clipboard
LibJS: toString() on numbers greater than or equal to 2 ** 64 returns "0."
Example:
(2 ** 64).toString()
Expected: "18446744073709552000"
Actual: "0."
So a fix would be to check for a possible overflows and falback to floats/doubles in these cases
Looks like can be closed now.
We still get a wrong result as far as I can tell, 18446744073709552046
instead of 18446744073709552000
Looks like can be closed now.
If you're talking about #15377 being merged indeed this only fixed parsing doubles not to_string the opposite direction as Idan shows
This serializes correctly today.