Hello,
At present rtest_trig reports some failed tests. I've been executing
batch ("tests/rtest_trig.mac", test);
because that way it writes tests/rtest_trig.ERR with a record of the
failed tests.
I reworked the failed tests to show the expressions which
didn't simplify/evaluate as expected. Stuff in this email is based
on the new version of rtest_trig.mac. Expressions are enclosed in
lambda's to prevent them from being simplified or evaluated.
With GCL, Clisp, and SBCL (all Linux, and didn't test CMUCL),
rtest_trig reports that test #61 fails. In each case the erroneous result is
[lambda([],cabs(bfloat(rectform(atanh(-2)))-atanh(bfloat(-2)))),
lambda([],cabs(bfloat(rectform(atanh(2)))-atanh(bfloat(2))))];
and then map (lambda ([f], f()), %); => [3.14... , 3.14... ]
(should be [0.0, 0.0]) so I guess this is a branch cut mismatch.
With SBCL, rtest_trig reports tests #60 and #55 also fail.
#60 =>
[lambda([],cabs(float(rectform(acoth(1/2)))-acoth(float(1/2)))),
lambda([],cabs(float(rectform(atanh(2)))-atanh(float(2)))),
lambda([],cabs(float(rectform(asec(1/2)))-asec(float(1/2)))),
lambda([],cabs(float(rectform(acsc(1/2)))-acsc(float(1/2)))),
lambda([],cabs(float(rectform(asin(2)))-asin(float(2)))),
lambda([],cabs(float(rectform(acos(2)))-acos(float(2))))]
then map (lambda ([f], f()), %);
=> [3.14..., 3.14..., 2.63..., 2.63..., 2.63..., 2.63...]
Dunno what the 2.63's are about.
#55 =>
lambda([],
['cabs(1/0.9-cos(asec(0.9))),
'cabs(sqrt(0.9^2-1)/0.9-sin(asec(0.9))),
'cabs(sqrt(0.9^2-1)-tan(asec(0.9))),
'cabs(0.9/sqrt(0.9^2-1)-csc(asec(0.9))),
'cabs(0.9-sec(asec(0.9))),
'cabs(1/sqrt(0.9^2-1)-cot(asec(0.9)))])
plus similar expressions for 0.8, 0.7, ..., 0.1.
%(), nouns; => [0.0, 0.968..., 0.871..., 4.12..., 1.11...e-16, 4.58...]
Again, dunno what these numbers represent.
Comments?
hth
Robert