This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients jcea, mark.dickinson, rhettinger, vstinner
Date 2011-04-21.09:16:30
SpamBayes Score 4.024073e-09
Marked as misclassified No
Message-id <1303377391.11.0.971336768502.issue11888@psf.upfronthosting.co.za>
In-reply-to
Content
> it may be worth looking at what numpy does here.

... or it may not.  NumPy just uses (approximation to 1/log(2)) * log(x) when log2 doesn't already exist.  And indeed, on Windows:

Python 2.7.1 |EPD 7.0-2 (64-bit)| (r271:86832, Dec  2 2010, 10:23:25) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.log2(8.0)
2.9999999999999996

I think we should be able to do better than this. :-)
History
Date User Action Args
2011-04-21 09:16:31mark.dickinsonsetrecipients: + mark.dickinson, rhettinger, jcea, vstinner
2011-04-21 09:16:31mark.dickinsonsetmessageid: <1303377391.11.0.971336768502.issue11888@psf.upfronthosting.co.za>
2011-04-21 09:16:30mark.dickinsonlinkissue11888 messages
2011-04-21 09:16:30mark.dickinsoncreate