rtest14, closeto, and ecl (Was Re: Maxima 5.23.1 tagged)
Subject: rtest14, closeto, and ecl (Was Re: Maxima 5.23.1 tagged)
From: Raymond Toy
Date: Tue, 18 Jan 2011 20:57:49 -0500
On 1/18/11 5:13 AM, Andrey G. Grozin wrote:
> On Tue, 18 Jan 2011, Raymond Toy wrote:
>> But I also get a failure in rtest14, prob 144. The bessel and airy
>> functions are not evaluated for some reason. This bug and the others
>> you mentioned have been there for quite some time. I've been too lazy
>> to investigate.
> Strange. I see no failures in rtest14 with both ecl-10.4.1 and
> ecl-11.1.1.
> Gentoo Linux, 32-bit Intel pentium.
The particular failure in rtest14, prob 144 is the following:
closeto(e,tol):=block([numer:true,abse],abse:abs(e),if(abse<tol) then
true else abse);
AS_10_4_17(z):=block([y:(2/3)*(-z)^(3/2)],airy_dai(z)-(z/3)*(bessel_j(-2/3,y)-bessel_j(2/3,y)));
closeto(AS_10_4_17(-10),1e-15);
The test passes if the threshold is changed from 1e-15 to 1e-14. This
seems ok, until you try
AS_10_4_17(-10),numer;
-> 8.881784197001252e-16
8.88e-16 is less than 1e-15.
I don't really understand how closeto is supposed to work. When abse >=
tol, it's supposed to return abse. Shouldn't that be a number, not some
symbolic expression? If abse really is symbolic, does the test abse <
tol cause some further numerical evaluation?
Could this be some subtle change somewhere?
I'm confused.
Ray