wangtongada / gmpy

Automatically exported from code.google.com/p/gmpy
GNU Lesser General Public License v3.0
0 stars 0 forks source link

patch: bit_length #19

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In the attached file there is a patch for bit_length; bit_length
is going to be added to Python, see http://bugs.python.org/issue3439

Using in mpmath 
bitcount = gmpy.bit_length
runtests becomes 3% faster on my Pentium 1.6GHz

Original issue reported on code.google.com by mario.pe...@gmail.com on 2 Jan 2009 at 10:27

Attachments:

GoogleCodeExporter commented 8 years ago
Mario,

Thanks for the patch. I changed the documentation from bitcount to bit_length 
and
also added a couple of tests. It has been committed at r64.

Case

Original comment by casevh on 3 Jan 2009 at 11:39

GoogleCodeExporter commented 8 years ago
Changes done, closing issue.

Original comment by casevh on 8 Jan 2009 at 5:54