
(/VERSIONCHECK 2) 

(DEFUN |DECIMAL;decimal;F$;1| (|r| $) (SPADCALL |r| (QREFELT $ 7))) 

(PUT '|DECIMAL;coerce;$Re;2| '|SPADreplace| '(XLAM (|x|) |x|)) 

(DEFUN |DECIMAL;coerce;$Re;2| (|x| $) |x|) 

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

(DEFUN |DecimalExpansion;| ()
  (PROG (|dv$| $ #1=#:G1842 |pv$|)
    (RETURN
     (PROGN
      (LETT |dv$| '(|DecimalExpansion|) . #2=(|DecimalExpansion|))
      (LETT $ (GETREFV 53) . #2#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3
                (LETT |pv$|
                      (|buildPredVector| 0 0
                                         (LIST
                                          (|HasCategory| (|Integer|)
                                                         '(|PolynomialFactorizationExplicit|))
                                          (|HasCategory| (|Integer|)
                                                         '(|RetractableTo|
                                                           (|Symbol|)))
                                          (|HasCategory| (|Integer|)
                                                         '(|CharacteristicNonZero|))
                                          (|HasCategory| (|Integer|)
                                                         '(|CharacteristicZero|))
                                          (|HasCategory| (|Integer|)
                                                         '(|ConvertibleTo|
                                                           (|InputForm|)))
                                          (|HasCategory| (|Integer|)
                                                         '(|RealConstant|))
                                          (|HasCategory| (|Integer|)
                                                         '(|OrderedIntegralDomain|))
                                          (|HasCategory| (|Integer|)
                                                         '(|RetractableTo|
                                                           (|Integer|)))
                                          (|HasCategory| (|Integer|)
                                                         '(|StepThrough|))
                                          (|HasCategory| (|Integer|)
                                                         '(|PatternMatchable|
                                                           (|Float|)))
                                          (|HasCategory| (|Integer|)
                                                         '(|PatternMatchable|
                                                           (|Integer|)))
                                          (|HasCategory| (|Integer|)
                                                         '(|ConvertibleTo|
                                                           (|Pattern|
                                                            (|Float|))))
                                          (|HasCategory| (|Integer|)
                                                         '(|ConvertibleTo|
                                                           (|Pattern|
                                                            (|Integer|))))
                                          (|HasCategory| (|Integer|)
                                                         '(|PartialDifferentialRing|
                                                           (|Symbol|)))
                                          (|HasCategory| (|Integer|)
                                                         '(|DifferentialRing|))
                                          (|HasCategory| (|Integer|)
                                                         '(|InnerEvalable|
                                                           (|Symbol|)
                                                           (|Integer|)))
                                          (|HasCategory| (|Integer|)
                                                         '(|Evalable|
                                                           (|Integer|)))
                                          (|HasCategory| (|Integer|)
                                                         '(|Eltable|
                                                           (|Integer|)
                                                           (|Integer|)))
                                          (|HasCategory| (|Integer|)
                                                         '(|EuclideanDomain|))
                                          (|HasCategory| (|Integer|)
                                                         '(|IntegerNumberSystem|))
                                          (|HasCategory| (|Integer|)
                                                         '(|Comparable|))
                                          (LETT #1#
                                                (|HasCategory| (|Integer|)
                                                               '(|OrderedSet|))
                                                . #2#)
                                          (OR
                                           (|HasCategory| (|Integer|)
                                                          '(|Comparable|))
                                           (|HasCategory| (|Integer|)
                                                          '(|OrderedIntegralDomain|))
                                           #1#)
                                          (OR
                                           (|HasCategory| (|Integer|)
                                                          '(|OrderedIntegralDomain|))
                                           #1#)
                                          (|HasCategory| (|Integer|)
                                                         '(|LinearlyExplicitRingOver|
                                                           (|Integer|)))))
                      . #2#))
      (|haddProp| |$ConstructorCache| '|DecimalExpansion| NIL (CONS 1 $))
      (|stuffDomainSlots| $)
      (AND (|HasCategory| $ '(|CharacteristicNonZero|))
           (|HasCategory| (|Integer|) '(|PolynomialFactorizationExplicit|))
           (|augmentPredVector| $ 33554432))
      (AND
       (OR
        (AND (|HasCategory| $ '(|CharacteristicNonZero|))
             (|HasCategory| (|Integer|) '(|PolynomialFactorizationExplicit|)))
        (|HasCategory| (|Integer|) '(|CharacteristicNonZero|)))
       (|augmentPredVector| $ 67108864))
      $)))) 

(MAKEPROP '|DecimalExpansion| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL (|RadixExpansion| '10) (|Fraction| 18)
              (0 . |coerce|) |DECIMAL;decimal;F$;1| |DECIMAL;coerce;$Re;2|
              (|Union| 25 '#1="failed") (|Matrix| $) (|Union| $ '#1#)
              (|Boolean|) (|InputForm|) (|Pattern| 34) (|Pattern| 18)
              (|NonNegativeInteger|) (|Integer|) (|List| 20) (|Equation| 18)
              (|List| 18) (|Symbol|) (|List| 22)
              (|Record| (|:| |mat| 26) (|:| |vec| (|Vector| 18))) (|Vector| $)
              (|Matrix| 18) (|List| 17) (|PatternMatchResult| 34 $)
              (|PatternMatchResult| 18 $) (|Factored| 31)
              (|SparseUnivariatePolynomial| $) (|Union| 33 '#1#) (|List| 31)
              (|Float|) (|DoubleFloat|) (|Union| 18 '#2="failed")
              (|Union| 6 '#2#) (|Union| 22 '#2#) (|Mapping| 18 18)
              (|Factored| $) (|Union| 42 '#3="failed") (|List| $)
              (|Record| (|:| |coef1| $) (|:| |coef2| $) (|:| |generator| $))
              (|Record| (|:| |coef1| $) (|:| |coef2| $)) (|Union| 44 '#3#)
              (|Record| (|:| |quotient| $) (|:| |remainder| $))
              (|Record| (|:| |coef| 42) (|:| |generator| $))
              (|Record| (|:| |unit| $) (|:| |canonical| $) (|:| |associate| $))
              (|PositiveInteger|) (|SingleInteger|) (|String|) (|OutputForm|))
           '#(~= 5 |zero?| 11 |wholePart| 16 |unitNormal| 21 |unitCanonical| 26
              |unit?| 31 |subtractIfCan| 36 |squareFreePolynomial| 42
              |squareFreePart| 47 |squareFree| 52
              |solveLinearPolynomialEquation| 57 |smaller?| 63 |sizeLess?| 69
              |sign| 75 |sample| 80 |retractIfCan| 84 |retract| 104 |rem| 124
              |reducedSystem| 130 |recip| 152 |random| 157 |quo| 161
              |principalIdeal| 167 |prime?| 172 |positive?| 177 |patternMatch|
              182 |one?| 196 |numerator| 201 |numer| 206 |nextItem| 211
              |negative?| 216 |multiEuclidean| 221 |min| 227 |max| 233 |map|
              239 |lcm| 245 |latex| 256 |inv| 261 |init| 266 |hash| 270
              |gcdPolynomial| 275 |gcd| 281 |fractionPart| 292 |floor| 302
              |factorSquareFreePolynomial| 307 |factorPolynomial| 312 |factor|
              317 |extendedEuclidean| 322 |exquo| 335 |expressIdealMember| 341
              |eval| 347 |euclideanSize| 387 |elt| 392 |divide| 398
              |differentiate| 404 |denominator| 454 |denom| 459 |decimal| 464
              |convert| 469 |conditionP| 494 |coerce| 499 |charthRoot| 539
              |characteristic| 544 |ceiling| 548 |associates?| 553 |abs| 559 ^
              564 |Zero| 582 |One| 586 D 590 >= 640 > 646 = 652 <= 658 < 664 /
              670 - 682 + 693 * 699)
           'NIL
           (CONS
            (|makeByteWordVec2| 24
                                '(0 0 0 1 0 0 0 7 0 0 0 0 0 0 0 0 0 0 0 0 0 3 4
                                  7 14 15 0 0 0 0 7 0 0 0 0 0 0 0 7 0 7 0 0 7 0
                                  0 0 0 24 0 0 0 23 9 10 11 0 0 6 17 0 0 0 0 0
                                  0 0 0 0 2 5 6 6 8 12 13 16 17 18))
            (CONS
             '#(|QuotientFieldCategory&| |Field&| |EuclideanDomain&|
                |PolynomialFactorizationExplicit&| NIL
                |UniqueFactorizationDomain&| |GcdDomain&| NIL |DivisionRing&|
                |IntegralDomain&| |FullyLinearlyExplicitRingOver&|
                |DifferentialExtension&| |Algebra&| |Algebra&| |Algebra&| NIL
                |Module&| |Module&| NIL NIL |Module&| NIL NIL |OrderedRing&|
                |PartialDifferentialRing&| |DifferentialRing&| NIL NIL NIL
                |Ring&| NIL NIL NIL NIL NIL NIL NIL NIL NIL |AbelianGroup&| NIL
                NIL NIL NIL NIL |AbelianMonoid&| |Monoid&| NIL |OrderedSet&|
                |FullyEvalableOver&| |SemiGroup&| |AbelianSemiGroup&| NIL NIL
                NIL NIL NIL |SetCategory&| NIL |Evalable&| NIL |RetractableTo&|
                NIL NIL NIL NIL NIL |BasicType&| NIL |RetractableTo&| NIL NIL
                NIL |RetractableTo&| NIL NIL |InnerEvalable&| |InnerEvalable&|
                NIL)
             (CONS
              '#((|QuotientFieldCategory| 18) (|Field|) (|EuclideanDomain|)
                 (|PolynomialFactorizationExplicit|) (|PrincipalIdealDomain|)
                 (|UniqueFactorizationDomain|) (|GcdDomain|)
                 (|OrderedIntegralDomain|) (|DivisionRing|) (|IntegralDomain|)
                 (|FullyLinearlyExplicitRingOver| 18)
                 (|DifferentialExtension| 18) (|Algebra| 18) (|Algebra| 6)
                 (|Algebra| $$) (|LinearlyExplicitRingOver| 18) (|Module| 18)
                 (|Module| 6) (|EntireRing|) (|CommutativeRing|) (|Module| $$)
                 (|CharacteristicNonZero|) (|CharacteristicZero|)
                 (|OrderedRing|) (|PartialDifferentialRing| 22)
                 (|DifferentialRing|) (|BiModule| 18 18) (|BiModule| 6 6)
                 (|BiModule| $$ $$) (|Ring|) (|OrderedAbelianGroup|)
                 (|RightModule| 18) (|LeftModule| 18) (|RightModule| 6)
                 (|LeftModule| 6) (|LeftModule| $$) (|Rng|) (|RightModule| $$)
                 (|OrderedCancellationAbelianMonoid|) (|AbelianGroup|)
                 (|OrderedAbelianMonoid|) (|CancellationAbelianMonoid|)
                 (|SemiRing|) (|OrderedAbelianSemiGroup|)
                 (|FullyPatternMatchable| 18) (|AbelianMonoid|) (|Monoid|)
                 (|SemiRng|) (|OrderedSet|) (|FullyEvalableOver| 18)
                 (|SemiGroup|) (|AbelianSemiGroup|) (|Comparable|)
                 (|StepThrough|) (|PatternMatchable| 34)
                 (|PatternMatchable| 18) (|Patternable| 18) (|SetCategory|)
                 (|RealConstant|) (|Evalable| 18) (|Type|) (|RetractableTo| 18)
                 (|canonicalsClosed|) (|canonicalUnitNormal|)
                 (|noZeroDivisors|) (|CommutativeStar|) (|unitsKnown|)
                 (|BasicType|) (|CoercibleTo| 52) (|RetractableTo| 22)
                 (|ConvertibleTo| 14) (|ConvertibleTo| 35) (|ConvertibleTo| 34)
                 (|RetractableTo| 6) (|ConvertibleTo| 15) (|ConvertibleTo| 16)
                 (|InnerEvalable| 22 18) (|InnerEvalable| 18 18)
                 (|Eltable| 18 $$))
              (|makeByteWordVec2| 52
                                  '(1 0 0 6 7 2 0 13 0 0 1 1 0 13 0 1 1 19 18 0
                                    1 1 0 48 0 1 1 0 0 0 1 1 0 13 0 1 2 0 12 0
                                    0 1 1 1 30 31 1 1 0 0 0 1 1 0 40 0 1 2 1 32
                                    33 31 1 2 21 13 0 0 1 2 0 13 0 0 1 1 7 18 0
                                    1 0 0 0 1 1 8 36 0 1 1 8 37 0 1 1 2 38 0 1
                                    1 0 36 0 1 1 8 18 0 1 1 8 6 0 1 1 2 22 0 1
                                    1 0 18 0 1 2 0 0 0 0 1 2 25 24 11 25 1 1 25
                                    26 11 1 1 0 26 11 1 2 0 24 11 25 1 1 0 12 0
                                    1 0 20 0 1 2 0 0 0 0 1 1 0 47 42 1 1 0 13 0
                                    1 1 7 13 0 1 3 10 28 0 15 28 1 3 11 29 0 16
                                    29 1 1 0 13 0 1 1 0 0 0 1 1 0 18 0 1 1 9 12
                                    0 1 1 7 13 0 1 2 0 41 42 0 1 2 22 0 0 0 1 2
                                    22 0 0 0 1 2 0 0 39 0 1 1 0 0 42 1 2 0 0 0
                                    0 1 1 0 51 0 1 1 0 0 0 1 0 9 0 1 1 0 50 0 1
                                    2 0 31 31 31 1 1 0 0 42 1 2 0 0 0 0 1 1 19
                                    0 0 1 1 0 6 0 1 1 20 18 0 1 1 1 30 31 1 1 1
                                    30 31 1 1 0 40 0 1 2 0 43 0 0 1 3 0 45 0 0
                                    0 1 2 0 12 0 0 1 2 0 41 42 0 1 2 17 0 0 19
                                    1 3 17 0 0 18 18 1 2 17 0 0 20 1 3 17 0 0
                                    21 21 1 3 16 0 0 22 18 1 3 16 0 0 23 21 1 1
                                    0 17 0 1 2 18 0 0 18 1 2 0 46 0 0 1 2 15 0
                                    0 17 1 1 15 0 0 1 3 14 0 0 23 27 1 2 14 0 0
                                    23 1 3 14 0 0 22 17 1 2 14 0 0 22 1 2 0 0 0
                                    39 1 3 0 0 0 39 17 1 1 0 0 0 1 1 0 18 0 1 1
                                    0 0 6 8 1 5 14 0 1 1 12 15 0 1 1 13 16 0 1
                                    1 6 34 0 1 1 6 35 0 1 1 26 10 11 1 1 2 0 22
                                    1 1 0 6 0 1 1 0 5 0 9 1 0 0 18 1 1 0 0 6 7
                                    1 0 0 18 1 1 0 0 0 1 1 0 52 0 1 1 27 12 0 1
                                    0 0 17 1 1 20 18 0 1 2 0 13 0 0 1 1 7 0 0 1
                                    2 0 0 0 18 1 2 0 0 0 17 1 2 0 0 0 49 1 0 0
                                    0 1 0 0 0 1 2 15 0 0 17 1 1 15 0 0 1 3 14 0
                                    0 23 27 1 2 14 0 0 23 1 3 14 0 0 22 17 1 2
                                    14 0 0 22 1 2 0 0 0 39 1 3 0 0 0 39 17 1 2
                                    22 13 0 0 1 2 22 13 0 0 1 2 0 13 0 0 1 2 22
                                    13 0 0 1 2 22 13 0 0 1 2 0 0 18 18 1 2 0 0
                                    0 0 1 2 0 0 0 0 1 1 0 0 0 1 2 0 0 0 0 1 2 0
                                    0 18 0 1 2 0 0 0 18 1 2 0 0 6 0 1 2 0 0 0 6
                                    1 2 0 0 0 0 1 2 0 0 18 0 1 2 0 0 17 0 1 2 0
                                    0 49 0 1)))))
           '|lookupComplete|)) 

(MAKEPROP '|DecimalExpansion| 'NILADIC T) 
