diff options
author | Keith Packard <keithp@keithp.com> | 2017-12-02 23:19:44 -0600 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2017-12-02 23:19:44 -0600 |
commit | 577911241db454bc3129fc47566c6a55752c4182 (patch) | |
tree | 32c844fef65d307f472efb9d8a93ea68fa568a68 /src/lisp/ao_lisp.h | |
parent | b986a12b478a6d4ff550786d24aa8628dc0abe32 (diff) |
altos/lisp: Overflow int computations to float
When an int computation overflows, switch to float.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lisp/ao_lisp.h')
-rw-r--r-- | src/lisp/ao_lisp.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lisp/ao_lisp.h b/src/lisp/ao_lisp.h index 1f3fb2b4..7cd8b5a5 100644 --- a/src/lisp/ao_lisp.h +++ b/src/lisp/ao_lisp.h @@ -208,6 +208,8 @@ ao_lisp_bigint_int(uint32_t bi) { #define AO_LISP_MIN_INT (-(1 << (15 - AO_LISP_TYPE_SHIFT))) #define AO_LISP_MAX_INT ((1 << (15 - AO_LISP_TYPE_SHIFT)) - 1) +#define AO_LISP_MIN_BIGINT (-(1 << 24)) +#define AO_LISP_MAX_BIGINT ((1 << 24) - 1) #define AO_LISP_NOT_INTEGER 0x7fffffff |