Unneeded code in complex-acos
Describe the bug
The function complex-acos
has this code:
(if (and (realp z) (> z 1))
;; acos is continuous in quadrant IV in this case.
(complex-acos (complex z -0f0))
AFAICT, this isn't actually needed. If you use eliminate this test and evaluate (acos 2)
and (acos #c(2 -0.0)
, the results are the same: #c(0 1.3169578)
.
I'm pretty sure Kahan's algorithm is correct, without having this extra test.