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
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 43s
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user