Message79348
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.) |
|
Date |
User |
Action |
Args |
2009-01-07 17:06:26 | mark.dickinson | set | recipients:
+ mark.dickinson, kbriggs |
2009-01-07 17:06:26 | mark.dickinson | set | messageid: <1231347986.63.0.106289567847.issue4869@psf.upfronthosting.co.za> |
2009-01-07 17:06:23 | mark.dickinson | link | issue4869 messages |
2009-01-07 17:06:22 | mark.dickinson | create | |
|