[SciPy-User] Single precision FFT insufficiently accurate.

Sebastian Haase seb.haase@gmail....
Mon Jun 28 06:21:25 CDT 2010


On Mon, Jun 28, 2010 at 12:38 PM, David Cournapeau <cournape@gmail.com> wrote:
> On Mon, Jun 28, 2010 at 3:05 PM, Anne Archibald
> <aarchiba@physics.mcgill.ca> wrote:
>
>>
>> I guess the question here is where we do the conversion - of course it
>> is easiest to do that outside all the FFT loops. But it seems like
>> that iteration over all-but-one dimension of the array will often need
>> to copy the data anyway to get a contiguous 1d array; I'd say that's
>> the natural place to do upconverstion when necessary. (Though, does
>> FFTPACK provide strided/iterated FFTs? My only compiled-language
>> experience is with FFTW, which does.)
>>
>> Failing that, I still think we're better providing single-precision
>> FFTs for easy factorizations than for none at all; my basic point was
>> that the FFT's behaviour already depends very strongly on the size of
>> the input array, so this is not a new form of "data dependence".
>
> Right, this significantly weakens my objection.
>
What size of error are talking about anyway .. ?
Personally I would leave it in, and make a note in the doc-string
about expected precision error for non multiple-2 dimensions for
single precision float.
Maybe one could (for now) even append an option for
"workaroundFloat32PrecisionLoss"

- Sebastian


More information about the SciPy-User mailing list