summaryrefslogtreecommitdiff
path: root/src/approx/maceps.lisp
blob: debaa6733c03fcfdf4eb4d848658eca27074a612 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
(in-package :lizfcm.approx)

(defun compute-maceps (f a init)
  (let ((h init)
        (err init))
    (loop while (> err 0)
          do
          (setf h (/ h 2)
                err (abs (- (funcall f (+ a h))
                            (funcall f a))))
          when (> err 0)
          collect (list a h err))))