underflow exception (was Re: float limits)

Alexandre Fayolle alf at leo.logilab.fr
Thu Jan 31 04:36:10 EST 2002


On Wed, 30 Jan 2002 22:00:24 GMT, Terry Reedy <tjreedy at home.com> wrote:
>
>"Skip Montanaro" <skip at pobox.com> wrote in message
>>     >>> eps1
>>     4.9406564584124654e-324
>
>This is the min float, more or less, which is that the original poster
>thought he wanted.

I like the idea of "thinking that I want something" ;o) 
This is indeed the value I needed. Thank you very much for your answers.

By the way, is there a (preferably portable) way of getting an exception when 
a numerical computation underflows, rather than having it silently rounding
things to zero. I finally get a DivisionByZero exception, but getting the 
exception sooner in the process could avoid me some trouble, I'm sure. 
(for those of you who're wondering why I'm getting underflows, I'm computing
probablities, and this involves multiplying *lots* of numbers in the [0,1[ 
range; I'll be releasing the package as soon as I get rid of this annoying 
behaviour)

Alexandre Fayolle
-- 
LOGILAB, Paris (France).
http://www.logilab.com   http://www.logilab.fr  http://www.logilab.org
Narval, the first software agent available as free software (GPL).



More information about the Python-list mailing list