Commit 7b81dc8b by Daniel Kochmański

### numbers: atan: remove extra map nesting

```previously we had two map, which were appended, now we have one lambda
function, so there is no need for it.```
parent 61b33de4
 ... @@ -134,17 +134,16 @@ ... @@ -134,17 +134,16 @@ ;; (atan +-0 +(anything-but-nan)) -> +-0 ;; (atan +-0 +(anything-but-nan)) -> +-0 ;; (atan +-0 -(anything-but-nan)) -> +-pi ;; (atan +-0 -(anything-but-nan)) -> +-pi ;; (atan +-(anything-but-0/nan) 0) -> +-pi/2 ;; (atan +-(anything-but-0/nan) 0) -> +-pi/2 (every #'identity (every (lambda (n) (map 'list (lambda (n) ;; notice, that we don't test a case, where ;; notice, that we don't test a case, where ;; both arguments are 0.0, because if ;; both arguments are 0.0, because if ;; implementation doesn't support signed 0 ;; implementation doesn't support signed 0 ;; result is undefined. ;; result is undefined. (and (zerop (atan 0.0 n)) (and (zerop (atan 0.0 n)) (+pi-p (atan 0.0 (- n))) (+pi-p (atan 0.0 (- n))) (+pi/2-p (atan n 0.0)) (+pi/2-p (atan n 0.0)) (-pi/2-p (atan (- n) 0.0)))) (-pi/2-p (atan (- n) 0.0)))) (remove-if-not #'plusp *floats*))) (remove-if-not #'plusp *floats*)))) T) T) (deftest atan.ieee.2 :description "Verify ATAN handling signed zero" (deftest atan.ieee.2 :description "Verify ATAN handling signed zero" ... @@ -162,13 +161,12 @@ ... @@ -162,13 +161,12 @@ (-zerop (atan -0.0 +0.0)) (-zerop (atan -0.0 +0.0)) (+pi-p (atan +0.0 -0.0)) (+pi-p (atan +0.0 -0.0)) (-pi-p (atan -0.0 -0.0)) (-pi-p (atan -0.0 -0.0)) (every #'identity (every (lambda (n) (map 'list (lambda (n) (and (-zerop (atan -0.0 n)) (and (-zerop (atan -0.0 n)) (+zerop (atan +0.0 n)) (+zerop (atan +0.0 n)) (+pi-p (atan +0.0 (- n))) (+pi-p (atan +0.0 (- n))) (-pi-p (atan -0.0 (- n))))) (-pi-p (atan -0.0 (- n))))) (remove-if-not #'plusp *floats*))))) (remove-if-not #'plusp *floats*)))))) T) T) ;;; We could have tested also for infinities and nan's, but there is ;;; We could have tested also for infinities and nan's, but there is ... ...
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment