-
Notifications
You must be signed in to change notification settings - Fork 251
Open
Description
Environment: XS 17.9.1, slot 32 bytes, ID 4 bytes
Description
BigInt.prototype.toString with a radix of 2, 8, or 16 is incorrectly truncated (and in the case of base 8, apparently truncated at an internal boundary that changes an output character).
Steps to Reproduce
const numberMax = BigInt(Number.MAX_VALUE);
print(numberMax.toString(16));
print(numberMax.toString(8));
print(numberMax.toString(2));Actual behavior
fffffffffffff80000000000
77777777777777777600000000000000
111111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000000
Expected behavior
fffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
177777777777777777400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-bigint.prototype.tostring
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels