js-on-sx: Number.prototype.toString(radix) avoids rational div-by-zero
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 43s

This commit is contained in:
2026-05-10 02:23:38 +00:00
parent ad897122d7
commit 1a34cc4456
2 changed files with 5 additions and 3 deletions

View File

@@ -474,9 +474,9 @@
(fn
(n radix)
(cond
((and (number? n) (not (= n n))) "NaN")
((= n (/ 1 0)) "Infinity")
((= n (/ -1 0)) "-Infinity")
((and (number? n) (js-number-is-nan n)) "NaN")
((= n (js-infinity-value)) "Infinity")
((= n (- 0 (js-infinity-value))) "-Infinity")
((or (= radix 10) (= radix nil) (js-undefined? radix))
(js-to-string n))
(else