anchor.diff:                 (cond
                    ((not (consp e)) e)
                    ((equal 'times (cadr e))
  -                  (g* gf (car e) (reduce (lambda (x y) (g+ gf x y)) (loop for n in (cddr e) collect (reduce-expr n)))))
  +                  (if (zerop (caddr e)) 0
  +                             (g* gf (car e) (reduce (lambda (x y) (g+ gf x y)) (loop for n in (cddr e) collect (reduce-expr n))))))
                    ((consp (cadr e))
                     (reduce (lambda (x y) (g+ gf x y)) (loop for n in e
                                                           collecting (reduce-expr n) into nn
                                                           finally (progn (format t "+ ~A~%" nn) (return nn)))))
                    (t (g+ gf (car e) (reduce-expr (cadr e)))))))
         (reduce-expr e)))
  -
  -
  -;; def gf_poly_div(dividend, divisor):
  -;;    msg_out = list(dividend) # Copy the dividend list and pad with 0 where the ecc bytes will be computed
  -;;    for i in range(0, len(dividend) - (len(divisor)-1)):
  -;;        coef = msg_out[i] # precaching
  -;;        if coef != 0: # log(0) is undefined, so we need to avoid that case explicitly (and it's also a good optimization).
  -;;            for j in range(1, len(divisor)): # in synthetic division, we always skip the first coefficient of the divisior,
  -;;                if divisor[j] != 0: # log(0) is undefined
  -;;                     msg_out[i + j] ^= gf_mul(divisor[j], coef) # equivalent to the more mathematically correct
  -;;
   
   ;; >>> aa.gf_poly_div([18,52,86,00,00],[1,3,2])
   ;; out[1] (0,1) = 52 ^ 3 * 18 = 2
  
positive.code: ;; out[5] (3,2) = 205 ^ 2 * 157 = 234
  ;; out[6] (3,3) = 0 ^ 4 * 157 = 78
  ;; [18, 2, 116, 157, 90, 234, 78]
               
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;; Reed-Solomon functions
  
negative.code:            :gdiv
             :gtest
             :times
             :rs-generator
             :rs-encode))
  
  (in-package :galois)
  
  