anchor.diff:                  factor)))
         ;; munge constraint
         (ecase type
  -        (<= (values v value))))))
  +        (<= (values (list v) (list value)))
  +        (>= (values (list (g* -1 v))
  +                    (list (- value))))
  +        (= (values (list v (g* -1 v))
  +                   (list value (- value))))
  +        ))))
   
   
   (defun qp-objectives (variables objectives)
  
positive.code:     ;; construct constraints
      (dolist (c constraints)
        (multiple-value-bind (row b-elt) (qp-constraint-rows vars c)
          (push row a-rows)
          (push b-elt b-list)))
      ;; upper/lower
      (multiple-value-bind (lower upper) (opt-bounds vars constraints
                                                     :default-lower default-lower
                                                     :default-upper default-upper)
        (let ((qp (make-qp :a (apply #'row-matrix a-rows)
                           :b (make-array (length b-list)
                                          :element-type 'double-float
                                          :initial-contents b-list)
                           :c (qp-objectives vars objectives)
                           :d (make-matrix n-var n-var)
                           :l lower
                           :u upper)))
          (qp-solve qp)
         ; qp
          ))))
  
negative.code:                     (values type (/ bound f)))
                (let ((i (opt-variable-position variables v)))
                  (labels ((upper ()
                             (assert (>= bound (aref lower i)))
                             (setf (aref upper i)
                                   (min (aref upper i) bound)))
                           (lower ()
                             (assert (<= bound (aref upper i)))
                             (setf (aref lower i)
                                   (max (aref lower i) bound))))
  
  