Message77935
| Author | mark.dickinson |
|---|---|
| Recipients | fredrikj, mark.dickinson, pitrou, rhettinger, skip.montanaro, terry.reedy, vstinner |
| Date | 2008-12-16.21:38:29 |
| SpamBayes Score | 6.24406e-05 |
| Marked as misclassified | No |
| Message-id | <1229463510.55.0.291488803217.issue3439@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
> Before applying, consider adding back the part of the docs with the '1 + > floor(...' definition. My only (minor) objection to this definition is that a straight Python translation of it doesn't work, thanks to roundoff error and the limited precision of floating-point: >>> from math import floor, log >>> n = 2**101 >>> n.bit_length() 102 >>> 1 + floor(log(n)/log(2)) 101.0 >>> n = 2**80-1 >>> n.bit_length() 80 >>> 1 + floor(log(n)/log(2)) 81.0 But as you say, it provides another perspective; I'm fine with putting it back in. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008-12-16 21:38:30 | mark.dickinson | set | recipients: + mark.dickinson, skip.montanaro, rhettinger, terry.reedy, pitrou, vstinner, fredrikj |
| 2008-12-16 21:38:30 | mark.dickinson | set | messageid: <1229463510.55.0.291488803217.issue3439@psf.upfronthosting.co.za> |
| 2008-12-16 21:38:29 | mark.dickinson | link | issue3439 messages |
| 2008-12-16 21:38:29 | mark.dickinson | create | |