diff options
author | Eduardo Julian | 2020-08-07 20:56:37 -0400 |
---|---|---|
committer | Eduardo Julian | 2020-08-07 20:56:37 -0400 |
commit | a84e20e455f4d8ab86dd5a20c333bace11a56104 (patch) | |
tree | 6742d8b32eacfa9856b05c6110995a94402a5ec6 /stdlib/source/lux/data/number/int.lux | |
parent | 268c21aa6867263b890f5dd2b3038a675bc915f7 (diff) |
Some fixes.
Diffstat (limited to 'stdlib/source/lux/data/number/int.lux')
-rw-r--r-- | stdlib/source/lux/data/number/int.lux | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/stdlib/source/lux/data/number/int.lux b/stdlib/source/lux/data/number/int.lux index 80842692e..a5c7cbbea 100644 --- a/stdlib/source/lux/data/number/int.lux +++ b/stdlib/source/lux/data/number/int.lux @@ -14,7 +14,8 @@ [text (#+ Char)] ["." maybe]]] ["." // #_ - ["#." nat]]) + ["#." nat] + ["#." i64]]) (def: #export (= reference sample) {#.doc "Int(eger) equivalence."} @@ -150,8 +151,14 @@ (Interval Int) (def: &enum ..enum) - (def: top +9,223,372,036,854,775,807) - (def: bottom -9,223,372,036,854,775,808)) + (def: top + ## +9,223,372,036,854,775,807 + (let [half (//i64.left-shift 62 +1)] + (+ half + (dec half)))) + (def: bottom + ## -9,223,372,036,854,775,808 + (//i64.left-shift 63 +1))) (template [<name> <compose> <identity>] [(structure: #export <name> |