
(/VERSIONCHECK 2) 

(DEFUN |REAL0;negate| (|int| $)
  (CONS (SPADCALL (QCDR |int|) (QREFELT $ 8))
        (SPADCALL (QCAR |int|) (QREFELT $ 8)))) 

(DEFUN |REAL0;midpoint;RF;2| (|i| $)
  (SPADCALL (SPADCALL 1 2 (QREFELT $ 12))
            (SPADCALL (QCAR |i|) (QCDR |i|) (QREFELT $ 13)) (QREFELT $ 14))) 

(DEFUN |REAL0;midpoints;LL;3| (|li| $)
  (PROG (#1=#:G1818 |x| #2=#:G1817)
    (RETURN
     (SEQ
      (PROGN
       (LETT #2# NIL . #3=(|REAL0;midpoints;LL;3|))
       (SEQ (LETT |x| NIL . #3#) (LETT #1# |li| . #3#) G190
            (COND
             ((OR (ATOM #1#) (PROGN (LETT |x| (CAR #1#) . #3#) NIL))
              (GO G191)))
            (SEQ
             (EXIT (LETT #2# (CONS (SPADCALL |x| (QREFELT $ 16)) #2#) . #3#)))
            (LETT #1# (CDR #1#) . #3#) (GO G190) G191
            (EXIT (NREVERSE0 #2#)))))))) 

(DEFUN |REAL0;makeSqfr| (F $)
  (PROG (#1=#:G1827 #2=#:G1826 #3=#:G1828 #4=#:G1831 |s| |sqfr|)
    (RETURN
     (SEQ (LETT |sqfr| (SPADCALL F (QREFELT $ 21)) . #5=(|REAL0;makeSqfr|))
          (EXIT
           (LETT F
                 (PROGN
                  (LETT #1# NIL . #5#)
                  (SEQ (LETT |s| NIL . #5#)
                       (LETT #4# (SPADCALL |sqfr| (QREFELT $ 25)) . #5#) G190
                       (COND
                        ((OR (ATOM #4#) (PROGN (LETT |s| (CAR #4#) . #5#) NIL))
                         (GO G191)))
                       (SEQ
                        (EXIT
                         (PROGN
                          (LETT #3# (QCAR |s|) . #5#)
                          (COND
                           (#1#
                            (LETT #2# (SPADCALL #2# #3# (QREFELT $ 26)) . #5#))
                           ('T
                            (PROGN
                             (LETT #2# #3# . #5#)
                             (LETT #1# 'T . #5#)))))))
                       (LETT #4# (CDR #4#) . #5#) (GO G190) G191 (EXIT NIL))
                  (COND (#1# #2#) ('T (|spadConstant| $ 9))))
                 . #5#)))))) 

(DEFUN |REAL0;realZeros;PolL;5| (F $)
  (|REAL0;ReZeroSqfr| (|REAL0;makeSqfr| F $) $)) 

(DEFUN |REAL0;realZeros;PolFL;6| (F |rn| $)
  (PROG (#1=#:G1837 |int| #2=#:G1836)
    (RETURN
     (SEQ (LETT F (|REAL0;makeSqfr| F $) . #3=(|REAL0;realZeros;PolFL;6|))
          (EXIT
           (PROGN
            (LETT #2# NIL . #3#)
            (SEQ (LETT |int| NIL . #3#)
                 (LETT #1# (|REAL0;ReZeroSqfr| F $) . #3#) G190
                 (COND
                  ((OR (ATOM #1#) (PROGN (LETT |int| (CAR #1#) . #3#) NIL))
                   (GO G191)))
                 (SEQ
                  (EXIT
                   (LETT #2# (CONS (SPADCALL F |int| |rn| (QREFELT $ 28)) #2#)
                         . #3#)))
                 (LETT #1# (CDR #1#) . #3#) (GO G190) G191
                 (EXIT (NREVERSE0 #2#))))))))) 

(DEFUN |REAL0;realZeros;PolRL;7| (F |bounds| $)
  (PROG (#1=#:G1842 |rint| #2=#:G1848 |int| #3=#:G1847)
    (RETURN
     (SEQ (LETT F (|REAL0;makeSqfr| F $) . #4=(|REAL0;realZeros;PolRL;7|))
          (EXIT
           (PROGN
            (LETT #3# NIL . #4#)
            (SEQ (LETT |int| NIL . #4#)
                 (LETT #2# (|REAL0;ReZeroSqfr| F $) . #4#) G190
                 (COND
                  ((OR (ATOM #2#) (PROGN (LETT |int| (CAR #2#) . #4#) NIL))
                   (GO G191)))
                 (SEQ
                  (EXIT
                   (COND
                    ((QEQCAR
                      (LETT |rint| (SPADCALL F |int| |bounds| (QREFELT $ 31))
                            . #4#)
                      0)
                     (LETT #3#
                           (CONS
                            (PROG2
                                (LETT #1# |rint| . #4#)
                                (QCDR #1#)
                              (|check-union| (QEQCAR #1# 0)
                                             (|Record|
                                              (|:| |left|
                                                   (|Fraction| (|Integer|)))
                                              (|:| |right|
                                                   (|Fraction| (|Integer|))))
                                             #1#))
                            #3#)
                           . #4#)))))
                 (LETT #2# (CDR #2#) . #4#) (GO G190) G191
                 (EXIT (NREVERSE0 #3#))))))))) 

(DEFUN |REAL0;realZeros;PolRFL;8| (F |bounds| |rn| $)
  (PROG (#1=#:G1853 |int| #2=#:G1852)
    (RETURN
     (SEQ (LETT F (|REAL0;makeSqfr| F $) . #3=(|REAL0;realZeros;PolRFL;8|))
          (EXIT
           (PROGN
            (LETT #2# NIL . #3#)
            (SEQ (LETT |int| NIL . #3#)
                 (LETT #1# (SPADCALL F |bounds| (QREFELT $ 32)) . #3#) G190
                 (COND
                  ((OR (ATOM #1#) (PROGN (LETT |int| (CAR #1#) . #3#) NIL))
                   (GO G191)))
                 (SEQ
                  (EXIT
                   (LETT #2# (CONS (SPADCALL F |int| |rn| (QREFELT $ 28)) #2#)
                         . #3#)))
                 (LETT #1# (CDR #1#) . #3#) (GO G190) G191
                 (EXIT (NREVERSE0 #2#))))))))) 

(DEFUN |REAL0;ReZeroSqfr| (F $)
  (PROG (K J #1=#:G1871 |int| #2=#:G1870 |tempF| L |r|)
    (RETURN
     (SEQ
      (COND
       ((SPADCALL F (|spadConstant| $ 34) (QREFELT $ 36))
        (|error| "ReZeroSqfr: zero polynomial"))
       (#3='T
        (SEQ (LETT L NIL . #4=(|REAL0;ReZeroSqfr|))
             (EXIT
              (COND ((EQL (SPADCALL F (QREFELT $ 38)) 0) L)
                    (#3#
                     (SEQ
                      (SEQ (LETT |r| (SPADCALL F (QREFELT $ 39)) . #4#)
                           (EXIT
                            (COND
                             ((< 0 |r|)
                              (SEQ
                               (LETT L
                                     (LIST
                                      (CONS (|spadConstant| $ 40)
                                            (|spadConstant| $ 40)))
                                     . #4#)
                               (LETT |tempF|
                                     (SPADCALL F
                                               (SPADCALL 1 |r| (QREFELT $ 41))
                                               (QREFELT $ 43))
                                     . #4#)
                               (EXIT
                                (COND
                                 ((NULL (QEQCAR |tempF| 1))
                                  (LETT F (QCDR |tempF|) . #4#)))))))))
                      (LETT J
                            (PROGN
                             (LETT #2# NIL . #4#)
                             (SEQ (LETT |int| NIL . #4#)
                                  (LETT #1#
                                        (REVERSE
                                         (|REAL0;PosZero| (|REAL0;minus| F $)
                                          $))
                                        . #4#)
                                  G190
                                  (COND
                                   ((OR (ATOM #1#)
                                        (PROGN
                                         (LETT |int| (CAR #1#) . #4#)
                                         NIL))
                                    (GO G191)))
                                  (SEQ
                                   (EXIT
                                    (LETT #2#
                                          (CONS (|REAL0;negate| |int| $) #2#)
                                          . #4#)))
                                  (LETT #1# (CDR #1#) . #4#) (GO G190) G191
                                  (EXIT (NREVERSE0 #2#))))
                            . #4#)
                      (LETT K (|REAL0;PosZero| F $) . #4#)
                      (EXIT (APPEND (APPEND J L) K))))))))))))) 

(DEFUN |REAL0;PosZero| (F $)
  (PROG (L #1=#:G1876 |int| #2=#:G1875 |b|)
    (RETURN
     (SEQ (LETT |b| (|REAL0;rootBound| F $) . #3=(|REAL0;PosZero|))
          (LETT F (|REAL0;transMult| |b| F $) . #3#)
          (LETT L (|REAL0;Zero1| F $) . #3#)
          (EXIT
           (LETT L
                 (PROGN
                  (LETT #2# NIL . #3#)
                  (SEQ (LETT |int| NIL . #3#) (LETT #1# L . #3#) G190
                       (COND
                        ((OR (ATOM #1#)
                             (PROGN (LETT |int| (CAR #1#) . #3#) NIL))
                         (GO G191)))
                       (SEQ
                        (EXIT
                         (LETT #2#
                               (CONS
                                (CONS
                                 (SPADCALL |b| (QCAR |int|) (QREFELT $ 44))
                                 (SPADCALL |b| (QCDR |int|) (QREFELT $ 44)))
                                #2#)
                               . #3#)))
                       (LETT #1# (CDR #1#) . #3#) (GO G190) G191
                       (EXIT (NREVERSE0 #2#))))
                 . #3#)))))) 

(DEFUN |REAL0;Zero1| (F $)
  (PROG (K #1=#:G1890 |int| #2=#:G1889 J #3=#:G1888 #4=#:G1887 G |tempG| Q H
         |tempH| L |v|)
    (RETURN
     (SEQ (LETT L NIL . #5=(|REAL0;Zero1|))
          (LETT |v| (|REAL0;var| (|REAL0;transAdd1| (|REAL0;invert| F $) $) $)
                . #5#)
          (EXIT
           (COND ((EQL |v| 0) NIL)
                 ((EQL |v| 1)
                  (LETT L
                        (LIST
                         (CONS (|spadConstant| $ 40) (|spadConstant| $ 10)))
                        . #5#))
                 ('T
                  (SEQ (LETT G (|REAL0;transMultInv| 2 F $) . #5#)
                       (LETT H (|REAL0;transAdd1| G $) . #5#)
                       (COND
                        ((< 0 (SPADCALL H (QREFELT $ 39)))
                         (SEQ
                          (LETT L
                                (LIST
                                 (CONS (SPADCALL 1 2 (QREFELT $ 12))
                                       (SPADCALL 1 2 (QREFELT $ 12))))
                                . #5#)
                          (LETT Q (SPADCALL 1 1 (QREFELT $ 41)) . #5#)
                          (LETT |tempH| (SPADCALL H Q (QREFELT $ 43)) . #5#)
                          (COND
                           ((NULL (QEQCAR |tempH| 1))
                            (LETT H (QCDR |tempH|) . #5#)))
                          (LETT Q
                                (SPADCALL Q (SPADCALL -1 0 (QREFELT $ 41))
                                          (QREFELT $ 45))
                                . #5#)
                          (LETT |tempG| (SPADCALL G Q (QREFELT $ 43)) . #5#)
                          (EXIT
                           (COND
                            ((NULL (QEQCAR |tempG| 1))
                             (LETT G (QCDR |tempG|) . #5#)))))))
                       (LETT J
                             (PROGN
                              (LETT #4# NIL . #5#)
                              (SEQ (LETT |int| NIL . #5#)
                                   (LETT #3# (|REAL0;Zero1| H $) . #5#) G190
                                   (COND
                                    ((OR (ATOM #3#)
                                         (PROGN
                                          (LETT |int| (CAR #3#) . #5#)
                                          NIL))
                                     #6=(GO G191)))
                                   (SEQ
                                    (EXIT
                                     (LETT #4#
                                           (CONS
                                            (CONS
                                             (SPADCALL
                                              (SPADCALL (QCAR |int|)
                                                        (|spadConstant| $ 10)
                                                        (QREFELT $ 13))
                                              (SPADCALL 1 2 (QREFELT $ 12))
                                              (QREFELT $ 14))
                                             (SPADCALL
                                              (SPADCALL (QCDR |int|)
                                                        (|spadConstant| $ 10)
                                                        (QREFELT $ 13))
                                              (SPADCALL 1 2 (QREFELT $ 12))
                                              (QREFELT $ 14)))
                                            #4#)
                                           . #5#)))
                                   (LETT #3# (CDR #3#) . #5#) #7=(GO G190) G191
                                   (EXIT (NREVERSE0 #4#))))
                             . #5#)
                       (LETT K
                             (PROGN
                              (LETT #2# NIL . #5#)
                              (SEQ (LETT |int| NIL . #5#)
                                   (LETT #1# (|REAL0;Zero1| G $) . #5#) G190
                                   (COND
                                    ((OR (ATOM #1#)
                                         (PROGN
                                          (LETT |int| (CAR #1#) . #5#)
                                          NIL))
                                     #6#))
                                   (SEQ
                                    (EXIT
                                     (LETT #2#
                                           (CONS
                                            (CONS
                                             (SPADCALL (QCAR |int|)
                                                       (SPADCALL 1 2
                                                                 (QREFELT $
                                                                          12))
                                                       (QREFELT $ 14))
                                             (SPADCALL (QCDR |int|)
                                                       (SPADCALL 1 2
                                                                 (QREFELT $
                                                                          12))
                                                       (QREFELT $ 14)))
                                            #2#)
                                           . #5#)))
                                   (LETT #1# (CDR #1#) . #5#) #7# G191
                                   (EXIT (NREVERSE0 #2#))))
                             . #5#)
                       (EXIT (APPEND (APPEND J L) K)))))))))) 

(DEFUN |REAL0;rootBound| (F $)
  (PROG (|b| |i| |an| |lcoef|)
    (RETURN
     (SEQ
      (COND
       ((< (SPADCALL F (QREFELT $ 46)) 0)
        (LETT F (SPADCALL F (QREFELT $ 47)) . #1=(|REAL0;rootBound|))))
      (LETT |lcoef| (SPADCALL F (QREFELT $ 46)) . #1#)
      (LETT F (SPADCALL F (QREFELT $ 48)) . #1#) (LETT |i| 0 . #1#)
      (SEQ G190
           (COND
            ((NULL
              (COND ((SPADCALL F (|spadConstant| $ 34) (QREFELT $ 36)) 'NIL)
                    ('T 'T)))
             #2=(GO G191)))
           (SEQ
            (SEQ (LETT |an| (SPADCALL F (QREFELT $ 46)) . #1#)
                 (EXIT (COND ((< |an| 0) (LETT |i| (- |i| |an|) . #1#)))))
            (EXIT (LETT F (SPADCALL F (QREFELT $ 48)) . #1#)))
           NIL #3=(GO G190) G191 (EXIT NIL))
      (LETT |b| 1 . #1#)
      (SEQ G190
           (COND ((NULL (COND ((< |i| (* |b| |lcoef|)) 'NIL) ('T 'T))) #2#))
           (SEQ (EXIT (LETT |b| (SPADCALL 2 |b| (QREFELT $ 50)) . #1#))) NIL
           #3# G191 (EXIT NIL))
      (EXIT |b|))))) 

(DEFUN |REAL0;transMult| (|c| F $)
  (PROG (G |n|)
    (RETURN
     (SEQ (LETT G (|spadConstant| $ 34) . #1=(|REAL0;transMult|))
          (SEQ G190
               (COND
                ((NULL
                  (COND
                   ((SPADCALL F (|spadConstant| $ 34) (QREFELT $ 36)) 'NIL)
                   ('T 'T)))
                 (GO G191)))
               (SEQ (LETT |n| (SPADCALL F (QREFELT $ 38)) . #1#)
                    (LETT G
                          (SPADCALL G
                                    (SPADCALL
                                     (* (EXPT |c| |n|)
                                        (SPADCALL F (QREFELT $ 46)))
                                     |n| (QREFELT $ 41))
                                    (QREFELT $ 45))
                          . #1#)
                    (EXIT (LETT F (SPADCALL F (QREFELT $ 48)) . #1#)))
               NIL (GO G190) G191 (EXIT NIL))
          (EXIT G))))) 

(DEFUN |REAL0;transMultInv| (|c| F $)
  (PROG (|d| G |cc| #1=#:G1904 |n|)
    (RETURN
     (SEQ (LETT |d| (SPADCALL F (QREFELT $ 38)) . #2=(|REAL0;transMultInv|))
          (LETT |cc| 1 . #2#)
          (LETT G (SPADCALL (SPADCALL F (QREFELT $ 46)) |d| (QREFELT $ 41))
                . #2#)
          (SEQ G190
               (COND
                ((NULL
                  (SEQ (LETT F (SPADCALL F (QREFELT $ 48)) . #2#)
                       (EXIT
                        (COND
                         ((SPADCALL F (|spadConstant| $ 34) (QREFELT $ 36))
                          'NIL)
                         ('T 'T)))))
                 (GO G191)))
               (SEQ (LETT |n| (SPADCALL F (QREFELT $ 38)) . #2#)
                    (LETT |cc|
                          (* |cc|
                             (EXPT |c|
                                   (PROG1 (LETT #1# (- |d| |n|) . #2#)
                                     (|check-subtype| (>= #1# 0)
                                                      '(|NonNegativeInteger|)
                                                      #1#))))
                          . #2#)
                    (LETT G
                          (SPADCALL G
                                    (SPADCALL
                                     (* |cc| (SPADCALL F (QREFELT $ 46))) |n|
                                     (QREFELT $ 41))
                                    (QREFELT $ 45))
                          . #2#)
                    (EXIT (LETT |d| |n| . #2#)))
               NIL (GO G190) G191 (EXIT NIL))
          (EXIT G))))) 

(DEFUN |REAL0;transAdd1| (F $)
  (PROG (|ans| |i| |j| #1=#:G1915 |v| |n|)
    (RETURN
     (SEQ (LETT |n| (SPADCALL F (QREFELT $ 38)) . #2=(|REAL0;transAdd1|))
          (LETT |v| (SPADCALL F (+ |n| 1) (QREFELT $ 52)) . #2#)
          (SEQ (LETT |i| 0 . #2#) (LETT #1# (- |n| 1) . #2#) G190
               (COND ((QSGREATERP |i| #1#) #3=(GO G191)))
               (SEQ
                (EXIT
                 (SEQ (LETT |j| (- |n| |i|) . #2#) G190
                      (COND ((> |j| |n|) #3#))
                      (SEQ
                       (EXIT
                        (QSETAREF1O |v| |j|
                                    (+ (QAREF1O |v| |j| 1)
                                       (QAREF1O |v| (+ |j| 1) 1))
                                    1)))
                      (LETT |j| (+ |j| 1) . #2#) #4=(GO G190) G191
                      (EXIT NIL))))
               (LETT |i| (QSADD1 |i|) . #2#) #4# G191 (EXIT NIL))
          (LETT |ans| (|spadConstant| $ 34) . #2#)
          (SEQ (LETT |i| 0 . #2#) G190 (COND ((QSGREATERP |i| |n|) #3#))
               (SEQ
                (EXIT
                 (LETT |ans|
                       (SPADCALL |ans|
                                 (SPADCALL (QAREF1O |v| (+ |i| 1) 1) |i|
                                           (QREFELT $ 41))
                                 (QREFELT $ 45))
                       . #2#)))
               (LETT |i| (QSADD1 |i|) . #2#) #4# G191 (EXIT NIL))
          (EXIT |ans|))))) 

(DEFUN |REAL0;minus| (F $)
  (PROG (G |coef| |n|)
    (RETURN
     (SEQ (LETT G (|spadConstant| $ 34) . #1=(|REAL0;minus|))
          (SEQ G190
               (COND
                ((NULL
                  (COND
                   ((SPADCALL F (|spadConstant| $ 34) (QREFELT $ 36)) 'NIL)
                   ('T 'T)))
                 (GO G191)))
               (SEQ (LETT |n| (SPADCALL F (QREFELT $ 38)) . #1#)
                    (LETT |coef| (SPADCALL F (QREFELT $ 46)) . #1#)
                    (EXIT
                     (COND
                      ((ODDP |n|)
                       (SEQ
                        (LETT G
                              (SPADCALL G
                                        (SPADCALL (- |coef|) |n|
                                                  (QREFELT $ 41))
                                        (QREFELT $ 45))
                              . #1#)
                        (EXIT (LETT F (SPADCALL F (QREFELT $ 48)) . #1#))))
                      ('T
                       (SEQ
                        (LETT G
                              (SPADCALL G (SPADCALL |coef| |n| (QREFELT $ 41))
                                        (QREFELT $ 45))
                              . #1#)
                        (EXIT (LETT F (SPADCALL F (QREFELT $ 48)) . #1#)))))))
               NIL (GO G190) G191 (EXIT NIL))
          (EXIT G))))) 

(DEFUN |REAL0;invert| (F $)
  (PROG (G #1=#:G1922 |n|)
    (RETURN
     (SEQ (LETT G (|spadConstant| $ 34) . #2=(|REAL0;invert|))
          (LETT |n| (SPADCALL F (QREFELT $ 38)) . #2#)
          (SEQ G190
               (COND
                ((NULL
                  (COND
                   ((SPADCALL F (|spadConstant| $ 34) (QREFELT $ 36)) 'NIL)
                   ('T 'T)))
                 (GO G191)))
               (SEQ
                (LETT G
                      (SPADCALL G
                                (SPADCALL (SPADCALL F (QREFELT $ 46))
                                          (PROG1
                                              (LETT #1#
                                                    (- |n|
                                                       (SPADCALL F
                                                                 (QREFELT $
                                                                          38)))
                                                    . #2#)
                                            (|check-subtype| (>= #1# 0)
                                                             '(|NonNegativeInteger|)
                                                             #1#))
                                          (QREFELT $ 41))
                                (QREFELT $ 45))
                      . #2#)
                (EXIT (LETT F (SPADCALL F (QREFELT $ 48)) . #2#)))
               NIL (GO G190) G191 (EXIT NIL))
          (EXIT G))))) 

(DEFUN |REAL0;var| (F $)
  (PROG (|LastCoef| |i| |next|)
    (RETURN
     (SEQ (LETT |i| 0 . #1=(|REAL0;var|))
          (LETT |LastCoef| (< (SPADCALL F (QREFELT $ 46)) 0) . #1#)
          (SEQ G190
               (COND
                ((NULL
                  (SEQ (LETT F (SPADCALL F (QREFELT $ 48)) . #1#)
                       (EXIT
                        (COND
                         ((SPADCALL F (|spadConstant| $ 34) (QREFELT $ 36))
                          'NIL)
                         ('T 'T)))))
                 (GO G191)))
               (SEQ (LETT |next| (< (SPADCALL F (QREFELT $ 46)) 0) . #1#)
                    (COND
                     (|LastCoef|
                      (COND
                       ((NULL |next|)
                        (COND (|LastCoef| (LETT |i| (+ |i| 1) . #1#))))))
                     ((OR |next| |LastCoef|) (LETT |i| (+ |i| 1) . #1#)))
                    (EXIT (LETT |LastCoef| |next| . #1#)))
               NIL (GO G190) G191 (EXIT NIL))
          (EXIT |i|))))) 

(DEFUN |REAL0;refine;Pol2RU;19| (F |int| |bounds| $)
  (PROG (|pt| |lseg|)
    (RETURN
     (SEQ
      (LETT |lseg|
            (SPADCALL (SPADCALL (QCDR |int|) (QCDR |bounds|) (QREFELT $ 53))
                      (SPADCALL (QCAR |int|) (QCAR |bounds|) (QREFELT $ 54))
                      (QREFELT $ 55))
            . #1=(|REAL0;refine;Pol2RU;19|))
      (EXIT
       (COND
        ((SPADCALL |lseg| (|spadConstant| $ 40) (QREFELT $ 56))
         (CONS 1 "failed"))
        ((SPADCALL |lseg| (|spadConstant| $ 40) (QREFELT $ 57))
         (SEQ
          (LETT |pt|
                (COND
                 ((SPADCALL (QCAR |int|) (QCDR |bounds|) (QREFELT $ 57))
                  (QCAR |int|))
                 (#2='T (QCDR |int|)))
                . #1#)
          (EXIT
           (COND
            ((EQL
              (SPADCALL
               (|REAL0;transMultInv| (SPADCALL |pt| (QREFELT $ 58)) F $)
               (SPADCALL |pt| (QREFELT $ 59)) (QREFELT $ 60))
              0)
             (CONS 0 (CONS |pt| |pt|)))
            (#2# (CONS 1 "failed"))))))
        (#2#
         (COND
          ((SPADCALL |lseg| (SPADCALL (QCDR |int|) (QCAR |int|) (QREFELT $ 55))
                     (QREFELT $ 57))
           (CONS 0 |int|))
          (#2#
           (SPADCALL F (SPADCALL F |int| |lseg| (QREFELT $ 28)) |bounds|
                     (QREFELT $ 31))))))))))) 

(DEFUN |REAL0;refine;PolRFR;20| (F |int| |eps| $)
  (PROG (|xfl| |ad| |an| |b| |a| |bd| |bn| |v| |midd| |midn| |mid| |u|
         #1=#:G1941)
    (RETURN
     (SEQ (LETT |a| (QCAR |int|) . #2=(|REAL0;refine;PolRFR;20|))
          (LETT |b| (QCDR |int|) . #2#)
          (EXIT
           (COND ((SPADCALL |a| |b| (QREFELT $ 57)) (CONS |a| |b|))
                 ('T
                  (SEQ (LETT |an| (SPADCALL |a| (QREFELT $ 59)) . #2#)
                       (LETT |ad| (SPADCALL |a| (QREFELT $ 58)) . #2#)
                       (LETT |bn| (SPADCALL |b| (QREFELT $ 59)) . #2#)
                       (LETT |bd| (SPADCALL |b| (QREFELT $ 58)) . #2#)
                       (LETT |xfl| 'NIL . #2#)
                       (SEQ
                        (LETT |u|
                              (SPADCALL (|REAL0;transMultInv| |ad| F $) |an|
                                        (QREFELT $ 60))
                              . #2#)
                        (EXIT
                         (COND
                          ((EQL |u| 0)
                           (SEQ
                            (LETT F
                                  (PROG2
                                      (LETT #1#
                                            (SPADCALL F
                                                      (SPADCALL
                                                       (SPADCALL |ad| 1
                                                                 (QREFELT $
                                                                          41))
                                                       (SPADCALL |an| 0
                                                                 (QREFELT $
                                                                          41))
                                                       (QREFELT $ 61))
                                                      (QREFELT $ 43))
                                            . #2#)
                                      (QCDR #1#)
                                    (|check-union| (QEQCAR #1# 0) (QREFELT $ 6)
                                                   #1#))
                                  . #2#)
                            (EXIT
                             (LETT |u|
                                   (SPADCALL (|REAL0;transMultInv| |ad| F $)
                                             |an| (QREFELT $ 60))
                                   . #2#)))))))
                       (SEQ
                        (LETT |v|
                              (SPADCALL (|REAL0;transMultInv| |bd| F $) |bn|
                                        (QREFELT $ 60))
                              . #2#)
                        (EXIT
                         (COND
                          ((EQL |v| 0)
                           (SEQ
                            (LETT F
                                  (PROG2
                                      (LETT #1#
                                            (SPADCALL F
                                                      (SPADCALL
                                                       (SPADCALL |bd| 1
                                                                 (QREFELT $
                                                                          41))
                                                       (SPADCALL |bn| 0
                                                                 (QREFELT $
                                                                          41))
                                                       (QREFELT $ 61))
                                                      (QREFELT $ 43))
                                            . #2#)
                                      (QCDR #1#)
                                    (|check-union| (QEQCAR #1# 0) (QREFELT $ 6)
                                                   #1#))
                                  . #2#)
                            (LETT |v|
                                  (SPADCALL (|REAL0;transMultInv| |bd| F $)
                                            |bn| (QREFELT $ 60))
                                  . #2#)
                            (EXIT
                             (LETT |u|
                                   (SPADCALL (|REAL0;transMultInv| |ad| F $)
                                             |an| (QREFELT $ 60))
                                   . #2#)))))))
                       (COND
                        ((< 0 |u|)
                         (SEQ (LETT F (SPADCALL F (QREFELT $ 47)) . #2#)
                              (EXIT (LETT |v| (- |v|) . #2#)))))
                       (COND
                        ((< |v| 0)
                         (|error|
                          (LIST
                           (|coerceRe2E| |int|
                                         (ELT
                                          (|Record|
                                           (|:| |left|
                                                (|Fraction| (|Integer|)))
                                           (|:| |right|
                                                (|Fraction| (|Integer|))))
                                          0))
                           "is not a valid isolation interval for"
                           (SPADCALL F (QREFELT $ 63))))))
                       (COND
                        ((NULL
                          (SPADCALL (|spadConstant| $ 40) |eps|
                                    (QREFELT $ 56)))
                         (|error| "precision must be positive")))
                       (SEQ G190
                            (COND
                             ((NULL
                               (COND
                                ((SPADCALL (SPADCALL |b| |a| (QREFELT $ 55))
                                           |eps| (QREFELT $ 56))
                                 'NIL)
                                ('T 'T)))
                              (GO G191)))
                            (SEQ
                             (LETT |mid|
                                   (SPADCALL (SPADCALL |b| |a| (QREFELT $ 13))
                                             (SPADCALL 1 2 (QREFELT $ 12))
                                             (QREFELT $ 14))
                                   . #2#)
                             (LETT |midn| (SPADCALL |mid| (QREFELT $ 59))
                                   . #2#)
                             (LETT |midd| (SPADCALL |mid| (QREFELT $ 58))
                                   . #2#)
                             (LETT |v|
                                   (SPADCALL (|REAL0;transMultInv| |midd| F $)
                                             |midn| (QREFELT $ 60))
                                   . #2#)
                             (EXIT
                              (COND
                               ((< |v| 0)
                                (SEQ (LETT |a| |mid| . #2#)
                                     (LETT |an| |midn| . #2#)
                                     (EXIT (LETT |ad| |midd| . #2#))))
                               ((< 0 |v|)
                                (SEQ (LETT |b| |mid| . #2#)
                                     (LETT |bn| |midn| . #2#)
                                     (EXIT (LETT |bd| |midd| . #2#))))
                               ((EQL |v| 0)
                                (SEQ (LETT |a| |mid| . #2#)
                                     (LETT |b| |mid| . #2#)
                                     (LETT |an| |midn| . #2#)
                                     (LETT |ad| |midd| . #2#)
                                     (EXIT (LETT |xfl| 'T . #2#)))))))
                            NIL (GO G190) G191 (EXIT NIL))
                       (EXIT (CONS |a| |b|)))))))))) 

(DEFUN |RealZeroPackage| (#1=#:G1957)
  (PROG ()
    (RETURN
     (PROG (#2=#:G1958)
       (RETURN
        (COND
         ((LETT #2#
                (|lassocShiftWithFunction| (LIST (|devaluate| #1#))
                                           (HGET |$ConstructorCache|
                                                 '|RealZeroPackage|)
                                           '|domainEqualList|)
                . #3=(|RealZeroPackage|))
          (|CDRwithIncrement| #2#))
         ('T
          (UNWIND-PROTECT (PROG1 (|RealZeroPackage;| #1#) (LETT #2# T . #3#))
            (COND
             ((NOT #2#) (HREM |$ConstructorCache| '|RealZeroPackage|))))))))))) 

(DEFUN |RealZeroPackage;| (|#1|)
  (PROG (|pv$| $ |dv$| DV$1)
    (RETURN
     (PROGN
      (LETT DV$1 (|devaluate| |#1|) . #1=(|RealZeroPackage|))
      (LETT |dv$| (LIST '|RealZeroPackage| DV$1) . #1#)
      (LETT $ (GETREFV 64) . #1#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #1#))
      (|haddProp| |$ConstructorCache| '|RealZeroPackage| (LIST DV$1)
                  (CONS 1 $))
      (|stuffDomainSlots| $)
      (QSETREFV $ 6 |#1|)
      $)))) 

(MAKEPROP '|RealZeroPackage| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|Fraction| 11) (0 . -)
              (5 . |One|) (9 . |One|) (|Integer|) (13 . /) (19 . +) (25 . *)
              (|Record| (|:| |left| 7) (|:| |right| 7)) |REAL0;midpoint;RF;2|
              (|List| 7) (|List| 15) |REAL0;midpoints;LL;3| (|Factored| $)
              (31 . |squareFree|)
              (|Record| (|:| |factor| 6) (|:| |exponent| 11)) (|List| 22)
              (|Factored| 6) (36 . |factors|) (41 . *) |REAL0;realZeros;PolL;5|
              |REAL0;refine;PolRFR;20| |REAL0;realZeros;PolFL;6|
              (|Union| 15 '"failed") |REAL0;refine;Pol2RU;19|
              |REAL0;realZeros;PolRL;7| |REAL0;realZeros;PolRFL;8|
              (47 . |Zero|) (|Boolean|) (51 . =) (|NonNegativeInteger|)
              (57 . |degree|) (62 . |minimumDegree|) (67 . |Zero|)
              (71 . |monomial|) (|Union| $ '"failed") (77 . |exquo|) (83 . *)
              (89 . +) (95 . |leadingCoefficient|) (100 . -) (105 . |reductum|)
              (|PositiveInteger|) (110 . *) (|Vector| 11) (116 . |vectorise|)
              (122 . |min|) (128 . |max|) (134 . -) (140 . <) (146 . =)
              (152 . |denom|) (157 . |numer|) (162 . |elt|) (168 . -)
              (|OutputForm|) (174 . |coerce|))
           '#(|refine| 179 |realZeros| 193 |midpoints| 217 |midpoint| 222) 'NIL
           (CONS (|makeByteWordVec2| 1 'NIL)
                 (CONS '#()
                       (CONS '#()
                             (|makeByteWordVec2| 63
                                                 '(1 7 0 0 8 0 6 0 9 0 7 0 10 2
                                                   7 0 11 11 12 2 7 0 0 0 13 2
                                                   7 0 0 0 14 1 6 20 0 21 1 24
                                                   23 0 25 2 6 0 0 0 26 0 6 0
                                                   34 2 6 35 0 0 36 1 6 37 0 38
                                                   1 6 37 0 39 0 7 0 40 2 6 0
                                                   11 37 41 2 6 42 0 0 43 2 7 0
                                                   11 0 44 2 6 0 0 0 45 1 6 11
                                                   0 46 1 6 0 0 47 1 6 0 0 48 2
                                                   11 0 49 0 50 2 6 51 0 37 52
                                                   2 7 0 0 0 53 2 7 0 0 0 54 2
                                                   7 0 0 0 55 2 7 35 0 0 56 2 7
                                                   35 0 0 57 1 7 11 0 58 1 7 11
                                                   0 59 2 6 11 0 11 60 2 6 0 0
                                                   0 61 1 6 62 0 63 3 0 30 6 15
                                                   15 31 3 0 15 6 15 7 28 2 0
                                                   18 6 15 32 1 0 18 6 27 3 0
                                                   18 6 15 7 33 2 0 18 6 7 29 1
                                                   0 17 18 19 1 0 7 15 16)))))
           '|lookupComplete|)) 
