
(/VERSIONCHECK 2) 

(DEFUN |NUMQUAD;aromberg;M4F3IR;1|
       (|func| |a| |b| |epsrel| |epsabs| |nmin| |nmax| |nint| $)
  (PROG (|hh| |io| |i| |ans| |sum| |err| |pts| |done| |x1| |x2|
              #0=#:G1839)
    (RETURN
      (SEQ (EXIT (SEQ (LETT |sum| (SPADCALL 0 0 10 (QREFELT $ 10))
                            . #1=(|NUMQUAD;aromberg;M4F3IR;1|))
                      (LETT |err|
                            (SPADCALL 0 0 10 (QREFELT $ 10)) . #1#)
                      (LETT |pts| 1 . #1#) (LETT |done| 'T . #1#)
                      (LETT |hh|
                            (SPADCALL (SPADCALL |b| |a| (QREFELT $ 11))
                                |nint| (QREFELT $ 12)) . #1#)
                      (LETT |x1| |a| . #1#)
                      (LETT |x2|
                            (SPADCALL |a| |hh| (QREFELT $ 13)) . #1#)
                      (LETT |io|
                            (LIST (SPADCALL |x1| (QREFELT $ 15))
                                  (SPADCALL |x2| (QREFELT $ 15))) . #1#)
                      (SEQ (LETT |i| 1 . #1#) G190
                           (COND ((QSGREATERP |i| |nint|) (GO G191)))
                           (SEQ (LETT |ans|
                                      (SPADCALL |func| |x1| |x2|
                                       |epsrel| |epsabs| |nmin| |nmax|
                                       (QREFELT $ 18)) . #1#)
                                (COND
                                  ((NULL (QVELT |ans| 3))
                                   (SEQ
                                    (SPADCALL |io| 1
                                     (SPADCALL |x1| (QREFELT $ 15))
                                     (QREFELT $ 21))
                                    (SPADCALL |io| 2
                                     (SPADCALL |x2| (QREFELT $ 15))
                                     (QREFELT $ 21))
                                    (EXIT
                                     (SPADCALL
                                      (SPADCALL
                                       (CONS
                                        "accuracy not reached in interval"
                                        |io|)
                                       (QREFELT $ 23))
                                      (QREFELT $ 25))))))
                                (LETT |sum|
                                      (SPADCALL |sum| (QVELT |ans| 0)
                                       (QREFELT $ 13)) . #1#)
                                (LETT |err|
                                      (SPADCALL |err|
                                       (SPADCALL (QVELT |ans| 1)
                                        (QREFELT $ 26))
                                       (QREFELT $ 13)) . #1#)
                                (LETT |pts|
                                      (- (+ |pts| (QVELT |ans| 2)) 1) . #1#)
                                (LETT |done|
                                      (COND
                                        (|done| (QVELT |ans| 3))
                                        ('T 'NIL)) . #1#)
                                (LETT |x1| |x2| . #1#)
                                (EXIT (LETT |x2|
                                       (SPADCALL |x2| |hh|
                                        (QREFELT $ 13)) . #1#)))
                           (LETT |i| (QSADD1 |i|) . #1#) (GO G190) G191
                           (EXIT NIL))
                      (EXIT (PROGN
                              (LETT #0#
                                    (VECTOR |sum| |err| |pts| |done|) . #1#)
                              (GO #0#)))))
           #0# (EXIT #0#))))) 

(DEFUN |NUMQUAD;asimpson;M4F3IR;2|
       (|func| |a| |b| |epsrel| |epsabs| |nmin| |nmax| |nint| $)
  (PROG (|hh| |io| |i| |ans| |sum| |err| |pts| |done| |x1| |x2|
              #0=#:G1846)
    (RETURN
      (SEQ (EXIT (SEQ (LETT |sum| (SPADCALL 0 0 10 (QREFELT $ 10))
                            . #1=(|NUMQUAD;asimpson;M4F3IR;2|))
                      (LETT |err|
                            (SPADCALL 0 0 10 (QREFELT $ 10)) . #1#)
                      (LETT |pts| 1 . #1#) (LETT |done| 'T . #1#)
                      (LETT |hh|
                            (SPADCALL (SPADCALL |b| |a| (QREFELT $ 11))
                                |nint| (QREFELT $ 12)) . #1#)
                      (LETT |x1| |a| . #1#)
                      (LETT |x2|
                            (SPADCALL |a| |hh| (QREFELT $ 13)) . #1#)
                      (LETT |io|
                            (LIST (SPADCALL |x1| (QREFELT $ 15))
                                  (SPADCALL |x2| (QREFELT $ 15))) . #1#)
                      (SEQ (LETT |i| 1 . #1#) G190
                           (COND ((QSGREATERP |i| |nint|) (GO G191)))
                           (SEQ (LETT |ans|
                                      (SPADCALL |func| |x1| |x2|
                                       |epsrel| |epsabs| |nmin| |nmax|
                                       (QREFELT $ 28)) . #1#)
                                (COND
                                  ((NULL (QVELT |ans| 3))
                                   (SEQ
                                    (SPADCALL |io| 1
                                     (SPADCALL |x1| (QREFELT $ 15))
                                     (QREFELT $ 21))
                                    (SPADCALL |io| 2
                                     (SPADCALL |x2| (QREFELT $ 15))
                                     (QREFELT $ 21))
                                    (EXIT
                                     (SPADCALL
                                      (SPADCALL
                                       (CONS
                                        "accuracy not reached in interval"
                                        |io|)
                                       (QREFELT $ 23))
                                      (QREFELT $ 25))))))
                                (LETT |sum|
                                      (SPADCALL |sum| (QVELT |ans| 0)
                                       (QREFELT $ 13)) . #1#)
                                (LETT |err|
                                      (SPADCALL |err|
                                       (SPADCALL (QVELT |ans| 1)
                                        (QREFELT $ 26))
                                       (QREFELT $ 13)) . #1#)
                                (LETT |pts|
                                      (- (+ |pts| (QVELT |ans| 2)) 1) . #1#)
                                (LETT |done|
                                      (COND
                                        (|done| (QVELT |ans| 3))
                                        ('T 'NIL)) . #1#)
                                (LETT |x1| |x2| . #1#)
                                (EXIT (LETT |x2|
                                       (SPADCALL |x2| |hh|
                                        (QREFELT $ 13)) . #1#)))
                           (LETT |i| (QSADD1 |i|) . #1#) (GO G190) G191
                           (EXIT NIL))
                      (EXIT (PROGN
                              (LETT #0#
                                    (VECTOR |sum| |err| |pts| |done|) . #1#)
                              (GO #0#)))))
           #0# (EXIT #0#))))) 

(DEFUN |NUMQUAD;atrapezoidal;M4F3IR;3|
       (|func| |a| |b| |epsrel| |epsabs| |nmin| |nmax| |nint| $)
  (PROG (|hh| |io| |i| |ans| |sum| |err| |pts| |done| |x1| |x2|
              #0=#:G1853)
    (RETURN
      (SEQ (EXIT (SEQ (LETT |sum| (SPADCALL 0 0 10 (QREFELT $ 10))
                            . #1=(|NUMQUAD;atrapezoidal;M4F3IR;3|))
                      (LETT |err|
                            (SPADCALL 0 0 10 (QREFELT $ 10)) . #1#)
                      (LETT |pts| 1 . #1#) (LETT |done| 'T . #1#)
                      (LETT |hh|
                            (SPADCALL (SPADCALL |b| |a| (QREFELT $ 11))
                                |nint| (QREFELT $ 12)) . #1#)
                      (LETT |x1| |a| . #1#)
                      (LETT |x2|
                            (SPADCALL |a| |hh| (QREFELT $ 13)) . #1#)
                      (LETT |io|
                            (LIST (SPADCALL |x1| (QREFELT $ 15))
                                  (SPADCALL |x2| (QREFELT $ 15))) . #1#)
                      (SEQ (LETT |i| 1 . #1#) G190
                           (COND ((QSGREATERP |i| |nint|) (GO G191)))
                           (SEQ (LETT |ans|
                                      (SPADCALL |func| |x1| |x2|
                                       |epsrel| |epsabs| |nmin| |nmax|
                                       (QREFELT $ 30)) . #1#)
                                (COND
                                  ((NULL (QVELT |ans| 3))
                                   (SEQ
                                    (SPADCALL |io| 1
                                     (SPADCALL |x1| (QREFELT $ 15))
                                     (QREFELT $ 21))
                                    (SPADCALL |io| 2
                                     (SPADCALL |x2| (QREFELT $ 15))
                                     (QREFELT $ 21))
                                    (EXIT
                                     (SPADCALL
                                      (SPADCALL
                                       (CONS
                                        "accuracy not reached in interval"
                                        |io|)
                                       (QREFELT $ 23))
                                      (QREFELT $ 25))))))
                                (LETT |sum|
                                      (SPADCALL |sum| (QVELT |ans| 0)
                                       (QREFELT $ 13)) . #1#)
                                (LETT |err|
                                      (SPADCALL |err|
                                       (SPADCALL (QVELT |ans| 1)
                                        (QREFELT $ 26))
                                       (QREFELT $ 13)) . #1#)
                                (LETT |pts|
                                      (- (+ |pts| (QVELT |ans| 2)) 1) . #1#)
                                (LETT |done|
                                      (COND
                                        (|done| (QVELT |ans| 3))
                                        ('T 'NIL)) . #1#)
                                (LETT |x1| |x2| . #1#)
                                (EXIT (LETT |x2|
                                       (SPADCALL |x2| |hh|
                                        (QREFELT $ 13)) . #1#)))
                           (LETT |i| (QSADD1 |i|) . #1#) (GO G190) G191
                           (EXIT NIL))
                      (EXIT (PROGN
                              (LETT #0#
                                    (VECTOR |sum| |err| |pts| |done|) . #1#)
                              (GO #0#)))))
           #0# (EXIT #0#))))) 

(DEFUN |NUMQUAD;romberg;M4F2IR;4|
       (|func| |a| |b| |epsrel| |epsabs| |nmin| |nmax| $)
  (PROG (|length| #0=#:G1855 |table| |n| |newsum| |newest| |j| |i|
            |four| |change| |oldsum| |oldest| |delta| |pts| |qx1|
            #1=#:G1870)
    (RETURN
      (SEQ (EXIT (SEQ (LETT |length| (SPADCALL |b| |a| (QREFELT $ 11))
                            . #2=(|NUMQUAD;romberg;M4F2IR;4|))
                      (LETT |delta| |length| . #2#)
                      (LETT |newsum|
                            (SPADCALL
                                (SPADCALL
                                    (SPADCALL 5 -1 10 (QREFELT $ 10))
                                    |length| (QREFELT $ 32))
                                (SPADCALL (SPADCALL |a| |func|)
                                    (SPADCALL |b| |func|)
                                    (QREFELT $ 13))
                                (QREFELT $ 32)) . #2#)
                      (LETT |newest|
                            (SPADCALL 0 0 10 (QREFELT $ 10)) . #2#)
                      (LETT |oldsum|
                            (SPADCALL 0 0 10 (QREFELT $ 10)) . #2#)
                      (LETT |oldest|
                            (SPADCALL 0 0 10 (QREFELT $ 10)) . #2#)
                      (LETT |change|
                            (SPADCALL 0 0 10 (QREFELT $ 10)) . #2#)
                      (LETT |qx1| |newsum| . #2#)
                      (LETT |table|
                            (SPADCALL
                                (PROG1 (LETT #0# (+ |nmax| 1) . #2#)
                                  (|check-subtype| (> #0# 0)
                                      '(|PositiveInteger|) #0#))
                                (SPADCALL 0 0 10 (QREFELT $ 10))
                                (QREFELT $ 35)) . #2#)
                      (LETT |n| 1 . #2#) (LETT |pts| 1 . #2#)
                      (COND
                        ((< |nmin| 2)
                         (SEQ (SPADCALL
                                  "romberg: nmin to small (nmin > 1) nmin = "
                                  (SPADCALL |nmin| (QREFELT $ 36))
                                  (QREFELT $ 39))
                              (EXIT (PROGN
                                      (LETT #1#
                                       (VECTOR
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        0 'NIL) . #2#)
                                      (GO #1#))))))
                      (COND
                        ((< |nmax| |nmin|)
                         (SEQ (SPADCALL
                                  "romberg: nmax < nmin : nmax = "
                                  (SPADCALL |nmax| (QREFELT $ 36))
                                  (QREFELT $ 39))
                              (SPADCALL
                                  "                       nmin = "
                                  (SPADCALL |nmin| (QREFELT $ 36))
                                  (QREFELT $ 39))
                              (EXIT (PROGN
                                      (LETT #1#
                                       (VECTOR
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        0 'NIL) . #2#)
                                      (GO #1#))))))
                      (COND
                        ((SPADCALL |a| |b| (QREFELT $ 41))
                         (SEQ (SPADCALL
                                  "romberg: integration limits are equal  = "
                                  (SPADCALL |a| (QREFELT $ 15))
                                  (QREFELT $ 39))
                              (EXIT (PROGN
                                      (LETT #1#
                                       (VECTOR
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        1 'T) . #2#)
                                      (GO #1#))))))
                      (COND
                        ((SPADCALL |epsrel|
                             (SPADCALL 0 0 10 (QREFELT $ 10))
                             (QREFELT $ 42))
                         (SEQ (SPADCALL
                                  "romberg: epsr < 0.0            epsr  = "
                                  (SPADCALL |epsrel| (QREFELT $ 15))
                                  (QREFELT $ 39))
                              (EXIT (PROGN
                                      (LETT #1#
                                       (VECTOR
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        0 'NIL) . #2#)
                                      (GO #1#))))))
                      (COND
                        ((SPADCALL |epsabs|
                             (SPADCALL 0 0 10 (QREFELT $ 10))
                             (QREFELT $ 42))
                         (SEQ (SPADCALL
                                  "romberg: epsa < 0.0            epsa  = "
                                  (SPADCALL |epsabs| (QREFELT $ 15))
                                  (QREFELT $ 39))
                              (EXIT (PROGN
                                      (LETT #1#
                                       (VECTOR
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        0 'NIL) . #2#)
                                      (GO #1#))))))
                      (SEQ (LETT |n| 1 . #2#) G190
                           (COND
                             ((QSGREATERP |n| |nmax|) #3=(GO G191)))
                           (SEQ (LETT |oldsum| |newsum| . #2#)
                                (LETT |newsum|
                                      (|NUMQUAD;trapclosed| |func| |a|
                                       |delta| |oldsum| |pts| $) . #2#)
                                (LETT |newest|
                                      (SPADCALL
                                       (SPADCALL
                                        (SPADCALL
                                         (SPADCALL 4 0 10
                                          (QREFELT $ 10))
                                         |newsum| (QREFELT $ 32))
                                        |oldsum| (QREFELT $ 11))
                                       (SPADCALL 3 0 10 (QREFELT $ 10))
                                       (QREFELT $ 43)) . #2#)
                                (LETT |four| 4 . #2#)
                                (SPADCALL |table| |n| |newest|
                                    (QREFELT $ 44))
                                (SEQ (LETT |j| 2 . #2#) G190
                                     (COND ((QSGREATERP |j| |n|) #3#))
                                     (SEQ
                                      (LETT |i|
                                       (- (+ |n| 1) |j|) . #2#)
                                      (LETT |four|
                                       (SPADCALL |four| 4
                                        (QREFELT $ 46)) . #2#)
                                      (EXIT
                                       (SPADCALL |table| |i|
                                        (SPADCALL
                                         (SPADCALL |table| (+ |i| 1)
                                          (QREFELT $ 47))
                                         (SPADCALL
                                          (SPADCALL
                                           (SPADCALL |table| (+ |i| 1)
                                            (QREFELT $ 47))
                                           (SPADCALL |table| |i|
                                            (QREFELT $ 47))
                                           (QREFELT $ 11))
                                          (- |four| 1) (QREFELT $ 12))
                                         (QREFELT $ 13))
                                        (QREFELT $ 44))))
                                     (LETT |j| (QSADD1 |j|) . #2#)
                                     #4=(GO G190) G191 (EXIT NIL))
                                (COND
                                  ((< |nmin| |n|)
                                   (SEQ
                                    (LETT |change|
                                     (SPADCALL
                                      (SPADCALL
                                       (SPADCALL |table| 1
                                        (QREFELT $ 47))
                                       |qx1| (QREFELT $ 11))
                                      (QREFELT $ 26)) . #2#)
                                    (COND
                                      ((SPADCALL |change|
                                        (SPADCALL
                                         (SPADCALL |epsrel| |qx1|
                                          (QREFELT $ 32))
                                         (QREFELT $ 26))
                                        (QREFELT $ 42))
                                       (PROGN
                                         (LETT #1#
                                          (VECTOR
                                           (SPADCALL |table| 1
                                            (QREFELT $ 47))
                                           |change|
                                           (+
                                            (SPADCALL 2 |pts|
                                             (QREFELT $ 48))
                                            1)
                                           'T) . #2#)
                                         (GO #1#))))
                                    (EXIT
                                     (COND
                                       ((SPADCALL |change| |epsabs|
                                         (QREFELT $ 42))
                                        (PROGN
                                          (LETT #1#
                                           (VECTOR
                                            (SPADCALL |table| 1
                                             (QREFELT $ 47))
                                            |change|
                                            (+
                                             (SPADCALL 2 |pts|
                                              (QREFELT $ 48))
                                             1)
                                            'T) . #2#)
                                          (GO #1#))))))))
                                (LETT |oldsum| |newsum| . #2#)
                                (LETT |oldest| |newest| . #2#)
                                (LETT |delta|
                                      (SPADCALL
                                       (SPADCALL 5 -1 10
                                        (QREFELT $ 10))
                                       |delta| (QREFELT $ 32)) . #2#)
                                (LETT |pts|
                                      (SPADCALL 2 |pts| (QREFELT $ 48)) . #2#)
                                (EXIT (LETT |qx1|
                                       (SPADCALL |table| 1
                                        (QREFELT $ 47)) . #2#)))
                           (LETT |n| (QSADD1 |n|) . #2#) #4# G191
                           (EXIT NIL))
                      (EXIT (PROGN
                              (LETT #1#
                                    (VECTOR
                                     (SPADCALL |table| 1
                                      (QREFELT $ 47))
                                     (SPADCALL
                                      (SPADCALL 125 -2 10
                                       (QREFELT $ 10))
                                      |change| (QREFELT $ 32))
                                     (+ |pts| 1) 'NIL) . #2#)
                              (GO #1#)))))
           #1# (EXIT #1#))))) 

(DEFUN |NUMQUAD;simpson;M4F2IR;5|
       (|func| |a| |b| |epsrel| |epsabs| |nmin| |nmax| $)
  (PROG (|length| |n| |newsum| |newest| |change| |oldsum| |oldest|
            |delta| |pts| #0=#:G1884)
    (RETURN
      (SEQ (EXIT (SEQ (LETT |length| (SPADCALL |b| |a| (QREFELT $ 11))
                            . #1=(|NUMQUAD;simpson;M4F2IR;5|))
                      (LETT |delta| |length| . #1#)
                      (LETT |newsum|
                            (SPADCALL
                                (SPADCALL
                                    (SPADCALL 5 -1 10 (QREFELT $ 10))
                                    (SPADCALL |b| |a| (QREFELT $ 11))
                                    (QREFELT $ 32))
                                (SPADCALL (SPADCALL |a| |func|)
                                    (SPADCALL |b| |func|)
                                    (QREFELT $ 13))
                                (QREFELT $ 32)) . #1#)
                      (LETT |newest|
                            (SPADCALL 0 0 10 (QREFELT $ 10)) . #1#)
                      (LETT |oldsum|
                            (SPADCALL 0 0 10 (QREFELT $ 10)) . #1#)
                      (LETT |oldest|
                            (SPADCALL 0 0 10 (QREFELT $ 10)) . #1#)
                      (LETT |change|
                            (SPADCALL 0 0 10 (QREFELT $ 10)) . #1#)
                      (LETT |n| 1 . #1#) (LETT |pts| 1 . #1#)
                      (COND
                        ((< |nmin| 2)
                         (SEQ (SPADCALL
                                  "simpson: nmin to small (nmin > 1) nmin = "
                                  (SPADCALL |nmin| (QREFELT $ 36))
                                  (QREFELT $ 39))
                              (EXIT (PROGN
                                      (LETT #0#
                                       (VECTOR
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        0 'NIL) . #1#)
                                      (GO #0#))))))
                      (COND
                        ((< |nmax| |nmin|)
                         (SEQ (SPADCALL
                                  "simpson: nmax < nmin : nmax = "
                                  (SPADCALL |nmax| (QREFELT $ 36))
                                  (QREFELT $ 39))
                              (SPADCALL
                                  "                       nmin = "
                                  (SPADCALL |nmin| (QREFELT $ 36))
                                  (QREFELT $ 39))
                              (EXIT (PROGN
                                      (LETT #0#
                                       (VECTOR
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        0 'NIL) . #1#)
                                      (GO #0#))))))
                      (COND
                        ((SPADCALL |a| |b| (QREFELT $ 41))
                         (SEQ (SPADCALL
                                  "simpson: integration limits are equal  = "
                                  (SPADCALL |a| (QREFELT $ 15))
                                  (QREFELT $ 39))
                              (EXIT (PROGN
                                      (LETT #0#
                                       (VECTOR
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        1 'T) . #1#)
                                      (GO #0#))))))
                      (COND
                        ((SPADCALL |epsrel|
                             (SPADCALL 0 0 10 (QREFELT $ 10))
                             (QREFELT $ 42))
                         (SEQ (SPADCALL "simpson: epsr < 0.0 : epsr = "
                                  (SPADCALL |epsrel| (QREFELT $ 15))
                                  (QREFELT $ 39))
                              (EXIT (PROGN
                                      (LETT #0#
                                       (VECTOR
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        0 'NIL) . #1#)
                                      (GO #0#))))))
                      (COND
                        ((SPADCALL |epsabs|
                             (SPADCALL 0 0 10 (QREFELT $ 10))
                             (QREFELT $ 42))
                         (SEQ (SPADCALL "simpson: epsa < 0.0 : epsa = "
                                  (SPADCALL |epsabs| (QREFELT $ 15))
                                  (QREFELT $ 39))
                              (EXIT (PROGN
                                      (LETT #0#
                                       (VECTOR
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        0 'NIL) . #1#)
                                      (GO #0#))))))
                      (SEQ (LETT |n| 1 . #1#) G190
                           (COND ((QSGREATERP |n| |nmax|) (GO G191)))
                           (SEQ (LETT |oldsum| |newsum| . #1#)
                                (LETT |newsum|
                                      (|NUMQUAD;trapclosed| |func| |a|
                                       |delta| |oldsum| |pts| $) . #1#)
                                (LETT |newest|
                                      (SPADCALL
                                       (SPADCALL
                                        (SPADCALL
                                         (SPADCALL 4 0 10
                                          (QREFELT $ 10))
                                         |newsum| (QREFELT $ 32))
                                        |oldsum| (QREFELT $ 11))
                                       (SPADCALL 3 0 10 (QREFELT $ 10))
                                       (QREFELT $ 43)) . #1#)
                                (COND
                                  ((< |nmin| |n|)
                                   (SEQ
                                    (LETT |change|
                                     (SPADCALL
                                      (SPADCALL |newest| |oldest|
                                       (QREFELT $ 11))
                                      (QREFELT $ 26)) . #1#)
                                    (COND
                                      ((SPADCALL |change|
                                        (SPADCALL
                                         (SPADCALL |epsrel| |oldest|
                                          (QREFELT $ 32))
                                         (QREFELT $ 26))
                                        (QREFELT $ 42))
                                       (PROGN
                                         (LETT #0#
                                          (VECTOR |newest|
                                           (SPADCALL
                                            (SPADCALL 125 -2 10
                                             (QREFELT $ 10))
                                            |change| (QREFELT $ 32))
                                           (+
                                            (SPADCALL 2 |pts|
                                             (QREFELT $ 48))
                                            1)
                                           'T) . #1#)
                                         (GO #0#))))
                                    (EXIT
                                     (COND
                                       ((SPADCALL |change| |epsabs|
                                         (QREFELT $ 42))
                                        (PROGN
                                          (LETT #0#
                                           (VECTOR |newest|
                                            (SPADCALL
                                             (SPADCALL 125 -2 10
                                              (QREFELT $ 10))
                                             |change| (QREFELT $ 32))
                                            (+
                                             (SPADCALL 2 |pts|
                                              (QREFELT $ 48))
                                             1)
                                            'T) . #1#)
                                          (GO #0#))))))))
                                (LETT |oldsum| |newsum| . #1#)
                                (LETT |oldest| |newest| . #1#)
                                (LETT |delta|
                                      (SPADCALL
                                       (SPADCALL 5 -1 10
                                        (QREFELT $ 10))
                                       |delta| (QREFELT $ 32)) . #1#)
                                (EXIT (LETT |pts|
                                       (SPADCALL 2 |pts|
                                        (QREFELT $ 48)) . #1#)))
                           (LETT |n| (QSADD1 |n|) . #1#) (GO G190) G191
                           (EXIT NIL))
                      (EXIT (PROGN
                              (LETT #0#
                                    (VECTOR |newest|
                                     (SPADCALL
                                      (SPADCALL 125 -2 10
                                       (QREFELT $ 10))
                                      |change| (QREFELT $ 32))
                                     (+ |pts| 1) 'NIL) . #1#)
                              (GO #0#)))))
           #0# (EXIT #0#))))) 

(DEFUN |NUMQUAD;trapezoidal;M4F2IR;6|
       (|func| |a| |b| |epsrel| |epsabs| |nmin| |nmax| $)
  (PROG (|length| |n| |oldsum| |newsum| |change| |delta| |pts|
            #0=#:G1898)
    (RETURN
      (SEQ (EXIT (SEQ (LETT |length| (SPADCALL |b| |a| (QREFELT $ 11))
                            . #1=(|NUMQUAD;trapezoidal;M4F2IR;6|))
                      (LETT |delta| |length| . #1#)
                      (LETT |newsum|
                            (SPADCALL
                                (SPADCALL
                                    (SPADCALL 5 -1 10 (QREFELT $ 10))
                                    (SPADCALL |b| |a| (QREFELT $ 11))
                                    (QREFELT $ 32))
                                (SPADCALL (SPADCALL |a| |func|)
                                    (SPADCALL |b| |func|)
                                    (QREFELT $ 13))
                                (QREFELT $ 32)) . #1#)
                      (LETT |change|
                            (SPADCALL 0 0 10 (QREFELT $ 10)) . #1#)
                      (LETT |n| 1 . #1#) (LETT |pts| 1 . #1#)
                      (COND
                        ((< |nmin| 2)
                         (SEQ (SPADCALL
                                  "trapezoidal: nmin to small (nmin > 1) nmin = "
                                  (SPADCALL |nmin| (QREFELT $ 36))
                                  (QREFELT $ 39))
                              (EXIT (PROGN
                                      (LETT #0#
                                       (VECTOR
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        0 'NIL) . #1#)
                                      (GO #0#))))))
                      (COND
                        ((< |nmax| |nmin|)
                         (SEQ (SPADCALL
                                  "trapezoidal: nmax < nmin : nmax = "
                                  (SPADCALL |nmax| (QREFELT $ 36))
                                  (QREFELT $ 39))
                              (SPADCALL
                                  "                           nmin = "
                                  (SPADCALL |nmin| (QREFELT $ 36))
                                  (QREFELT $ 39))
                              (EXIT (PROGN
                                      (LETT #0#
                                       (VECTOR
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        0 'NIL) . #1#)
                                      (GO #0#))))))
                      (COND
                        ((SPADCALL |a| |b| (QREFELT $ 41))
                         (SEQ (SPADCALL
                                  "trapezoidal: integration limits are equal  = "
                                  (SPADCALL |a| (QREFELT $ 15))
                                  (QREFELT $ 39))
                              (EXIT (PROGN
                                      (LETT #0#
                                       (VECTOR
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        1 'T) . #1#)
                                      (GO #0#))))))
                      (COND
                        ((SPADCALL |epsrel|
                             (SPADCALL 0 0 10 (QREFELT $ 10))
                             (QREFELT $ 42))
                         (SEQ (SPADCALL
                                  "trapezoidal: epsr < 0.0 : epsr = "
                                  (SPADCALL |epsrel| (QREFELT $ 15))
                                  (QREFELT $ 39))
                              (EXIT (PROGN
                                      (LETT #0#
                                       (VECTOR
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        0 'NIL) . #1#)
                                      (GO #0#))))))
                      (COND
                        ((SPADCALL |epsabs|
                             (SPADCALL 0 0 10 (QREFELT $ 10))
                             (QREFELT $ 42))
                         (SEQ (SPADCALL
                                  "trapezoidal: epsa < 0.0 : epsa = "
                                  (SPADCALL |epsabs| (QREFELT $ 15))
                                  (QREFELT $ 39))
                              (EXIT (PROGN
                                      (LETT #0#
                                       (VECTOR
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        (SPADCALL 0 0 10
                                         (QREFELT $ 10))
                                        0 'NIL) . #1#)
                                      (GO #0#))))))
                      (SEQ (LETT |n| 1 . #1#) G190
                           (COND ((QSGREATERP |n| |nmax|) (GO G191)))
                           (SEQ (LETT |oldsum| |newsum| . #1#)
                                (LETT |newsum|
                                      (|NUMQUAD;trapclosed| |func| |a|
                                       |delta| |oldsum| |pts| $) . #1#)
                                (COND
                                  ((< |nmin| |n|)
                                   (SEQ
                                    (LETT |change|
                                     (SPADCALL
                                      (SPADCALL |newsum| |oldsum|
                                       (QREFELT $ 11))
                                      (QREFELT $ 26)) . #1#)
                                    (COND
                                      ((SPADCALL |change|
                                        (SPADCALL
                                         (SPADCALL |epsrel| |oldsum|
                                          (QREFELT $ 32))
                                         (QREFELT $ 26))
                                        (QREFELT $ 42))
                                       (PROGN
                                         (LETT #0#
                                          (VECTOR |newsum|
                                           (SPADCALL
                                            (SPADCALL 125 -2 10
                                             (QREFELT $ 10))
                                            |change| (QREFELT $ 32))
                                           (+
                                            (SPADCALL 2 |pts|
                                             (QREFELT $ 48))
                                            1)
                                           'T) . #1#)
                                         (GO #0#))))
                                    (EXIT
                                     (COND
                                       ((SPADCALL |change| |epsabs|
                                         (QREFELT $ 42))
                                        (PROGN
                                          (LETT #0#
                                           (VECTOR |newsum|
                                            (SPADCALL
                                             (SPADCALL 125 -2 10
                                              (QREFELT $ 10))
                                             |change| (QREFELT $ 32))
                                            (+
                                             (SPADCALL 2 |pts|
                                              (QREFELT $ 48))
                                             1)
                                            'T) . #1#)
                                          (GO #0#))))))))
                                (LETT |delta|
                                      (SPADCALL
                                       (SPADCALL 5 -1 10
                                        (QREFELT $ 10))
                                       |delta| (QREFELT $ 32)) . #1#)
                                (EXIT (LETT |pts|
                                       (SPADCALL 2 |pts|
                                        (QREFELT $ 48)) . #1#)))
                           (LETT |n| (QSADD1 |n|) . #1#) (GO G190) G191
                           (EXIT NIL))
                      (EXIT (PROGN
                              (LETT #0#
                                    (VECTOR |newsum|
                                     (SPADCALL
                                      (SPADCALL 125 -2 10
                                       (QREFELT $ 10))
                                      |change| (QREFELT $ 32))
                                     (+ |pts| 1) 'NIL) . #1#)
                              (GO #0#)))))
           #0# (EXIT #0#))))) 

(DEFUN |NUMQUAD;rombergo;M4F2IR;7|
       (|func| |a| |b| |epsrel| |epsabs| |nmin| |nmax| $)
  (PROG (|length| #0=#:G1900 |table| |n| |newsum| |newest| |j| |i|
            |nine| |change| |oldsum| |oldest| |delta| |pts| |qx1|
            #1=#:G1908)
    (RETURN
      (SEQ (EXIT (SEQ (LETT |length| (SPADCALL |b| |a| (QREFELT $ 11))
                            . #2=(|NUMQUAD;rombergo;M4F2IR;7|))
                      (LETT |delta|
                            (SPADCALL |length|
                                (SPADCALL 3 0 10 (QREFELT $ 10))
                                (QREFELT $ 43)) . #2#)
                      (LETT |newsum|
                            (SPADCALL |length|
                                (SPADCALL
                                    (SPADCALL
                                     (SPADCALL 5 -1 10 (QREFELT $ 10))
                                     (SPADCALL |a| |b| (QREFELT $ 13))
                                     (QREFELT $ 32))
                                    |func|)
                                (QREFELT $ 32)) . #2#)
                      (LETT |newest|
                            (SPADCALL 0 0 10 (QREFELT $ 10)) . #2#)
                      (LETT |oldsum|
                            (SPADCALL 0 0 10 (QREFELT $ 10)) . #2#)
                      (LETT |oldest|
                            (SPADCALL 0 0 10 (QREFELT $ 10)) . #2#)
                      (LETT |change|
                            (SPADCALL 0 0 10 (QREFELT $ 10)) . #2#)
                      (LETT |qx1| |newsum| . #2#)
                      (LETT |table|
                            (SPADCALL
                                (PROG1 (LETT #0# (+ |nmax| 1) . #2#)
                                  (|check-subtype| (> #0# 0)
                                      '(|PositiveInteger|) #0#))
                                (SPADCALL 0 0 10 (QREFELT $ 10))
                                (QREFELT $ 35)) . #2#)
                      (LETT |n| 1 . #2#) (LETT |pts| 1 . #2#)
                      (SEQ (LETT |n| 1 . #2#) G190
                           (COND
                             ((QSGREATERP |n| |nmax|) #3=(GO G191)))
                           (SEQ (LETT |oldsum| |newsum| . #2#)
                                (LETT |newsum|
                                      (|NUMQUAD;trapopen| |func| |a|
                                       |delta| |oldsum| |pts| $) . #2#)
                                (LETT |newest|
                                      (SPADCALL
                                       (SPADCALL
                                        (SPADCALL
                                         (SPADCALL 9 0 10
                                          (QREFELT $ 10))
                                         |newsum| (QREFELT $ 32))
                                        |oldsum| (QREFELT $ 11))
                                       (SPADCALL 8 0 10 (QREFELT $ 10))
                                       (QREFELT $ 43)) . #2#)
                                (SPADCALL |table| |n| |newest|
                                    (QREFELT $ 44))
                                (LETT |nine| 9 . #2#)
                                (SPADCALL
                                    (SPADCALL |newest| (QREFELT $ 15))
                                    (QREFELT $ 49))
                                (SEQ (LETT |j| 2 . #2#) G190
                                     (COND ((QSGREATERP |j| |n|) #3#))
                                     (SEQ
                                      (LETT |i|
                                       (- (+ |n| 1) |j|) . #2#)
                                      (LETT |nine| (* |nine| 9) . #2#)
                                      (EXIT
                                       (SPADCALL |table| |i|
                                        (SPADCALL
                                         (SPADCALL |table| (+ |i| 1)
                                          (QREFELT $ 47))
                                         (SPADCALL
                                          (SPADCALL
                                           (SPADCALL |table| (+ |i| 1)
                                            (QREFELT $ 47))
                                           (SPADCALL |table| |i|
                                            (QREFELT $ 47))
                                           (QREFELT $ 11))
                                          (- |nine| 1) (QREFELT $ 12))
                                         (QREFELT $ 13))
                                        (QREFELT $ 44))))
                                     (LETT |j| (QSADD1 |j|) . #2#)
                                     #4=(GO G190) G191 (EXIT NIL))
                                (COND
                                  ((< |nmin| |n|)
                                   (SEQ
                                    (LETT |change|
                                     (SPADCALL
                                      (SPADCALL
                                       (SPADCALL |table| 1
                                        (QREFELT $ 47))
                                       |qx1| (QREFELT $ 11))
                                      (QREFELT $ 26)) . #2#)
                                    (COND
                                      ((SPADCALL |change|
                                        (SPADCALL
                                         (SPADCALL |epsrel| |qx1|
                                          (QREFELT $ 32))
                                         (QREFELT $ 26))
                                        (QREFELT $ 42))
                                       (PROGN
                                         (LETT #1#
                                          (VECTOR
                                           (SPADCALL |table| 1
                                            (QREFELT $ 47))
                                           (SPADCALL
                                            (SPADCALL 15 -1 10
                                             (QREFELT $ 10))
                                            |change| (QREFELT $ 32))
                                           (SPADCALL 3 |pts|
                                            (QREFELT $ 48))
                                           'T) . #2#)
                                         (GO #1#))))
                                    (EXIT
                                     (COND
                                       ((SPADCALL |change| |epsabs|
                                         (QREFELT $ 42))
                                        (PROGN
                                          (LETT #1#
                                           (VECTOR
                                            (SPADCALL |table| 1
                                             (QREFELT $ 47))
                                            (SPADCALL
                                             (SPADCALL 15 -1 10
                                              (QREFELT $ 10))
                                             |change| (QREFELT $ 32))
                                            (SPADCALL 3 |pts|
                                             (QREFELT $ 48))
                                            'T) . #2#)
                                          (GO #1#))))))))
                                (SPADCALL
                                    (SPADCALL |table| (QREFELT $ 50))
                                    (QREFELT $ 49))
                                (LETT |oldsum| |newsum| . #2#)
                                (LETT |oldest| |newest| . #2#)
                                (LETT |delta|
                                      (SPADCALL |delta|
                                       (SPADCALL 3 0 10 (QREFELT $ 10))
                                       (QREFELT $ 43)) . #2#)
                                (LETT |pts|
                                      (SPADCALL 3 |pts| (QREFELT $ 48)) . #2#)
                                (EXIT (LETT |qx1|
                                       (SPADCALL |table| 1
                                        (QREFELT $ 47)) . #2#)))
                           (LETT |n| (QSADD1 |n|) . #2#) #4# G191
                           (EXIT NIL))
                      (EXIT (PROGN
                              (LETT #1#
                                    (VECTOR
                                     (SPADCALL |table| 1
                                      (QREFELT $ 47))
                                     (SPADCALL
                                      (SPADCALL 15 -1 10
                                       (QREFELT $ 10))
                                      |change| (QREFELT $ 32))
                                     |pts| 'NIL) . #2#)
                              (GO #1#)))))
           #1# (EXIT #1#))))) 

(DEFUN |NUMQUAD;simpsono;M4F2IR;8|
       (|func| |a| |b| |epsrel| |epsabs| |nmin| |nmax| $)
  (PROG (|length| |n| |newsum| |newest| |change| |oldsum| |oldest|
            |delta| |pts| #0=#:G1915)
    (RETURN
      (SEQ (EXIT (SEQ (LETT |length| (SPADCALL |b| |a| (QREFELT $ 11))
                            . #1=(|NUMQUAD;simpsono;M4F2IR;8|))
                      (LETT |delta|
                            (SPADCALL |length|
                                (SPADCALL 3 0 10 (QREFELT $ 10))
                                (QREFELT $ 43)) . #1#)
                      (LETT |newsum|
                            (SPADCALL |length|
                                (SPADCALL
                                    (SPADCALL
                                     (SPADCALL 5 -1 10 (QREFELT $ 10))
                                     (SPADCALL |a| |b| (QREFELT $ 13))
                                     (QREFELT $ 32))
                                    |func|)
                                (QREFELT $ 32)) . #1#)
                      (LETT |newest|
                            (SPADCALL 0 0 10 (QREFELT $ 10)) . #1#)
                      (LETT |oldsum|
                            (SPADCALL 0 0 10 (QREFELT $ 10)) . #1#)
                      (LETT |oldest|
                            (SPADCALL 0 0 10 (QREFELT $ 10)) . #1#)
                      (LETT |change|
                            (SPADCALL 0 0 10 (QREFELT $ 10)) . #1#)
                      (LETT |n| 1 . #1#) (LETT |pts| 1 . #1#)
                      (SEQ (LETT |n| 1 . #1#) G190
                           (COND ((QSGREATERP |n| |nmax|) (GO G191)))
                           (SEQ (LETT |oldsum| |newsum| . #1#)
                                (LETT |newsum|
                                      (|NUMQUAD;trapopen| |func| |a|
                                       |delta| |oldsum| |pts| $) . #1#)
                                (LETT |newest|
                                      (SPADCALL
                                       (SPADCALL
                                        (SPADCALL
                                         (SPADCALL 9 0 10
                                          (QREFELT $ 10))
                                         |newsum| (QREFELT $ 32))
                                        |oldsum| (QREFELT $ 11))
                                       (SPADCALL 8 0 10 (QREFELT $ 10))
                                       (QREFELT $ 43)) . #1#)
                                (SPADCALL
                                    (SPADCALL |newest| (QREFELT $ 15))
                                    (QREFELT $ 49))
                                (COND
                                  ((< |nmin| |n|)
                                   (SEQ
                                    (LETT |change|
                                     (SPADCALL
                                      (SPADCALL |newest| |oldest|
                                       (QREFELT $ 11))
                                      (QREFELT $ 26)) . #1#)
                                    (COND
                                      ((SPADCALL |change|
                                        (SPADCALL
                                         (SPADCALL |epsrel| |oldest|
                                          (QREFELT $ 32))
                                         (QREFELT $ 26))
                                        (QREFELT $ 42))
                                       (PROGN
                                         (LETT #0#
                                          (VECTOR |newest|
                                           (SPADCALL
                                            (SPADCALL 15 -1 10
                                             (QREFELT $ 10))
                                            |change| (QREFELT $ 32))
                                           (SPADCALL 3 |pts|
                                            (QREFELT $ 48))
                                           'T) . #1#)
                                         (GO #0#))))
                                    (EXIT
                                     (COND
                                       ((SPADCALL |change| |epsabs|
                                         (QREFELT $ 42))
                                        (PROGN
                                          (LETT #0#
                                           (VECTOR |newest|
                                            (SPADCALL
                                             (SPADCALL 15 -1 10
                                              (QREFELT $ 10))
                                             |change| (QREFELT $ 32))
                                            (SPADCALL 3 |pts|
                                             (QREFELT $ 48))
                                            'T) . #1#)
                                          (GO #0#))))))))
                                (LETT |oldsum| |newsum| . #1#)
                                (LETT |oldest| |newest| . #1#)
                                (LETT |delta|
                                      (SPADCALL |delta|
                                       (SPADCALL 3 0 10 (QREFELT $ 10))
                                       (QREFELT $ 43)) . #1#)
                                (EXIT (LETT |pts|
                                       (SPADCALL 3 |pts|
                                        (QREFELT $ 48)) . #1#)))
                           (LETT |n| (QSADD1 |n|) . #1#) (GO G190) G191
                           (EXIT NIL))
                      (EXIT (PROGN
                              (LETT #0#
                                    (VECTOR |newest|
                                     (SPADCALL
                                      (SPADCALL 15 -1 10
                                       (QREFELT $ 10))
                                      |change| (QREFELT $ 32))
                                     |pts| 'NIL) . #1#)
                              (GO #0#)))))
           #0# (EXIT #0#))))) 

(DEFUN |NUMQUAD;trapezoidalo;M4F2IR;9|
       (|func| |a| |b| |epsrel| |epsabs| |nmin| |nmax| $)
  (PROG (|length| |n| |oldsum| |newsum| |change| |delta| |pts|
            #0=#:G1922)
    (RETURN
      (SEQ (EXIT (SEQ (LETT |length| (SPADCALL |b| |a| (QREFELT $ 11))
                            . #1=(|NUMQUAD;trapezoidalo;M4F2IR;9|))
                      (LETT |delta|
                            (SPADCALL |length|
                                (SPADCALL 3 0 10 (QREFELT $ 10))
                                (QREFELT $ 43)) . #1#)
                      (LETT |newsum|
                            (SPADCALL |length|
                                (SPADCALL
                                    (SPADCALL
                                     (SPADCALL 5 -1 10 (QREFELT $ 10))
                                     (SPADCALL |a| |b| (QREFELT $ 13))
                                     (QREFELT $ 32))
                                    |func|)
                                (QREFELT $ 32)) . #1#)
                      (LETT |change|
                            (SPADCALL 0 0 10 (QREFELT $ 10)) . #1#)
                      (LETT |pts| 1 . #1#)
                      (SEQ (LETT |n| 1 . #1#) G190
                           (COND ((QSGREATERP |n| |nmax|) (GO G191)))
                           (SEQ (LETT |oldsum| |newsum| . #1#)
                                (LETT |newsum|
                                      (|NUMQUAD;trapopen| |func| |a|
                                       |delta| |oldsum| |pts| $) . #1#)
                                (SPADCALL
                                    (SPADCALL |newsum| (QREFELT $ 15))
                                    (QREFELT $ 49))
                                (COND
                                  ((< |nmin| |n|)
                                   (SEQ
                                    (LETT |change|
                                     (SPADCALL
                                      (SPADCALL |newsum| |oldsum|
                                       (QREFELT $ 11))
                                      (QREFELT $ 26)) . #1#)
                                    (COND
                                      ((SPADCALL |change|
                                        (SPADCALL
                                         (SPADCALL |epsrel| |oldsum|
                                          (QREFELT $ 32))
                                         (QREFELT $ 26))
                                        (QREFELT $ 42))
                                       (PROGN
                                         (LETT #0#
                                          (VECTOR |newsum|
                                           (SPADCALL
                                            (SPADCALL 15 -1 10
                                             (QREFELT $ 10))
                                            |change| (QREFELT $ 32))
                                           (SPADCALL 3 |pts|
                                            (QREFELT $ 48))
                                           'T) . #1#)
                                         (GO #0#))))
                                    (EXIT
                                     (COND
                                       ((SPADCALL |change| |epsabs|
                                         (QREFELT $ 42))
                                        (PROGN
                                          (LETT #0#
                                           (VECTOR |newsum|
                                            (SPADCALL
                                             (SPADCALL 15 -1 10
                                              (QREFELT $ 10))
                                             |change| (QREFELT $ 32))
                                            (SPADCALL 3 |pts|
                                             (QREFELT $ 48))
                                            'T) . #1#)
                                          (GO #0#))))))))
                                (LETT |delta|
                                      (SPADCALL |delta|
                                       (SPADCALL 3 0 10 (QREFELT $ 10))
                                       (QREFELT $ 43)) . #1#)
                                (EXIT (LETT |pts|
                                       (SPADCALL 3 |pts|
                                        (QREFELT $ 48)) . #1#)))
                           (LETT |n| (QSADD1 |n|) . #1#) (GO G190) G191
                           (EXIT NIL))
                      (EXIT (PROGN
                              (LETT #0#
                                    (VECTOR |newsum|
                                     (SPADCALL
                                      (SPADCALL 15 -1 10
                                       (QREFELT $ 10))
                                      |change| (QREFELT $ 32))
                                     |pts| 'NIL) . #1#)
                              (GO #0#)))))
           #0# (EXIT #0#))))) 

(DEFUN |NUMQUAD;trapclosed| (|func| |start| |h| |oldsum| |numpoints| $)
  (PROG (|i| |sum| |x| #0=#:G1926)
    (RETURN
      (SEQ (EXIT (SEQ (LETT |x|
                            (SPADCALL |start|
                                (SPADCALL
                                    (SPADCALL 5 -1 10 (QREFELT $ 10))
                                    |h| (QREFELT $ 32))
                                (QREFELT $ 13))
                            . #1=(|NUMQUAD;trapclosed|))
                      (LETT |sum|
                            (SPADCALL 0 0 10 (QREFELT $ 10)) . #1#)
                      (SEQ (LETT |i| 1 . #1#) G190
                           (COND
                             ((QSGREATERP |i| |numpoints|) (GO G191)))
                           (SEQ (LETT |sum|
                                      (SPADCALL |sum|
                                       (SPADCALL |x| |func|)
                                       (QREFELT $ 13)) . #1#)
                                (EXIT (LETT |x|
                                       (SPADCALL |x| |h|
                                        (QREFELT $ 13)) . #1#)))
                           (LETT |i| (QSADD1 |i|) . #1#) (GO G190) G191
                           (EXIT NIL))
                      (EXIT (PROGN
                              (LETT #0#
                                    (SPADCALL
                                     (SPADCALL 5 -1 10 (QREFELT $ 10))
                                     (SPADCALL |oldsum|
                                      (SPADCALL |sum| |h|
                                       (QREFELT $ 32))
                                      (QREFELT $ 13))
                                     (QREFELT $ 32)) . #1#)
                              (GO #0#)))))
           #0# (EXIT #0#))))) 

(DEFUN |NUMQUAD;trapopen| (|func| |start| |del| |oldsum| |numpoints| $)
  (PROG (|ddel| |i| |sum| |x| #0=#:G1930)
    (RETURN
      (SEQ (EXIT (SEQ (LETT |ddel|
                            (SPADCALL (SPADCALL 2 0 10 (QREFELT $ 10))
                                |del| (QREFELT $ 32))
                            . #1=(|NUMQUAD;trapopen|))
                      (LETT |x|
                            (SPADCALL |start|
                                (SPADCALL
                                    (SPADCALL 5 -1 10 (QREFELT $ 10))
                                    |del| (QREFELT $ 32))
                                (QREFELT $ 13)) . #1#)
                      (LETT |sum|
                            (SPADCALL 0 0 10 (QREFELT $ 10)) . #1#)
                      (SEQ (LETT |i| 1 . #1#) G190
                           (COND
                             ((QSGREATERP |i| |numpoints|) (GO G191)))
                           (SEQ (LETT |sum|
                                      (SPADCALL |sum|
                                       (SPADCALL |x| |func|)
                                       (QREFELT $ 13)) . #1#)
                                (LETT |x|
                                      (SPADCALL |x| |ddel|
                                       (QREFELT $ 13)) . #1#)
                                (LETT |sum|
                                      (SPADCALL |sum|
                                       (SPADCALL |x| |func|)
                                       (QREFELT $ 13)) . #1#)
                                (EXIT (LETT |x|
                                       (SPADCALL |x| |del|
                                        (QREFELT $ 13)) . #1#)))
                           (LETT |i| (QSADD1 |i|) . #1#) (GO G190) G191
                           (EXIT NIL))
                      (EXIT (PROGN
                              (LETT #0#
                                    (SPADCALL
                                     (SPADCALL |oldsum|
                                      (SPADCALL 3 0 10 (QREFELT $ 10))
                                      (QREFELT $ 43))
                                     (SPADCALL |sum| |del|
                                      (QREFELT $ 32))
                                     (QREFELT $ 13)) . #1#)
                              (GO #0#)))))
           #0# (EXIT #0#))))) 

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

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

(MAKEPROP '|NumericalQuadrature| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|Float|) (0 . |Zero|) (|Integer|)
             (|PositiveInteger|) (4 . |float|) (11 . -) (17 . /)
             (23 . +) (|OutputForm|) (29 . |coerce|)
             (|Record| (|:| |value| 6) (|:| |error| 6)
                 (|:| |totalpts| 8) (|:| |success| 40))
             (|Mapping| 6 6) |NUMQUAD;romberg;M4F2IR;4| (34 . |One|)
             (|List| 14) (38 . |setelt|) (|List| $)
             (45 . |blankSeparate|) (|Void|) (50 . |print|)
             (55 . |abs|) |NUMQUAD;aromberg;M4F3IR;1|
             |NUMQUAD;simpson;M4F2IR;5| |NUMQUAD;asimpson;M4F3IR;2|
             |NUMQUAD;trapezoidal;M4F2IR;6|
             |NUMQUAD;atrapezoidal;M4F3IR;3| (60 . *)
             (|NonNegativeInteger|) (|Vector| 6) (66 . |new|)
             (72 . |coerce|) (|String|) (|OutputPackage|)
             (77 . |output|) (|Boolean|) (83 . =) (89 . <) (95 . /)
             (101 . |setelt|) (|SingleInteger|) (108 . *) (114 . |elt|)
             (120 . *) (126 . |output|) (131 . |coerce|)
             |NUMQUAD;rombergo;M4F2IR;7| |NUMQUAD;simpsono;M4F2IR;8|
             |NUMQUAD;trapezoidalo;M4F2IR;9|)
          '#(|trapezoidalo| 136 |trapezoidal| 147 |simpsono| 158
             |simpson| 169 |rombergo| 180 |romberg| 191 |atrapezoidal|
             202 |asimpson| 214 |aromberg| 226)
          'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 53
                                '(0 6 0 7 3 6 0 8 8 9 10 2 6 0 0 0 11 2
                                  6 0 0 8 12 2 6 0 0 0 13 1 6 14 0 15 0
                                  6 0 19 3 20 14 0 8 14 21 1 14 0 22 23
                                  1 14 24 0 25 1 6 0 0 26 2 6 0 0 0 32
                                  2 34 0 33 6 35 1 8 14 0 36 2 38 24 37
                                  14 39 2 6 40 0 0 41 2 6 40 0 0 42 2 6
                                  0 0 0 43 3 34 6 0 8 6 44 2 45 0 8 0
                                  46 2 34 6 0 8 47 2 8 0 9 0 48 1 38 24
                                  14 49 1 34 14 0 50 7 0 16 17 6 6 6 6
                                  8 8 53 7 0 16 17 6 6 6 6 8 8 30 7 0
                                  16 17 6 6 6 6 8 8 52 7 0 16 17 6 6 6
                                  6 8 8 28 7 0 16 17 6 6 6 6 8 8 51 7 0
                                  16 17 6 6 6 6 8 8 18 8 0 16 17 6 6 6
                                  6 8 8 8 31 8 0 16 17 6 6 6 6 8 8 8 29
                                  8 0 16 17 6 6 6 6 8 8 8 27)))))
          '|lookupComplete|)) 

(MAKEPROP '|NumericalQuadrature| 'NILADIC T) 
