Long-float variant giving more precision to numerical computations.
Subject: Long-float variant giving more precision to numerical computations.
From: Richard Fateman
Date: Tue, 26 Feb 2008 11:58:47 -0800
If you want to test the accuracy of a Bessel function subroutine, you
should test it near some difficult points, not at 1.0. Probably a
difficult place is near a zero of the Bessel function, especially
a zero that is far from the origin.
I would not conclude that Slatec is almost accurate enough for
double-double;
in fact, if the library is really well designed, it should be just barely
good enough for the maximum precision which was anticipated for its use.
any higher accuracy is wasted effort!
RJF
> -----Original Message-----
> From: maxima-bounces at math.utexas.edu
> [mailto:maxima-bounces at math.utexas.edu] On Behalf Of Douglas Crosher
> Sent: Tuesday, February 26, 2008 8:09 AM
> To: Raymond Toy
> Cc: Maxima List
> Subject: Re: [Maxima] Long-float variant giving more
> precision to numerical computations.
>
> Raymond Toy wrote:
> > Douglas Crosher wrote:
> >>
> >> The slatec Fortran source comments suggests it is precise
> enough for
> >> double-double float. The code can be re-translated,
> maintaining the
> >> constant precision, using the following hack patch.
> ...
> > Finally got around to applying this patch to f2cl. I tried it with
> > quadpack, and the translation looks good. Unfortunately, the
> > translation won't work because the f2cl-lib functions need
> to be changed
> > to support double-double-float. A quick hack of f2cl-lib gives
> > something that runs, but one simple test of quadpack dqag produces
> > results that aren't very accurate.
>
> Slatec seems to be almost accurate enough for double-double floats.
> For example:
>
> (slatec:dbesj0 1w0)
> 0.76519768655796655144971752610269
>
> Expected:
> 0.76519768655796655144971752610266322090927428975532524...
>
> The code calculates the number of coefficients needed at
> runtime which uses the
> result of (d1mach 3), a value of (scale-float 1w0 -100) seems to pass.
>
> Regards
> Douglas Crosher
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>