Just poking around and trying to remember where the problems are.

This commit is contained in:
Simon Brooke 2023-04-08 10:36:59 +01:00
parent fae4a4d444
commit cbcced70b2
No known key found for this signature in database
GPG key ID: A7A4F18D1D4DF987
8 changed files with 240 additions and 218 deletions

View file

@ -13,10 +13,18 @@
#define PEANO_H
/**
* The maximum value we will allow in an integer cell.
* The maximum value we will allow in an integer cell: one less than 2^60:
* (let ((s (make-string-output-stream)))
* (format s "0x0~XL" (- (expt 2 60) 1))
* (string-downcase (get-output-stream-string s)))
* "0x0fffffffffffffffl"
*
* So left shifting and right shifting by 60 bits is correct.
*/
#define MAX_INTEGER ((__int128_t)0x0fffffffffffffffL)
#define INTEGER_BIT_SHIFT (60)
bool zerop( struct cons_pointer arg );
struct cons_pointer negative( struct cons_pointer arg );