Include the general multivariate polynomial Scheme code.
(define pbvp (html "r" (html "m" number->string))) (define ops (apply polpak (polpak + * - zero?))) (define p* (cadr ops)) (define p+ (car ops)) (define pn (caddr ops)) (define (sq x)(p* x x)) (define (p- x y) (p+ x (pn y))) (define r '(() (1))) (define m '((0 1))) (define d1 (sq (p- r (p- m '((1)))))) (define d2 (sq (p- r m))) (define pol (p+ (p* r (p* d1 d2)) (p+ (p* m d2) (p* (p- '((1)) m) d1)))) (pbvp pol) ; for specialization of m = 0.1: (define (val p x add mul zer) (let v ((p p)) (if (null? p) zer (add (car p) (mul x (v (cdr p))))))) (define (evx p) (val p 1/10 + * 0)) (define (ex p) (map evx p)) ; Alternate definitions for pol: (define pol (p- (p* r (p* d1 d2))(p- (p* m d2)(p* (p- '((1)) m) d1)))) ;between (define pol (p- (p* r (p* d1 d2))(p+ (p* m d2)(p* (p- '((1)) m) d1)))) ;to right