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 vstinner
Recipients jcea, mark.dickinson, rhettinger, vstinner
Date 2011-04-25.23:43:47
SpamBayes Score 7.903878e-08
Marked as misclassified No
Message-id <1303775028.23.0.455371203888.issue11888@psf.upfronthosting.co.za>
In-reply-to
Content
> Can't we simply use (approximation to 1/log(2)) * log(x)?
> Is it worse than reimplementing it using log(x)/log(2) in Python?

Hum. With a x86 and the right compiler optimization level, log(x)/log(2) in C can be more accurate than log(x)/log(2) in Python, because the FPU works with 80 bits float internally, and the result is only "truncated" to 64 bits float at the end. In Python, the result is truncated to 64 bits on each Python instruction.

I don't know if it should be called a feature or a bug. In PHP world, it would be called a bug :-D http://bugs.php.net/bug.php?id=53632
History
Date User Action Args
2011-04-25 23:43:48vstinnersetrecipients: + vstinner, rhettinger, jcea, mark.dickinson
2011-04-25 23:43:48vstinnersetmessageid: <1303775028.23.0.455371203888.issue11888@psf.upfronthosting.co.za>
2011-04-25 23:43:47vstinnerlinkissue11888 messages
2011-04-25 23:43:47vstinnercreate