From 49ac8b1a0181d5b0853c447d1822be95eccce2d0 Mon Sep 17 00:00:00 2001 From: pfdietz Date: Sat, 30 Apr 2005 21:33:22 +0000 Subject: [PATCH] Move approx= to ansi-aux.lsp --- ansi-tests/ansi-aux.lsp | 6 +++++- ansi-tests/numbers-aux.lsp | 4 ---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ansi-tests/ansi-aux.lsp b/ansi-tests/ansi-aux.lsp index 9e3c54d..77a4d00 100644 --- a/ansi-tests/ansi-aux.lsp +++ b/ansi-tests/ansi-aux.lsp @@ -1034,4 +1034,8 @@ the condition to go uncaught if it cannot be classified." (let ((eps 1.0d-4)) (<= (abs (- x y)) (* eps (max (abs x) (abs y)))))) -|# \ No newline at end of file +|# + +;;; Approximate equality function +(defun approx= (x y &optional (eps (epsilon x))) + (<= (abs (/ (- x y) (max (abs x) 1))) eps)) diff --git a/ansi-tests/numbers-aux.lsp b/ansi-tests/numbers-aux.lsp index a3734cc..4ae2e9e 100644 --- a/ansi-tests/numbers-aux.lsp +++ b/ansi-tests/numbers-aux.lsp @@ -334,10 +334,6 @@ do (setq eps next-eps) finally (return (values i eps (float eps one)))))) -;;; Approximate equality function -(defun approx= (x y &optional (eps (epsilon x))) - (<= (abs (/ (- x y) (max (abs x) 1))) eps)) - (defun test-log-op-with-decls (op xlo xhi ylo yhi niters &optional (decls '((optimize (speed 3) (safety 1) -- GitLab