
(/VERSIONCHECK 2) 

(DEFUN |PINTERPA;LagrangeInterpolation;2LP;1| (|lx| |ly| $)
  (PROG (|i| |yi| #0=#:G1825 |xi| #1=#:G1824 |j| |xj| #2=#:G1826 |pp|
             |xp| |ip|)
    (RETURN
      (SEQ (COND
             ((NULL (EQL (LENGTH |lx|) (LENGTH |ly|)))
              (|error| "Different number of points and values."))
             ('T
              (SEQ (LETT |ip| (|spadConstant| $ 8)
                         . #3=(|PINTERPA;LagrangeInterpolation;2LP;1|))
                   (SEQ (LETT |i| 0 . #3#) (LETT |yi| NIL . #3#)
                        (LETT #0# |ly| . #3#) (LETT |xi| NIL . #3#)
                        (LETT #1# |lx| . #3#) G190
                        (COND
                          ((OR (ATOM #1#)
                               (PROGN (LETT |xi| (CAR #1#) . #3#) NIL)
                               (ATOM #0#)
                               (PROGN (LETT |yi| (CAR #0#) . #3#) NIL))
                           #4=(GO G191)))
                        (SEQ (LETT |pp| (|spadConstant| $ 9) . #3#)
                             (LETT |xp| (|spadConstant| $ 10) . #3#)
                             (SEQ (LETT |j| 0 . #3#)
                                  (LETT |xj| NIL . #3#)
                                  (LETT #2# |lx| . #3#) G190
                                  (COND
                                    ((OR (ATOM #2#)
                                      (PROGN
                                        (LETT |xj| (CAR #2#) . #3#)
                                        NIL))
                                     #4#))
                                  (SEQ (EXIT
                                        (COND
                                          ((COND
                                             ((EQL |i| |j|) 'NIL)
                                             ('T 'T))
                                           (SEQ
                                            (LETT |pp|
                                             (SPADCALL |pp|
                                              (SPADCALL
                                               (SPADCALL
                                                (|spadConstant| $ 10) 1
                                                (QREFELT $ 12))
                                               (SPADCALL |xj| 0
                                                (QREFELT $ 12))
                                               (QREFELT $ 14))
                                              (QREFELT $ 15)) . #3#)
                                            (EXIT
                                             (LETT |xp|
                                              (SPADCALL |xp|
                                               (SPADCALL |xi| |xj|
                                                (QREFELT $ 16))
                                               (QREFELT $ 17)) . #3#)))))))
                                  (LETT #2#
                                        (PROG1 (CDR #2#)
                                          (LETT |j| (QSADD1 |j|) . #3#)) . #3#)
                                  #5=(GO G190) G191 (EXIT NIL))
                             (EXIT (LETT |ip|
                                    (SPADCALL |ip|
                                     (SPADCALL
                                      (SPADCALL |yi| |xp|
                                       (QREFELT $ 18))
                                      |pp| (QREFELT $ 19))
                                     (QREFELT $ 20)) . #3#)))
                        (LETT #1#
                              (PROG1 (CDR #1#)
                                (LETT #0#
                                      (PROG1 (CDR #0#)
                                        (LETT |i| (QSADD1 |i|) . #3#)) . #3#)) . #3#)
                        #5# G191 (EXIT NIL))
                   (EXIT |ip|)))))))) 

(DEFUN |PolynomialInterpolationAlgorithms| (&REST #0=#:G1827)
  (PROG ()
    (RETURN
      (PROG (#1=#:G1828)
        (RETURN
          (COND
            ((LETT #1#
                   (|lassocShiftWithFunction| (|devaluateList| #0#)
                       (HGET |$ConstructorCache|
                             '|PolynomialInterpolationAlgorithms|)
                       '|domainEqualList|)
                   . #2=(|PolynomialInterpolationAlgorithms|))
             (|CDRwithIncrement| #1#))
            ('T
             (UNWIND-PROTECT
               (PROG1 (APPLY (|function|
                                 |PolynomialInterpolationAlgorithms;|)
                             #0#)
                 (LETT #1# T . #2#))
               (COND
                 ((NOT #1#)
                  (HREM |$ConstructorCache|
                        '|PolynomialInterpolationAlgorithms|))))))))))) 

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

(MAKEPROP '|PolynomialInterpolationAlgorithms| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
             (0 . |Zero|) (4 . |One|) (8 . |One|)
             (|NonNegativeInteger|) (12 . |monomial|) (18 . |Zero|)
             (22 . -) (28 . *) (34 . -) (40 . *) (46 . /) (52 . *)
             (58 . +) (|List| 6)
             |PINTERPA;LagrangeInterpolation;2LP;1|)
          '#(|LagrangeInterpolation| 64) 'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 22
                                '(0 7 0 8 0 7 0 9 0 6 0 10 2 7 0 6 11
                                  12 0 6 0 13 2 7 0 0 0 14 2 7 0 0 0 15
                                  2 6 0 0 0 16 2 6 0 0 0 17 2 6 0 0 0
                                  18 2 7 0 6 0 19 2 7 0 0 0 20 2 0 7 21
                                  21 22)))))
          '|lookupComplete|)) 
