
(/VERSIONCHECK 2) 

(DEFUN |RIDIST;uniform;SM;1| (|aTob| $)
  (PROG ()
    (RETURN (SEQ (CONS #'|RIDIST;uniform;SM;1!0| (VECTOR $ |aTob|)))))) 

(DEFUN |RIDIST;uniform;SM;1!0| ($$)
  (PROG (|aTob| $)
    (LETT |aTob| (QREFELT $$ 1) . #0=(|RIDIST;uniform;SM;1|))
    (LETT $ (QREFELT $$ 0) . #0#)
    (RETURN
      (PROGN
        (PROG (|a| |b| |l| |m| #1=#:G1835 |w| |mqnext| |n| |mq|)
          (RETURN
            (SEQ (LETT |a| (SPADCALL |aTob| (QREFELT $ 8)) NIL)
                 (LETT |b| (SPADCALL |aTob| (QREFELT $ 9)) NIL)
                 (LETT |l| (SPADCALL |a| |b| (QREFELT $ 10)) NIL)
                 (LETT |m|
                       (SPADCALL (SPADCALL
                                     (SPADCALL |a| |b| (QREFELT $ 11))
                                     (QREFELT $ 12))
                                 (|spadConstant| $ 27) (QREFELT $ 14))
                       NIL)
                 (LETT |w|
                       (SPADCALL 2
                           (PROG1 (LETT #1#
                                        (SPADCALL
                                         (SPADCALL
                                          (SPADCALL (QREFELT $ 16))
                                          (QREFELT $ 18))
                                         2 (QREFELT $ 19))
                                        NIL)
                             (|check-subtype| (>= #1# 0)
                                 '(|NonNegativeInteger|) #1#))
                           (QREFELT $ 31))
                       NIL)
                 (LETT |n| (|spadConstant| $ 22) NIL)
                 (LETT |mq| |m| NIL)
                 (SEQ G190
                      (COND
                        ((NULL (SPADCALL (|spadConstant| $ 22)
                                   (LETT |mqnext|
                                    (SPADCALL |mq| |w| (QREFELT $ 19))
                                    NIL)
                                   (QREFELT $ 25)))
                         (GO G191)))
                      (SEQ (LETT |n|
                                 (SPADCALL |n| (|spadConstant| $ 27)
                                     (QREFELT $ 29))
                                 NIL)
                           (EXIT (LETT |mq| |mqnext| NIL)))
                      NIL (GO G190) G191 (EXIT NIL))
                 (EXIT (SPADCALL |mq| |n| |w| |l| (QREFELT $ 30)))))))))) 

(DEFUN |RIDIST;ridHack1;5I;2| (|mq| |n| |w| |l| $)
  (PROG (|i| |r|)
    (RETURN
      (SEQ (LETT |r| (SPADCALL |mq| (QREFELT $ 34))
                 . #0=(|RIDIST;ridHack1;5I;2|))
           (SEQ (LETT |i| 1 . #0#) G190
                (COND ((QSGREATERP |i| |n|) (GO G191)))
                (SEQ (EXIT (LETT |r|
                                 (+ (* |r| |w|)
                                    (SPADCALL |w| (QREFELT $ 34))) . #0#)))
                (LETT |i| (QSADD1 |i|) . #0#) (GO G190) G191
                (EXIT NIL))
           (EXIT (+ |r| |l|)))))) 

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

(DEFUN |RandomIntegerDistributions;| ()
  (PROG (|dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT |dv$| '(|RandomIntegerDistributions|)
              . #0=(|RandomIntegerDistributions|))
        (LETT $ (GETREFV 36) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
        (|haddProp| |$ConstructorCache| '|RandomIntegerDistributions|
            NIL (CONS 1 $))
        (|stuffDomainSlots| $)
        $)))) 

(MAKEPROP '|RandomIntegerDistributions| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|Integer|) (|Segment| 6)
             (0 . |lo|) (5 . |hi|) (10 . |min|) (16 . -) (22 . |abs|)
             (27 . |One|) (31 . +) (|RandomNumberSource|) (37 . |size|)
             (|IntegerBits|) (41 . |bitLength|) (46 . |quo|)
             (|NonNegativeInteger|) (52 . **) (58 . |Zero|)
             (62 . |Zero|) (|Boolean|) (66 . <) (|PositiveInteger|)
             (72 . |One|) (76 . |One|) (80 . +) |RIDIST;ridHack1;5I;2|
             (86 . **) (|Mapping| 6) |RIDIST;uniform;SM;1|
             (92 . |randnum|) '|RationalNumber|)
          '#(|uniform| 97 |ridHack1| 102 |poisson| 110 |geometric| 115
             |binomial| 120)
          'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 35
                                '(1 7 6 0 8 1 7 6 0 9 2 6 0 0 0 10 2 6
                                  0 0 0 11 1 6 0 0 12 0 6 0 13 2 6 0 0
                                  0 14 0 15 6 16 1 17 6 6 18 2 6 0 0 0
                                  19 2 6 0 0 20 21 0 20 0 22 0 6 0 23 2
                                  6 24 0 0 25 0 26 0 27 0 20 0 28 2 20
                                  0 0 0 29 2 26 0 0 20 31 1 15 6 6 34 1
                                  0 32 7 33 4 0 6 6 6 6 6 30 1 0 32 35
                                  1 1 0 32 35 1 2 0 32 6 35 1)))))
          '|lookupComplete|)) 

(MAKEPROP '|RandomIntegerDistributions| 'NILADIC T) 
