I haven't been following this branch cut discussion much,
but I participated in the negotiating between Guy Steele and
W. Kahan on the branch cut definitions in CL. The intention
was to use Kahan's branch cuts. If they have strayed, that
is too bad. One way of "fixing" these bugs is to take the
tests that depend on them out of the test suite!
I believe Allegro CL uses the specified CLtL2 branch cuts.
I don't know why they differ from CLtL1, or GCL. I also
believe (but have not proven personally) that Maxima compiles
and runs in the free trial version of Allegro CL 8.0 on windows.
While I personally continue to use XMaxima (in GCL) when
I need a pre-packaged Maxima, almost any time I try to use it
in any clever way to interface with other lisp programs, I find
it (GCL) much harder to use. Perhaps it is just that I am more familiar
with the Allegro debugging, profiling, foreign-function, etc
tools.
RJF
----- Original Message -----
From: "Robert Dodier" <robert.dodier at gmail.com>
To: "Barton Willis" <willisb at unk.edu>
Cc: "Maxima mailing list" <maxima at math.utexas.edu>
Sent: Sunday, February 26, 2006 7:50 AM
Subject: Re: [Maxima] failed tests in rtest_trig
> Hi Barton,
>
> I have a patch for src/float.lisp which makes atanh(bfloat(x))
> match bfloat(rectform(atanh(x))). More on that in another message.
>
>> The reference http://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node128.html
>> is more clear than is CHLS about the continuity of atanh. Indeed,
>> atanh(-2) = -1.57....*%i - 0.54930...
>
> I dunno. I'm hesitant to adopt anything from CLtL2,
> as it isn't the spec for any variety of Lisp of interest to Maxima,
> and it isn't based on considerations any more fundamental
> than CLHS (both are derived from the same sources),
> and I find CLtL2's convention of leaving document history
> in the document only increases confusion.
>
>> In the long run, I think we should change rectform and logarc to
>> use atanh(x) = log((1+x) * sqrt(1/(1-x^2)), and etc.
>
> I don't think we need to go to that much trouble.
> We already have a workable branch cut convention
> (namely whatever is induced by the definitions recommended
> by Kahan).
>
>> In the short run, I don't know--GCL gets most of this stuff wrong.
>
> Can you be more specific?
> Actually I've come to the conclusion that GCL is the
> one Lisp variety which gets the branch cuts of
> asin, acos, and atanh all right ...
>
>> Some of yesterday's modifications to trigi.lisp produce
>> inaccurate values for atanh for values near zero.
>> I don't think that's something we want to allow.
>
> Well, I think it's better than being off by %pi everywhere
> on (-\infty, -1) U (1, \infty).
>
> I'm certainly not opposed to replacing (log(1 + z) - log(1 - z))/2
> with some other formula or collection of formulas.
> We just have to make sure that the replacement has
> the same branch cuts.
>
> All the best,
> Robert
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>