NaN handling

Grant Edwards grante at visi.com
Fri May 5 18:35:15 EDT 2006


On 2006-05-05, Ivan Vinogradov <vinogri at mcmaster.ca> wrote:
>> <snip>
>> There are those of us that need NaNs in production code, so it
>> would have to be something that could be configured.  I find
>> that in my programs the places where I need to do something
>> "exceptional" with a NaN are very limited.  The vast majority
>> of the time, I need them to propagate quietly.
>
> Our programming expectations may differ, but an option to
> catch NaNs as an exception is a great idea.

Unless it's done in hardware, it would be hopelessly slow.
There some platforms where it's possible for an application to
enable and handle FP interrupts (all of the exampls for that
seem to be in Fortran).  I don't know if the common platforms
(IA32/MS-Windows, IA32/Linux) even have that ability.

-- 
Grant Edwards                   grante             Yow!  I'm into SOFTWARE!
                                  at               
                               visi.com            



More information about the Python-list mailing list