11:11
<annevk>
If a string cannot be allocated, what exception should be thrown? Should it be RangeError to match the ArrayBuffer case?
13:11
<Aapo Alasuutari>

Would anyone here happen to have more intimate knowledge of how SpiderMonkey's Number.prototype.toString works with non-10 bases? I'm stuck at (1.7976931348623157e308).toString(3): a naïve "divide by 3 until 0" implementation gives one answer which is equal to what Ladybird's result is, but SM and V8 both disagree with this answer to their own ends:

For V8, the result has a huge number of 0s at the end, basically saying "you can't know what the digits here are anyway since this isn't a safe number, so we'll just not try to show them". But! If turned into a BigInt and using BigInt.prototype.toString then a different, more accurate answer appears. For SM, the result for either case is the same as V8's BigInt version. Ladybird's BigInt version also agrees with this.

I think SM's version of Number.prototype.toString seems to be the most accurate and I'd like to reproduce it, but am unable to find the code that they run.

13:19
<nicolo-ribaudo>
If you don't get an answer here, try in #spidermonkey:mozilla.org
14:28
<Richard Gibson>
the spec does not define this case (and see also #2623), but in practice all implementations use RangeError AFAICT
14:33
<annevk>
Richard Gibson: thanks, I suspect that "in practice" isn't necessarily accurate for web platform APIs, but it would be nice if we could align on that error, agreed