numeric-limitsstanza

Numeric limits in stanza


In stanza, I would like to get the numeric limits (min and max) of Int and Double types. In C++, there are INT_MIN, INT_MAX, DBL_MIN and DBL_MAX.


Solution

  • The following special constants are declared in core.

    BYTE-MAX
    BYTE-MIN
    INT-MAX
    INT-MIN
    LONG-MAX
    LONG-MIN
    FLOAT-MAX
    FLOAT-MIN-NORMAL
    FLOAT-MIN
    FLOAT-NAN
    FLOAT-POSITIVE-INFINITY
    FLOAT-NEGATIVE-INFINITY
    DOUBLE-MAX
    DOUBLE-MIN-NORMAL
    DOUBLE-MIN
    DOUBLE-NAN
    DOUBLE-POSITIVE-INFINITY
    DOUBLE-NEGATIVE-INFINITY
    

    Patrick