[New-bugs-announce] [issue3724] math.log(x, 10) gives different result than math.log10(x)

Florian Mayer report at bugs.python.org
Fri Aug 29 14:32:20 CEST 2008


New submission from Florian Mayer <flormayer at aim.com>:

I have found out that the result of math.log(x, 10) is slightly more
inaccurate than the one of math.log10(x). Probably the best example is
math.log(1000, 10) and math.log10(1000). I have attached a patch that
forces math.log to internally use log10 when it gets the base 10. Patch
is against revision 66056. Also adds 3 tests to test_math.py to test new
behaviour implemented.

----------
files: log.patch
keywords: patch
messages: 72129
nosy: segfaulthunter
severity: normal
status: open
title: math.log(x, 10) gives different result than math.log10(x)
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file11302/log.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3724>
_______________________________________


More information about the New-bugs-announce mailing list