On 8/12/09, Juan Jose Garcia-Ripoll
<juanjose.garciaripoll at googlemail.com> wrote:
> I am seeing things like the ones below. How are tests compared for
> result? Is any precission imposed? BTW, this is with an image where
> --enable-longdouble was used.
The numbers are Maxima bigfloats, which are software floats.
So ordinary floating point doesn't affect it.
> ********************** Problem 70 ***************
> Input:
> block([fpprec : 35], ev(ans, x : 1, bfloat) - ev(ans, x : 0, bfloat))
>
> Result:
> 5.7791601820424019599988308251707781b-1
>
> This differed from the expected result:
> 5.7791601820424019599988308251707781b-1
OK, I see this is #70 in maxima/tests/rtest3.mac.
Here is the input + expected result:
block([fpprec:35], ev(ans,x:1,bfloat)-ev(ans,x:0,bfloat));
''(block([fpprec : 35], 5.7791601820424019599988308251707781b-1));
where ans = -%e^x*sin(2*x)/5-%e^x*cos(2*x)/10+%e^x/2 .
The second line is an attempt to create a literal bigfloat w/ fpprec=35.
It's actually incorrect -- the Maxima parser creates the float with
the prevailing fpprec (namely fpprec = 500 because of a previous
test in maxima/tests/rtest16.mac). So the numbers actually have
different precision.
It would be easy enough to adjust the test script so that the numbers
have the same precision, then the test will pass, I guess.
However I don't understand what's going on here:
(1) Why does it fail for ECL but not other Lisps?
(2) Why is the actual result displayed with fpprec = 35, apparently?
I'll try to look at it later.
Robert Dodier