summaryrefslogtreecommitdiff
path: root/src/approx/maceps.lisp
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-10-09 21:08:25 -0600
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-10-09 21:08:25 -0600
commitadda6869cb2a07984b48c39fcd70ee76449c353d (patch)
tree3aff88b65292e2ab0e108781206d954a015b2e33 /src/approx/maceps.lisp
parentb35e3998333e8190bf07ade51dba30773b3a3d0b (diff)
downloadcmath-adda6869cb2a07984b48c39fcd70ee76449c353d.tar.gz
cmath-adda6869cb2a07984b48c39fcd70ee76449c353d.zip
updates 10/9
Diffstat (limited to 'src/approx/maceps.lisp')
-rw-r--r--src/approx/maceps.lisp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/approx/maceps.lisp b/src/approx/maceps.lisp
index debaa67..e2738e4 100644
--- a/src/approx/maceps.lisp
+++ b/src/approx/maceps.lisp
@@ -3,10 +3,10 @@
(defun compute-maceps (f a init)
(let ((h init)
(err init))
- (loop while (> err 0)
+ (loop collect (list a h err)
do
(setf h (/ h 2)
err (abs (- (funcall f (+ a h))
(funcall f a))))
- when (> err 0)
- collect (list a h err))))
+ while (> err 0))))
+