Skip to content
This repository was archived by the owner on Jan 9, 2026. It is now read-only.
This repository was archived by the owner on Jan 9, 2026. It is now read-only.

int-to-str does not work for negative numbers #1049

@jwiegley

Description

@jwiegley

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions