branch cut strangeness



Hello,

So far as I can tell, failed tests in rtest_trig appear to be
due entirely to different choices of branch cuts.

Tested versions: Clisp 2.34 compiled w/ gcc 3.3.2
GCL 2.6.7, SBCL 0.9.9, CMUCL 19a

(1) acos and asin: CLHS says
(http://www.lispworks.com/documentation/HyperSpec/Body/f_asin_.htm)
that the branch cut on [1, \infty) is continuous w/ 4th quadrant
and on (-\infty, -1] is continuous w/ 2nd quadrant.

Clisp and GCL: conform to spec
SBCL and CMUCL: continuous w/ 1st and 2nd quadrants respectively

(2) atanh: CLHS says
(http://www.lispworks.com/documentation/HyperSpec/Body/f_sinh_.htm)
that the branch cut on [1, \infty) is continuous w/  1st quadrant
and on (-\infty, -1] is continuous w/ 3rd quadrant.

Clisp and GCL: continuous w/ 4th and 2nd quadrants respectively
SBCL CMUCL: continuous w/ 1st and 2nd respectively

I don't know if this accounts for all the observed failures in rtest_trig.
It would be a good idea to review branch cuts for all math functions
but I didn't do that.

Other than filing bug reports for various Lisp implementations,
I wonder what we should do.

hth
Robert Dodier

PS. Here's a test script:
(cl:asin #C(2.5 0.01))
(cl:asin 2.5)
(cl:asin #C(2.5 -0.01))

(cl:asin #C(-2.5 0.01))
(cl:asin -2.5)
(cl:asin #C(-2.5 -0.01))

(cl:acos #C(2.5 0.01))
(cl:acos 2.5)
(cl:acos #C(2.5 -0.01))

(cl:acos #C(-2.5 0.01))
(cl:acos -2.5)
(cl:acos #C(-2.5 -0.01))

(cl:atanh #C(2.5 0.01))
(cl:atanh 2.5)
(cl:atanh #C(2.5 -0.01))

(cl:atanh #C(-2.5 0.01))
(cl:atanh -2.5)
(cl:atanh #C(-2.5 -0.01))