diff --git a/ansi-tests/ansi-aux.lsp b/ansi-tests/ansi-aux.lsp index 9e3c54d09711d61418956c37f077dbab99d6e143..77a4d004385e5a0dbd00804c6e9f8f87fec244ab 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 a3734cc7dc62d4168c844e0d02fe37d66a1bab98..4ae2e9ea06d22807ea1135b9543b3fa2db96d848 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)