pact
pact copied to clipboard
int-to-str does not work for negative numbers
This was reported on Discord by user Luzzotica:
<interactive>:1:0: Numeric.showIntAtBase: applied to negative number -31535940
When trying to call str-to-int on my number "-31535940".
Another user offered this workaround:
(defun int-to-str*(x)
(if (< x 0)
(+ "-" (int-to-str 10 (- x)) )
(int-to-str 10 x))))
However, Pact should support conversion of negative numbers.