From 71c0e0da487f70ccfbd574ea52354ad63961dd3c Mon Sep 17 00:00:00 2001 From: Fabrizio Fabbri Date: Sat, 21 Jan 2017 00:28:20 +0100 Subject: [PATCH] osx: fix #349 IEEE-FP.0005.ATAN2-SPECIAL-CASE.ZERO-ARG On OSX signals overflow (instead of division-by-zero). --- src/tests/normal-tests/ieee-fp.lsp | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/tests/normal-tests/ieee-fp.lsp b/src/tests/normal-tests/ieee-fp.lsp index 0d0c91825..21a673595 100644 --- a/src/tests/normal-tests/ieee-fp.lsp +++ b/src/tests/normal-tests/ieee-fp.lsp @@ -92,19 +92,20 @@ (-zerop (atan -0.0 +0.0)) (+pi-p (atan +0.0 -0.0)) (-pi-p (atan -0.0 -0.0)) - (map () (lambda (n) - ;; (atan +-0 +(anything-but/nan)) -> +-0 - (is (+zerop (atan +0.0 n))) - (is (-zerop (atan -0.0 n))) - ;; (atan +-0 -(anything-but/nan)) -> +-pi - (is (+pi-p (atan +0.0 (- n)))) - (is (-pi-p (atan -0.0 (- n)))) - ;; (atan +-(anything-but/0+nan) 0) -> +-pi/2 - (is (+pi/2-p (atan n +0.0))) - (is (+pi/2-p (atan n -0.0))) - (is (-pi/2-p (atan (- n) +0.0))) - (is (-pi/2-p (atan (- n) -0.0)))) - (remove-if-not #'plusp (append *floats* *ieee-fp.inf*)))) + (without-fpe-traps + (map () (lambda (n) + ;; (atan +-0 +(anything-but/nan)) -> +-0 + (is (+zerop (atan +0.0 n))) + (is (-zerop (atan -0.0 n))) + ;; (atan +-0 -(anything-but/nan)) -> +-pi + (is (+pi-p (atan +0.0 (- n)))) + (is (-pi-p (atan -0.0 (- n)))) + ;; (atan +-(anything-but/0+nan) 0) -> +-pi/2 + (is (+pi/2-p (atan n +0.0))) + (is (+pi/2-p (atan n -0.0))) + (is (-pi/2-p (atan (- n) +0.0))) + (is (-pi/2-p (atan (- n) -0.0)))) + (remove-if-not #'plusp (append *floats* *ieee-fp.inf*))))) (test ieee-fp.0006.atan2-special-case.inf-arg ;; (atan +-inf +inf) -> +-pi/4