[issue6765] math.log, log10 inconsistency

steve21 report at bugs.python.org
Sun Aug 23 13:56:17 CEST 2009


New submission from steve21 <steve872929-bv at yahoo.com.au>:

$ python3.1
Python 3.1 (r31:73572, Jul  6 2009, 21:21:12) 
[GCC 4.4.0 20090506 (Red Hat 4.4.0-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import math
>>> math.log10(1000)
3.0
>>> math.log(1000, 10)
2.9999999999999996

You would expect the results to be the same.
Internally math.log() could call math.log10() when base==10. That would
ensure they are consistent.

----------
components: Library (Lib)
messages: 91886
nosy: steve21
severity: normal
status: open
title: math.log, log10 inconsistency
versions: Python 3.1

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


More information about the Python-bugs-list mailing list