
(/VERSIONCHECK 2) 

(DEFUN |MINT;maxint;Pi;1| ($) (QREFELT $ 8)) 

(DEFUN |MINT;maxint;2Pi;2| (|new| $)
  (PROG (|old|)
    (RETURN
      (SEQ (LETT |old| (QREFELT $ 8) |MINT;maxint;2Pi;2|)
           (SETELT $ 8 |new|) (EXIT |old|))))) 

(DEFUN |MINT;coerce;EE;3| (|u| $)
  (SPADCALL (ELT $ 11) |u| (QREFELT $ 16))) 

(DEFUN |MINT;coerce;I$;4| (|u| $)
  (PROG (|message|)
    (RETURN
      (SEQ (COND
             ((< (QREFELT $ 8) (ABS |u|))
              (SEQ (LETT |message|
                         (SPADCALL
                             (LIST (STRINGIMAGE |u|) "  > MAXINT("
                                   (STRINGIMAGE (QREFELT $ 8)) ")")
                             (QREFELT $ 21))
                         |MINT;coerce;I$;4|)
                   (EXIT (|error| (SPADCALL |message| (QREFELT $ 23))))))
             ('T |u|)))))) 

(PUT '|MINT;retract;$I;5| '|SPADreplace| '(XLAM (|u|) |u|)) 

(DEFUN |MINT;retract;$I;5| (|u| $) |u|) 

(PUT '|MINT;retractIfCan;$U;6| '|SPADreplace|
     '(XLAM (|u|) (CONS 0 |u|))) 

(DEFUN |MINT;retractIfCan;$U;6| (|u| $) (CONS 0 |u|)) 

(DEFUN |MachineInteger| ()
  (PROG ()
    (RETURN
      (PROG (#0=#:G1852)
        (RETURN
          (COND
            ((LETT #0# (HGET |$ConstructorCache| '|MachineInteger|)
                   . #1=(|MachineInteger|))
             (|CDRwithIncrement| (CDAR #0#)))
            ('T
             (UNWIND-PROTECT
               (PROG1 (CDDAR (HPUT |$ConstructorCache|
                                   '|MachineInteger|
                                   (LIST
                                    (CONS NIL
                                     (CONS 1 (|MachineInteger;|))))))
                 (LETT #0# T . #1#))
               (COND
                 ((NOT #0#)
                  (HREM |$ConstructorCache| '|MachineInteger|))))))))))) 

(DEFUN |MachineInteger;| ()
  (PROG (|dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT |dv$| '(|MachineInteger|) . #0=(|MachineInteger|))
        (LETT $ (GETREFV 52) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
        (|haddProp| |$ConstructorCache| '|MachineInteger| NIL
            (CONS 1 $))
        (|stuffDomainSlots| $)
        (QSETREFV $ 8 (SPADCALL 2 32 (QREFELT $ 7)))
        $)))) 

(MAKEPROP '|MachineInteger| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL (|Integer|) (|PositiveInteger|)
             (0 . **) 'MAXINT |MINT;maxint;Pi;1| |MINT;maxint;2Pi;2|
             (6 . |coerce|) (|Expression| $$) (|Mapping| $$ 5)
             (|Expression| 5) (|ExpressionFunctions2| 5 $$)
             (11 . |map|) (|Expression| $) |MINT;coerce;EE;3|
             (|List| $) (|String|) (17 . |concat|) (|OutputForm|)
             (22 . |coerce|) |MINT;coerce;I$;4| |MINT;retract;$I;5|
             (|Union| 5 '"failed") |MINT;retractIfCan;$U;6| (|Boolean|)
             (|SparseUnivariatePolynomial| $) (|Factored| $)
             (|Union| 19 '"failed")
             (|Record| (|:| |coef1| $) (|:| |coef2| $))
             (|Union| 32 '"failed")
             (|Record| (|:| |coef1| $) (|:| |coef2| $)
                 (|:| |generator| $))
             (|NonNegativeInteger|)
             (|Record| (|:| |quotient| $) (|:| |remainder| $))
             (|Record| (|:| |coef| 19) (|:| |generator| $))
             (|Record| (|:| |mat| 41) (|:| |vec| (|Vector| 5)))
             (|Matrix| $) (|Vector| $) (|Matrix| 5) (|Pattern| 5)
             (|InputForm|) (|PatternMatchResult| 5 $) (|Float|)
             (|Union| $ '"failed") (|DoubleFloat|) (|Fraction| 5)
             (|Union| 48 '"failed")
             (|Record| (|:| |unit| $) (|:| |canonical| $)
                 (|:| |associate| $))
             (|SingleInteger|))
          '#(~= 27 |zero?| 33 |unitNormal| 38 |unitCanonical| 43
             |unit?| 48 |symmetricRemainder| 53 |subtractIfCan| 59
             |submod| 65 |squareFreePart| 72 |squareFree| 77
             |sizeLess?| 82 |sign| 88 |shift| 93 |sample| 99
             |retractIfCan| 103 |retract| 108 |rem| 113 |reducedSystem|
             119 |recip| 130 |rationalIfCan| 135 |rational?| 140
             |rational| 145 |random| 150 |quo| 159 |principalIdeal| 165
             |prime?| 170 |powmod| 175 |positiveRemainder| 182
             |positive?| 188 |permutation| 193 |patternMatch| 199
             |one?| 206 |odd?| 211 |nextItem| 216 |negative?| 221
             |multiEuclidean| 226 |mulmod| 232 |min| 239 |maxint| 245
             |max| 254 |mask| 260 |length| 265 |lcm| 270 |latex| 281
             |invmod| 286 |init| 292 |inc| 296 |hash| 301
             |gcdPolynomial| 311 |gcd| 317 |factorial| 328 |factor| 333
             |extendedEuclidean| 338 |exquo| 351 |expressIdealMember|
             357 |even?| 363 |euclideanSize| 368 |divide| 373
             |differentiate| 379 |dec| 390 |copy| 395 |convert| 400
             |coerce| 425 |characteristic| 450 |bit?| 454 |binomial|
             460 |base| 466 |associates?| 470 |addmod| 476 |abs| 483 ^
             488 |Zero| 500 |One| 504 D 508 >= 519 > 525 = 531 <= 537 <
             543 - 549 + 560 ** 566 * 578)
          'NIL
          (CONS (|makeByteWordVec2| 1
                    '(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
                      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
                      0 0))
                (CONS '#(|IntegerNumberSystem&| |EuclideanDomain&| NIL
                         |UniqueFactorizationDomain&| NIL NIL
                         |GcdDomain&| |IntegralDomain&| |Algebra&| NIL
                         NIL |DifferentialRing&| |OrderedRing&| NIL NIL
                         |Module&| NIL |Ring&| NIL NIL NIL NIL NIL
                         |AbelianGroup&| NIL NIL NIL NIL
                         |AbelianMonoid&| |Monoid&| NIL NIL NIL
                         |OrderedSet&| |SemiGroup&| |AbelianSemiGroup&|
                         NIL |SetCategory&| NIL NIL NIL NIL NIL NIL NIL
                         NIL |RetractableTo&| NIL NIL NIL |BasicType&|
                         NIL)
                      (CONS '#((|IntegerNumberSystem|)
                               (|EuclideanDomain|)
                               (|PrincipalIdealDomain|)
                               (|UniqueFactorizationDomain|)
                               (|FortranMachineTypeCategory|)
                               (|OrderedIntegralDomain|) (|GcdDomain|)
                               (|IntegralDomain|) (|Algebra| $$)
                               (|CharacteristicZero|)
                               (|LinearlyExplicitRingOver| 5)
                               (|DifferentialRing|) (|OrderedRing|)
                               (|CommutativeRing|) (|EntireRing|)
                               (|Module| $$) (|BiModule| $$ $$)
                               (|Ring|) (|OrderedAbelianGroup|)
                               (|LeftModule| $$) (|Rng|)
                               (|RightModule| $$)
                               (|OrderedCancellationAbelianMonoid|)
                               (|AbelianGroup|)
                               (|OrderedAbelianMonoid|)
                               (|CancellationAbelianMonoid|)
                               (|SemiRing|) (|OrderedAbelianSemiGroup|)
                               (|AbelianMonoid|) (|Monoid|) (|SemiRng|)
                               (|StepThrough|) (|PatternMatchable| 5)
                               (|OrderedSet|) (|SemiGroup|)
                               (|AbelianSemiGroup|) (|RealConstant|)
                               (|SetCategory|)
                               (|multiplicativeValuation|)
                               (|canonicalUnitNormal|)
                               (|ConvertibleTo| 47)
                               (|ConvertibleTo| 45)
                               (|CombinatorialFunctionCategory|)
                               (|ConvertibleTo| 42)
                               (|ConvertibleTo| 43) (|ConvertibleTo| 5)
                               (|RetractableTo| 5) (|noZeroDivisors|)
                               (|CommutativeStar|) (|unitsKnown|)
                               (|BasicType|) (|CoercibleTo| 22))
                            (|makeByteWordVec2| 51
                                '(2 6 0 0 6 7 1 0 0 5 11 2 15 12 13 14
                                  16 1 20 0 19 21 1 20 22 0 23 2 0 28 0
                                  0 1 1 0 28 0 1 1 0 50 0 1 1 0 0 0 1 1
                                  0 28 0 1 2 0 0 0 0 1 2 0 46 0 0 1 3 0
                                  0 0 0 0 1 1 0 0 0 1 1 0 30 0 1 2 0 28
                                  0 0 1 1 0 5 0 1 2 0 0 0 0 1 0 0 0 1 1
                                  0 26 0 27 1 0 5 0 25 2 0 0 0 0 1 2 0
                                  38 39 40 1 1 0 41 39 1 1 0 46 0 1 1 0
                                  49 0 1 1 0 28 0 1 1 0 48 0 1 1 0 0 0
                                  1 0 0 0 1 2 0 0 0 0 1 1 0 37 19 1 1 0
                                  28 0 1 3 0 0 0 0 0 1 2 0 0 0 0 1 1 0
                                  28 0 1 2 0 0 0 0 1 3 0 44 0 42 44 1 1
                                  0 28 0 1 1 0 28 0 1 1 0 46 0 1 1 0 28
                                  0 1 2 0 31 19 0 1 3 0 0 0 0 0 1 2 0 0
                                  0 0 1 1 0 6 6 10 0 0 6 9 2 0 0 0 0 1
                                  1 0 0 0 1 1 0 0 0 1 2 0 0 0 0 1 1 0 0
                                  19 1 1 0 20 0 1 2 0 0 0 0 1 0 0 0 1 1
                                  0 0 0 1 1 0 0 0 1 1 0 51 0 1 2 0 29
                                  29 29 1 2 0 0 0 0 1 1 0 0 19 1 1 0 0
                                  0 1 1 0 30 0 1 3 0 33 0 0 0 1 2 0 34
                                  0 0 1 2 0 46 0 0 1 2 0 31 19 0 1 1 0
                                  28 0 1 1 0 35 0 1 2 0 36 0 0 1 2 0 0
                                  0 35 1 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1
                                  1 0 5 0 1 1 0 42 0 1 1 0 43 0 1 1 0
                                  45 0 1 1 0 47 0 1 1 0 17 14 18 1 0 0
                                  5 24 1 0 0 5 24 1 0 0 0 1 1 0 22 0 1
                                  0 0 35 1 2 0 28 0 0 1 2 0 0 0 0 1 0 0
                                  0 1 2 0 28 0 0 1 3 0 0 0 0 0 1 1 0 0
                                  0 1 2 0 0 0 35 1 2 0 0 0 6 1 0 0 0 1
                                  0 0 0 1 2 0 0 0 35 1 1 0 0 0 1 2 0 28
                                  0 0 1 2 0 28 0 0 1 2 0 28 0 0 1 2 0
                                  28 0 0 1 2 0 28 0 0 1 2 0 0 0 0 1 1 0
                                  0 0 1 2 0 0 0 0 1 2 0 0 0 35 1 2 0 0
                                  0 6 1 2 0 0 5 0 1 2 0 0 0 0 1 2 0 0
                                  35 0 1 2 0 0 6 0 1)))))
          '|lookupComplete|)) 

(MAKEPROP '|MachineInteger| 'NILADIC T) 
