(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10) (FILECREATED "13-Jun-2021 21:05:20" ("compiled on " {DSK}kaplan>Local>medley3.5>git-medley>sources>LLBIGNUM.;1) "13-Jun-2021 14:44:27" recompiled explicitly%: BIGNUM.DEFPRINT in "FULL 13-Jun-2021 ..." dated "13-Jun-2021 14:44:40") (FILECREATED " 1-Jan-99 21:45:52" {DSK}disk3>lispcore3.0>sources>LLBIGNUM.;2 41438 changes to%: (FNS \INITBIGNUMS) previous date%: "19-Jan-93 10:44:45" {DSK}disk3>lispcore3.0>sources>LLBIGNUM.;1) \BIGNUM.COMPARE :D8 (I 1 Y I 0 X) N@d`A`jm`A`kAd``@ A (75 \BN.COMPAREN 70 \BN.FROM.FIXP 64 \BN.FROM.FIXP) (55 MAX.INTEGER 47 MIN.INTEGER 35 MAX.INTEGER 27 MAX.INTEGER 15 MIN.INTEGER 6 MIN.INTEGER) () \BIGNUM.DIFFERENCE :D8 (I 1 Y I 0 X) @ A (21 \BN.TO.FIXP 16 \BN.DIFFERENCE 11 \BN.FROM.FIXP 5 \BN.FROM.FIXP) NIL () \BIGNUM.INTEGERLENGTH :D8 (I 0 X) @ (10 \BN.INTEGERLENGTH 5 \BN.FROM.FIXP) NIL () \BIGNUM.LOGAND :D8 (I 1 Y I 0 X) w@jAjj@ A o jdA,@m@mAm@ mA @A@bb@ A (116 \BN.TO.FIXP 111 \BN.LOGAND 106 \BN.FROM.FIXP 100 \BN.FROM.FIXP 81 \BN.TO.FIXP 76 \BN.LOGANDC2 71 \BN.FROM.FIXP 62 \BN.FROM.FIXP 33 ERROR 22 INFINITEP 15 INFINITEP) NIL ( 28 "Can't do logical operations with infinity") \BIGNUM.LOGOR :D8 (I 1 Y I 0 X) S@jAAj@@ A o @jAj@ A md@mA(68 \BN.TO.FIXP 63 \BN.LOGOR 58 \BN.FROM.FIXP 52 \BN.FROM.FIXP 35 ERROR 24 INFINITEP 17 INFINITEP) NIL ( 30 "Can't do logical operations with infinity") \BIGNUM.LOGXOR :D8 (I 1 Y I 0 X) p@jAAj@@ A o jd@#Am@mA@A @A AA@bb@ A (109 \BN.TO.FIXP 104 \BN.LOGXOR 99 \BN.FROM.FIXP 93 \BN.FROM.FIXP 74 \BIGNUM.DIFFERENCE 69 \BIGNUM.LOGAND 62 \BIGNUM.LOGOR 35 ERROR 24 INFINITEP 17 INFINITEP) NIL ( 30 "Can't do logical operations with infinity") \BIGNUM.PLUS :D8 (I 1 Y I 0 X) @ A (21 \BN.TO.FIXP 16 \BN.PLUS2 11 \BN.FROM.FIXP 5 \BN.FROM.FIXP) NIL () \BIGNUM.LSH :D8 (I 1 N I 0 X) @jjA`@ o @ @A`@djj``jA=@ blAlAAlbj@b@lA @j<@ bAmAdmld@ljA lb@bjd@A bdM@k(209 \BIGNUM.LSH 185 \BIGNUM.QUOTIENT 180 EXPT 147 \BN.FROM.FIXP 135 \BN.TO.FIXP 130 \BN.TIMES2 125 \BN.FROM.FIXP 120 EXPT 83 \BN.FROM.FIXP 39 INFINITEP 32 ERROR 20 INFINITEP) (218 BIGNUM 71 MIN.INTEGER 65 MAX.INTEGER 48 MAX.INTEGER 11 MIN.INTEGER) ( 27 "Can't shift infinity minus infinity places") \BIGNUM.TIMES :D8 (I 1 Y I 0 X) @ A (21 \BN.TO.FIXP 16 \BN.TIMES2 11 \BN.FROM.FIXP 5 \BN.FROM.FIXP) NIL () \BIGNUM.QUOTIENT :D8 (I 1 Y I 0 X) Ad`@ o j`@ o @d`Adjo j%``Adjo j`@ A  (153 \BN.TO.FIXP 147 \BN.DIVIDE 142 \BN.FROM.FIXP 136 \BN.FROM.FIXP 119 ERROR 84 ERROR 56 ERROR 44 INFINITEP 27 ERROR 16 INFINITEP) (129 MIN.INTEGER 100 MIN.INTEGER 94 MAX.INTEGER 64 MAX.INTEGER 35 MIN.INTEGER 6 MAX.INTEGER) ( 114 "Can't divide infinity by 0" 79 "Can't divide infinity by 0" 51 "Can't divide infinity by infinity" 22 "Can't divide infinity by infinity") \BIGNUM.REMAINDER :D8 (I 1 Y I 0 X) 2@ A o @ A  (47 \BN.TO.FIXP 41 \BN.DIVIDE 36 \BN.FROM.FIXP 30 \BN.FROM.FIXP 23 ERROR 12 INFINITEP 5 INFINITEP) NIL ( 18 "Can't take remainder with infinity") \BIGNUM.TO.FLOAT :D8 (I 0 X) @ (10 \BN.FLOAT 5 \BN.FROM.FIXP) NIL () FINITEP :D8 (L (0 CL:NUMBER)) @` @`hNIL (14 MIN.INTEGER 5 MAX.INTEGER) () INFINITEP :D8 (L (0 CL:NUMBER)) @` @`NIL (14 MIN.INTEGER 5 MAX.INTEGER) () \BIGNUM.TO.INT :D8 (I 0 X) @dn@@ (16 \BIGNUM.TO.INT) NIL () \BN.2TH :D8 (P 1 B P 0 L I 0 A)  @In' XbHI(15 \BN.QRS) NIL () \BN.ABS :D8 (I 0 U) j@ @ @(14 \BN.MINUS 6 \BN.SIGN) NIL () \BN.DIFFERENCE :D8 (I 1 V I 0 U) @A (11 \BN.PLUS2 6 \BN.MINUS) NIL () \BN.DIVIDE :D8 (P 30 I P 28 i P 26 L2 P 25 L1 P 24 BIP P 23 IP P 22 X P 21 Q P 20 V P 19 U P 18 R2 P 17 R1 P 16 C1 P 15 QHAT P 14 A3 P 13 A2 P 12 A1 P 11 B2 P 10 B1 P 9 F P 8 E P 7 W P 6 D P 5 C P 4 ST P 3 SA P 2 K P 1 N P 0 M I 2 FLG I 1 B I 0 A) @A `@"@A _0Bgh O0 @ A HIٺjJ@ A_&IkkO8O6O&_&O8k_8O&kjMmjMٽn@Mk۾KL_@KN bALN b@_&h_2JkkOIdllx3llb+lrO_l Il0Il O_Il YIl0O_WO_WO AWA Od AO i(355 \OUTCHAR 338 FRESHLINE 319 LENGTH 269 IMOD 204 \BN.QRS 193 \NCONC2 151 \BN.TH2D 81 \INVALID.RADIX 32 CONCAT 22 CHARACTER 5 INFINITEP) (325 STREAM 299 READTABLEP 175 READTABLEP 133 BIGNUM 51 MAX.INTEGER 45 MIN.INTEGER 38 MIN.INTEGER 14 READTABLEP) ( 27 ".") \BN.INTEGERLENGTH :D8 (I 0 X) 2@jddl@   `(47 SHOULDNT 35 INFINITEP 29 INTEGERLENGTH 21 \BN.INTEGERLENGTH) (41 MAX.INTEGER) () \BN.LOGAND :D8 (P 0 B I 1 B2 I 0 B1) )@hA@A X@AbHddjH@H(18 \BN.LOGAND) NIL () \BN.LOGANDC2 :D8 (P 0 B I 1 B2 I 0 B1) -@hA@@A X@mAbHddjH@H(19 \BN.LOGANDC2) NIL () \BN.LOGOR :D8 (I 1 B2 I 0 B1) @AA@@A@A (21 \BN.LOGOR) NIL () \BN.LOGXOR :D8 (I 1 B2 I 0 B1) @AA@@A@A (21 \BN.LOGXOR) NIL () \BN.MINUS :D8 (I 0 U) 7@ddj@@ gg@gg(52 SHOULDNT 18 \BN.MINUS) (46 MAX.INTEGER 39 MIN.INTEGER 32 MIN.INTEGER 25 MAX.INTEGER) () \BN.PLUS2 :D8 (P 0 L I 1 V I 0 U) @AA@@daA[@ A XjH@jH bHjAH b@ A @A @A @gAgo @grAgko (167 ERROR 134 ERROR 105 \BN.ISUM1 97 \BN.ISUM0 88 \BN.SIGN 82 \BN.SIGN 73 \APPEND2 68 \BN.NZEROS 53 \APPEND2 48 \BN.NZEROS 32 FLENGTH 26 FLENGTH) (152 MAX.INTEGER 141 MIN.INTEGER 121 MIN.INTEGER 112 MAX.INTEGER) ( 162 "Can't add plus infinity to minus infinity" 129 "Can't add plus infinity to minus infinity") \BN.SIGN :D8 (I 0 U) 9@@3!@jdgkgm@jj@@b(36 SHOULDNT) (26 MIN.INTEGER 17 MAX.INTEGER) () \BN.TIMES2 :D8 (P 10 I P 8 BP P 7 AP P 6 C P 5 L P 4 W2 P 3 W1 P 2 W P 1 U1 P 0 TAIL I 1 V I 0 U)  @AgAgo jdh@ A lؽHMk OOJ@KjIAn@ _LONn@ _LOOOؾLIYYgA o k@g@gjA oY kgjJOk_cLNKAb^NjHhJ(210 \BN.SIGN 172 \BN.SIGN 121 \BN.IDIVIDE 102 \BN.IDIVIDE 59 FLENGTH 53 FLENGTH 40 ERROR) (219 MAX.INTEGER 189 MIN.INTEGER 182 MIN.INTEGER 153 MAX.INTEGER 23 MIN.INTEGER 15 MAX.INTEGER) ( 202 "Can't multiply infinity and zero." 164 "Can't multiply infinity and zero." 35 "Can't multiply infinity and zero.") \BN.COMPAREN :D8 (P 3 S P 2 ST P 1 SV P 0 SU I 1 V I 0 U) njddd@ XjjA A YjHHI[j$KjkjKmKjjKjA@AZjJAb@bAjH(63 SHOULDNT 31 \BN.SIGN 23 \BN.SIGN 12 \BN.SIGN) NIL () \BN.D2TH :D8 (P 5 AI P 4 M P 3 BI P 2 V P 1 S P 0 B I 0 U) k`@d@dgg@@bg@A@ Zbjk@n'L@@bMLKػl LڰIgjKـKH@H(46 REVERSE) (90 - 36 + 21 - 13 +) () \BN.FROM.FIXP :D8 (I 0 U) Y@@@ddjh@j@1@o@n' n' j@ @ (86 \BN.IGNN 79 \BN.MINUS 74 \BN.IGNN 65 \BN.DIFFERENCE 60 \BN.FROM.FIXP 52 \BN.FROM.FIXP) (12 BIGNUM 5 BIGNUM) ( 39 -2147483648) \BN.ICANON :D8 (P 3 B P 2 U1 P 1 CARRY P 0 U0 I 1 SIGN I 0 U) G@j"@IػAjjKmjAKjkjKIn@ٻ@KKj@Z@@bJ@JhHNIL NIL () \BN.IDIVIDE :D8 (L (1 B 0 A)) @A@ANIL NIL () \BN.ISUM0 :D8 (P 2 BP P 1 RES P 0 CARRY I 1 V I 0 U) 7j!@AHn@ ZJI@bAbHjHIYI (52 REVERSE 18 \BN.IDIVIDE) NIL () \BN.ISUM1 :D8 (P 2 RES P 1 S P 0 C I 1 V I 0 U) :0jX@AXdjYJ@bAbIjhJ jImk (55 \BN.ICANON 42 DREVERSE) NIL () \BN.MADD :D8 (P 4 IPP P 3 IP P 2 TTT P 1 TT P 0 H I 2 C I 1 B I 0 A) IP@jAIn@ BKHn@ ILKLbIZYBHbj@JBJ@(33 \BN.IDIVIDE 18 \BN.IDIVIDE) NIL () \BN.TO.FIXP :D8 (I 0 X) W@d.o k@o mld@@ j@dg`g`(84 SHOULDNT 47 \BIGNUM.TO.INT 28 \BN.COMPAREN 14 \BN.COMPAREN) (78 MIN.INTEGER 71 MIN.INTEGER 65 MAX.INTEGER 58 MAX.INTEGER) ( 23 (0 0 -8) 9 (16383 16383 7)) \BN.NZEROS :D8 (P 1 I I 0 N) !@k2IHJjK Lh[IkYL&NIL NIL () \BN.QRS :D8 (P 3 C2 P 2 C1 P 1 CP P 0 D I 1 I I 0 B) P@@HAjo @ bj@Jn@KA HIjIH@bI@HJj(47 \BN.IDIVIDE 26 REVERSE 19 ERROR) NIL ( 14 " QRS DIV BY 0 ") \BN.SIGN :D8 (I 0 U) 9@@3!@jdgkgm@jj@@b(36 SHOULDNT) (26 MIN.INTEGER 17 MAX.INTEGER) () \BN.TH2B :D8 (P 1 B P 0 AI I 0 U) * @@X@bHIY@I@bIn'H (37 \BN.MADD) NIL () \BN.TH2D :D8 (P 5 M P 4 RESULT P 3 DIGIT P 2 AI P 1 MAXFACTOR I 2 TH I 1 RADIX I 0 A) qAl b@l0hBA2H@jIL IJMۻJKMٺLKjl K [Kl lAKl0LMdkHXA۽l-L (109 REVERSE 68 ABS 36 REVERSE) NIL () \INITBIGNUMS :D8 NIL Lg n8 j k ldgldg(34 \BN.FROM.FIXP 23 \BN.FROM.FIXP 17 \SETTYPEMASK 9 \TYPENUMBERFROMNAME) (73 MAX.INTEGER 65 MAX.INTEGER 56 MIN.INTEGER 48 MIN.INTEGER 39 \BIG.1 28 \BIG.0 4 BIGNUM) () (PRETTYCOMPRINT LLBIGNUMCOMS) (RPAQQ LLBIGNUMCOMS ((COMS (DECLARE%: EVAL@COMPILE DONTCOPY (RECORDS BIGNUM)) (INITRECORDS BIGNUM) ( CONSTANTS \BIGNUM.THETA (\BIGNUM.BETA (EXPT 2 14)) (\BIGNUM.BETA1 (SUB1 \BIGNUM.BETA))) (DECLARE%: EVAL@COMPILE (ADDVARS (CHARACTERNAMES (INFINITY 8551)))) (ADDVARS (GLOBALVARS MIN.INTEGER MAX.INTEGER \BIG.0 \BIG.1))) (COMS (* ; "entries") (FNS \BIGNUM.COMPARE \BIGNUM.DIFFERENCE \BIGNUM.INTEGERLENGTH \BIGNUM.LOGAND \BIGNUM.LOGOR \BIGNUM.LOGXOR \BIGNUM.PLUS \BIGNUM.LSH \BIGNUM.TIMES \BIGNUM.QUOTIENT \BIGNUM.REMAINDER \BIGNUM.TO.FLOAT) (FNS FINITEP INFINITEP)) (COMS (* ; "internal functions") (FNS \BIGNUM.TO.INT \BN.2TH \BN.ABS \BN.DIFFERENCE \BN.DIVIDE \BN.FLOAT \BN.IGNN BIGNUM.DEFPRINT \BN.INTEGERLENGTH \BN.LOGAND \BN.LOGANDC2 \BN.LOGOR \BN.LOGXOR \BN.MINUS \BN.PLUS2 \BN.SIGN \BN.TIMES2 \BN.COMPAREN \BN.D2TH \BN.FROM.FIXP \BN.ICANON \BN.IDIVIDE \BN.ISUM0 \BN.ISUM1 \BN.MADD \BN.TO.FIXP \BN.NZEROS \BN.QRS \BN.SIGN \BN.TH2B \BN.TH2D)) (COMS (FNS \INITBIGNUMS) (* ; "MAKERATIONAL needs work") (* ;; "needs work: MASK.1'S MASK.0'S BITTEST BITSET BITCLEAR LOGNOT LOADBYTE DEPOSITBYTE IMODLESSP IMODPLUS IMODDIFFERENCE ROT" ) (DECLARE%: DONTEVAL@LOAD DOCOPY (P (\INITBIGNUMS)))))) (/DECLAREDATATYPE (QUOTE BIGNUM) (QUOTE (POINTER)) (QUOTE ((BIGNUM 0 POINTER))) (QUOTE 2)) (DEFPRINT (QUOTE BIGNUM) (QUOTE BIGNUM.DEFPRINT)) (RPAQQ \BIGNUM.THETA 10000) (RPAQ \BIGNUM.BETA (EXPT 2 14)) (RPAQ \BIGNUM.BETA1 (SUB1 \BIGNUM.BETA)) (CONSTANTS \BIGNUM.THETA (\BIGNUM.BETA (EXPT 2 14)) (\BIGNUM.BETA1 (SUB1 \BIGNUM.BETA))) (ADDTOVAR CHARACTERNAMES (INFINITY 8551)) (ADDTOVAR GLOBALVARS MIN.INTEGER MAX.INTEGER \BIG.0 \BIG.1) (\INITBIGNUMS) (PUTPROPS LLBIGNUM COPYRIGHT ("Venue & Xerox Corporation" 1985 1986 1987 1990 1993 1999)) NIL