anchor.diff:  
   (defparameter *b* 1.5d0)
   (defparameter *a* 1.1d0)
  +
   (defun y (x coeffs)
     (let ((a (grid:aref coeffs 0))
   	(b (grid:aref coeffs 1)))
  
positive.code: 	   (gsll:iterate fit)
  	   (setf covariance (gsll:ls-covariance fit 0.0d0 covariance))
  	   (when print-steps
  	     (format t "iter: ~d x = ~15,8f ~15,8f |f(x)|=~7,6g~&"
  		     (1+ iter) (fitx 0) (fitx 1)
  		     (norm-f fit)))
  	 finally
  	   (let* ((chi (norm-f fit))
  
negative.code:       (assert-numerical-equal '(1.1 1.5)
  			    (fit-column table 'y-col
  					(grid:make-grid '((grid:foreign-array 2) double-float)
  							:initial-contents (list 2d0 1d0)))))))
  
  
  (defun exp-y (x coeffs)
    (let ((a (grid:aref coeffs 0))
  	(lambda (grid:aref coeffs 1))
  	(b (grid:aref coeffs 2)))
      (+ (* A (exp (* (- lambda) x))) b)))
  
  (defun exp-dy/d-coeffs (x coeffs)
    (let* ((a (grid:aref coeffs 0))
  	 (lambda (grid:aref coeffs 1))
  	 (e (exp (- (* lambda x)))))
      (mapcar #'-
  	    (list e
  		  (* -1 x a e)
  		  1d0))))
  
  
  (define-test gsl-fit
    ""
    (let ((table (make-table 'column-major-table
  			   (make-table-schema 'column-major-table
  					      '((x-col foreign-double-float)
  						(y-col non-lin-ls-sq-column-schema)))))
  	(data (gsll::generate-nlls-data)))
      (set-table-column table 0 
  		      (grid:make-grid '((grid:foreign-array 40) double-float)
  				      :initial-contents
  				      (loop for i below 40
  					   collect i)))
      (set-table-column table 1 (gsll::exponent-fit-data-y data))
      (init-column-fit 'y-col 'x-col table
  		     #'exp-y #'exp-dy/d-coeffs 3)
      (let ((lisp-unit:*epsilon* 1e-1))
        (assert-numerical-equal '(5 0.1 1)
  			    (fit-column table 'y-col
  					(grid:make-grid '((grid:foreign-array 3) double-float)
  							:initial-contents (list 2 1 1)))))))
  
  (defun |sigma| (c n)
    (/ (- 1 (expt c (+ 1 n)))
  