Message70312
I'd also be interested in having _PyLong_NumBits exposed to Python in some
way or another. It's something I've needed many times before, and it's
used in the decimal module, for example.
My favorite workaround uses hex instead of bin:
4*len('%x'%x) - correction_dictionary[first_hexdigit_of_x]
but this is still O(log x) rather than O(1). |
|
Date |
User |
Action |
Args |
2008-07-27 06:29:54 | mark.dickinson | set | recipients:
+ mark.dickinson, loewis, rhettinger, fredrikj |
2008-07-27 06:29:54 | mark.dickinson | set | messageid: <1217140194.36.0.25702853053.issue3439@psf.upfronthosting.co.za> |
2008-07-27 06:29:53 | mark.dickinson | link | issue3439 messages |
2008-07-27 06:29:52 | mark.dickinson | create | |
|