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