From c43eb573779da0965ecb84feb23e21b39405bb4b Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 27 Apr 2016 06:12:03 -0700 Subject: Adding fixnum-min and fixnum-max variables. * arith.c (arith_init): Registered fixnum-min and fixnum-max variables. * txr.1: Documented. --- arith.c | 2 ++ txr.1 | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/arith.c b/arith.c index 1083c9f9..69cd2962 100644 --- a/arith.c +++ b/arith.c @@ -2355,6 +2355,8 @@ void arith_init(void) reg_varl(intern(lit("flo-max"), user_package), flo(DBL_MAX)); reg_varl(intern(lit("flo-min"), user_package), flo(DBL_MIN)); reg_varl(intern(lit("flo-epsilon"), user_package), flo(DBL_EPSILON)); + reg_varl(intern(lit("fixnum-min"), user_package), num(NUM_MIN)); + reg_varl(intern(lit("fixnum-max"), user_package), num(NUM_MAX)); #ifndef M_PI #define M_PI 3.14159265358979323846 diff --git a/txr.1 b/txr.1 index c31def62..26ed0eec 100644 --- a/txr.1 +++ b/txr.1 @@ -28202,6 +28202,21 @@ is a floating-point number, then it is converted by as if by the function .codn int-flo . +.coNP Variables @ fixnum-min and @ fixnum-max +.desc +These variables hold, respectively, the most negative value of the +.code fixnum +integer type, and its most positive value. Integer values +from +.code fixnum-min +to +.code fixnum-max +are all of type +.codn fixnum . +Integers outside of this range are +.code bignum +integers. + .coNP Variables @, flo-min @ flo-max and @ flo-epsilon .desc These variables hold, respectively: the smallest positive floating-point -- cgit v1.2.3