diff options
Diffstat (limited to 'src/algebra/strap')
-rw-r--r-- | src/algebra/strap/DFLOAT.lsp | 41 | ||||
-rw-r--r-- | src/algebra/strap/INS-.lsp | 3 | ||||
-rw-r--r-- | src/algebra/strap/INT.lsp | 5 | ||||
-rw-r--r-- | src/algebra/strap/SINT.lsp | 12 |
4 files changed, 29 insertions, 32 deletions
diff --git a/src/algebra/strap/DFLOAT.lsp b/src/algebra/strap/DFLOAT.lsp index 43c27b6f..88f168b4 100644 --- a/src/algebra/strap/DFLOAT.lsp +++ b/src/algebra/strap/DFLOAT.lsp @@ -88,31 +88,31 @@ (|check-subtype| (> #0# 0) '(|PositiveInteger|) #0#))))))) (PUT '|DFLOAT;max;$;12| '|SPADreplace| - '(XLAM NIL MOST-POSITIVE-LONG-FLOAT)) + '(XLAM NIL |$DoubleFloatMaximum|)) -(DEFUN |DFLOAT;max;$;12| ($) MOST-POSITIVE-LONG-FLOAT) +(DEFUN |DFLOAT;max;$;12| ($) |$DoubleFloatMaximum|) (PUT '|DFLOAT;min;$;13| '|SPADreplace| - '(XLAM NIL MOST-NEGATIVE-LONG-FLOAT)) + '(XLAM NIL |$DoubleFloatMinimum|)) -(DEFUN |DFLOAT;min;$;13| ($) MOST-NEGATIVE-LONG-FLOAT) +(DEFUN |DFLOAT;min;$;13| ($) |$DoubleFloatMinimum|) (DEFUN |DFLOAT;order;$I;14| (|a| $) (- (+ (FLOAT-DIGITS 0.0) (SPADCALL |a| (|getShellEntry| $ 28))) 1)) (PUT '|DFLOAT;Zero;$;15| '|SPADreplace| - '(XLAM NIL (FLOAT 0 MOST-POSITIVE-LONG-FLOAT))) + '(XLAM NIL (FLOAT 0 |$DoubleFloatMaximum|))) -(DEFUN |DFLOAT;Zero;$;15| ($) (FLOAT 0 MOST-POSITIVE-LONG-FLOAT)) +(DEFUN |DFLOAT;Zero;$;15| ($) (FLOAT 0 |$DoubleFloatMaximum|)) (PUT '|DFLOAT;One;$;16| '|SPADreplace| - '(XLAM NIL (FLOAT 1 MOST-POSITIVE-LONG-FLOAT))) + '(XLAM NIL (FLOAT 1 |$DoubleFloatMaximum|))) -(DEFUN |DFLOAT;One;$;16| ($) (FLOAT 1 MOST-POSITIVE-LONG-FLOAT)) +(DEFUN |DFLOAT;One;$;16| ($) (FLOAT 1 |$DoubleFloatMaximum|)) (DEFUN |DFLOAT;exp1;$;17| ($) - (/ (FLOAT 534625820200 MOST-POSITIVE-LONG-FLOAT) - (FLOAT 196677847971 MOST-POSITIVE-LONG-FLOAT))) + (/ (FLOAT 534625820200 |$DoubleFloatMaximum|) + (FLOAT 196677847971 |$DoubleFloatMaximum|))) (PUT '|DFLOAT;pi;$;18| '|SPADreplace| '(XLAM NIL PI)) @@ -179,10 +179,10 @@ (|DFLOAT;checkComplex| (EXPT |x| |y|) $)) (PUT '|DFLOAT;coerce;I$;35| '|SPADreplace| - '(XLAM (|i|) (FLOAT |i| MOST-POSITIVE-LONG-FLOAT))) + '(XLAM (|i|) (FLOAT |i| |$DoubleFloatMaximum|))) (DEFUN |DFLOAT;coerce;I$;35| (|i| $) - (FLOAT |i| MOST-POSITIVE-LONG-FLOAT)) + (FLOAT |i| |$DoubleFloatMaximum|)) (PUT '|DFLOAT;exp;2$;36| '|SPADreplace| 'EXP) @@ -315,7 +315,7 @@ (DEFUN |DFLOAT;wholePart;$I;71| (|x| $) (FIX |x|)) (DEFUN |DFLOAT;float;2IPi$;72| (|ma| |ex| |b| $) - (* |ma| (EXPT (FLOAT |b| MOST-POSITIVE-LONG-FLOAT) |ex|))) + (* |ma| (EXPT (FLOAT |b| |$DoubleFloatMaximum|) |ex|))) (PUT '|DFLOAT;convert;2$;73| '|SPADreplace| '(XLAM (|x|) |x|)) @@ -372,7 +372,7 @@ (RETURN (SEQ (LETT |n| (FIX |x|) |DFLOAT;retract;$I;79|) (EXIT (COND - ((= |x| (FLOAT |n| MOST-POSITIVE-LONG-FLOAT)) |n|) + ((= |x| (FLOAT |n| |$DoubleFloatMaximum|)) |n|) ('T (|error| "Not an integer")))))))) (DEFUN |DFLOAT;retractIfCan;$U;80| (|x| $) @@ -380,7 +380,7 @@ (RETURN (SEQ (LETT |n| (FIX |x|) |DFLOAT;retractIfCan;$U;80|) (EXIT (COND - ((= |x| (FLOAT |n| MOST-POSITIVE-LONG-FLOAT)) + ((= |x| (FLOAT |n| |$DoubleFloatMaximum|)) (CONS 0 |n|)) ('T (CONS 1 "failed")))))))) @@ -404,17 +404,16 @@ (LETT |x| (FLOAT-SIGN 1.0 |x|) |DFLOAT;manexp|) (COND - ((< MOST-POSITIVE-LONG-FLOAT |x|) + ((< |$DoubleFloatMaximum| |x|) (PROGN (LETT #0# (CONS (+ (* |s| - (SPADCALL - MOST-POSITIVE-LONG-FLOAT + (SPADCALL |$DoubleFloatMaximum| (|getShellEntry| $ 27))) 1) - (SPADCALL MOST-POSITIVE-LONG-FLOAT + (SPADCALL |$DoubleFloatMaximum| (|getShellEntry| $ 28))) |DFLOAT;manexp|) (GO #0#)))) @@ -610,9 +609,9 @@ (SPADCALL |x| (/ (FLOAT |n| - MOST-POSITIVE-LONG-FLOAT) + |$DoubleFloatMaximum|) (FLOAT |d| - MOST-POSITIVE-LONG-FLOAT)) + |$DoubleFloatMaximum|)) (|getShellEntry| $ 59))))))))))) #0# (EXIT #0#))))) diff --git a/src/algebra/strap/INS-.lsp b/src/algebra/strap/INS-.lsp index a342958f..1d3cdcca 100644 --- a/src/algebra/strap/INS-.lsp +++ b/src/algebra/strap/INS-.lsp @@ -52,8 +52,7 @@ (|getShellEntry| $ 30))) (DEFUN |INS-;convert;SDf;11| (|x| $) - (FLOAT (SPADCALL |x| (|getShellEntry| $ 27)) - MOST-POSITIVE-LONG-FLOAT)) + (FLOAT (SPADCALL |x| (|getShellEntry| $ 27)) |$DoubleFloatMaximum|)) (DEFUN |INS-;convert;SIf;12| (|x| $) (SPADCALL (SPADCALL |x| (|getShellEntry| $ 27)) diff --git a/src/algebra/strap/INT.lsp b/src/algebra/strap/INT.lsp index 61a4dfb8..bee38736 100644 --- a/src/algebra/strap/INT.lsp +++ b/src/algebra/strap/INT.lsp @@ -135,10 +135,9 @@ (SPADCALL |x| (|getShellEntry| $ 45))) (PUT '|INT;convert;$Df;24| '|SPADreplace| - '(XLAM (|x|) (FLOAT |x| MOST-POSITIVE-LONG-FLOAT))) + '(XLAM (|x|) (FLOAT |x| |$DoubleFloatMaximum|))) -(DEFUN |INT;convert;$Df;24| (|x| $) - (FLOAT |x| MOST-POSITIVE-LONG-FLOAT)) +(DEFUN |INT;convert;$Df;24| (|x| $) (FLOAT |x| |$DoubleFloatMaximum|)) (DEFUN |INT;convert;$If;25| (|x| $) (SPADCALL |x| (|getShellEntry| $ 50))) diff --git a/src/algebra/strap/SINT.lsp b/src/algebra/strap/SINT.lsp index 3dc9ea4f..c89f6600 100644 --- a/src/algebra/strap/SINT.lsp +++ b/src/algebra/strap/SINT.lsp @@ -80,13 +80,13 @@ (DEFUN |SINT;base;$;12| ($) 2) -(PUT '|SINT;max;$;13| '|SPADreplace| '(XLAM NIL MOST-POSITIVE-FIXNUM)) +(PUT '|SINT;max;$;13| '|SPADreplace| '(XLAM NIL |$ShortMaximum|)) -(DEFUN |SINT;max;$;13| ($) MOST-POSITIVE-FIXNUM) +(DEFUN |SINT;max;$;13| ($) |$ShortMaximum|) -(PUT '|SINT;min;$;14| '|SPADreplace| '(XLAM NIL MOST-NEGATIVE-FIXNUM)) +(PUT '|SINT;min;$;14| '|SPADreplace| '(XLAM NIL |$ShortMinimum|)) -(DEFUN |SINT;min;$;14| ($) MOST-NEGATIVE-FIXNUM) +(DEFUN |SINT;min;$;14| ($) |$ShortMinimum|) (PUT '|SINT;=;2$B;15| '|SPADreplace| 'EQL) @@ -240,8 +240,8 @@ (DEFUN |SINT;coerce;I$;51| (|x| $) (SEQ (COND - ((NULL (< MOST-POSITIVE-FIXNUM |x|)) - (COND ((NULL (< |x| MOST-NEGATIVE-FIXNUM)) (EXIT |x|))))) + ((NULL (< |$ShortMaximum| |x|)) + (COND ((NULL (< |x| |$ShortMinimum|)) (EXIT |x|))))) (EXIT (|error| "integer too large to represent in a machine word")))) (DEFUN |SINT;random;$;52| ($) |