Author mark.dickinson
Recipients kbriggs, mark.dickinson
Date 2009-01-07.17:06:22
SpamBayes Score 0.140871
Marked as misclassified No
Message-id <1231347986.63.0.106289567847.issue4869@psf.upfronthosting.co.za>
In-reply-to
Content
An exponential distribution with parameter 0 isn't an exponential distribution any more.  On the real line, there isn't
even a limiting distribution as the parameter approaches 0.

Is there really any use for having expovariate degenerate this way?
It seems much more likely that a call to random.expovariate(0) is
caused by a bug somewhere, so should raise an exception.  Which is exactly 
what it does already.

The proposed change would also not be in keeping with the philosophy 
behind most of Python's mathematics, which is to raise exceptions rather 
than returning exceptional (nan, inf) results.  (Think of it as IEEE 754 
will the invalid, overflow and division-by-zero signals all being 
trapped.)
History
Date User Action Args
2009-01-07 17:06:26mark.dickinsonsetrecipients: + mark.dickinson, kbriggs
2009-01-07 17:06:26mark.dickinsonsetmessageid: <1231347986.63.0.106289567847.issue4869@psf.upfronthosting.co.za>
2009-01-07 17:06:23mark.dickinsonlinkissue4869 messages
2009-01-07 17:06:22mark.dickinsoncreate