Message294438
| Author |
rhettinger |
| Recipients |
leodema, mark.dickinson, rhettinger |
| Date |
2017年05月25日.06:24:44 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1495693484.94.0.262575542299.issue30464@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I agree that the comment should be changed. While we at it, perhaps sync-up with expovariate() code and eliminate the ``u <= 1e-7`` test:
Instead of:
elif alpha == 1.0:
# expovariate(1)
u = random()
while u <= 1e-7:
u = random()
return -_log(u) * beta
Use this instead:
elif alpha == 1.0:
# expovariate(1.0 / beta)
return -_log(1.0 - random()) * beta |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2017年05月25日 06:24:44 | rhettinger | set | recipients:
+ rhettinger, mark.dickinson, leodema |
| 2017年05月25日 06:24:44 | rhettinger | set | messageid: <1495693484.94.0.262575542299.issue30464@psf.upfronthosting.co.za> |
| 2017年05月25日 06:24:44 | rhettinger | link | issue30464 messages |
| 2017年05月25日 06:24:44 | rhettinger | create |
|