[New-bugs-announce] [issue36055] Division using math.pow and math.log approximation fails

Marcelo Marotta report at bugs.python.org
Wed Feb 20 13:04:41 EST 2019


New submission from Marcelo Marotta <marcelo.m87 at gmail.com>:

Steps to reproduce the error

>>> import math
>>> 1/math.log(math.pow(30,0.5),2) == 2/math.log(30,2)
True
>>> 1/math.log(math.pow(9,0.5),2) == 2/math.log(9,2)
True
>>> 1/math.log(math.pow(15,0.5),2) == 2/math.log(15,2)
True
>>> 1/math.log(math.pow(8,0.5),2) == 2/math.log(8,2)
False
>>> 2/math.log(8,2)
0.6666666666666666
>>> 1/math.log(math.pow(8,0.5),2) 
0.6666666666666665

I reproduced the error in Python :
Python 3.5.3
and
Python 2.7.13

----------
components: Library (Lib)
messages: 336132
nosy: Marcelo Marotta
priority: normal
severity: normal
status: open
title: Division using math.pow and math.log approximation fails
type: behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36055>
_______________________________________


More information about the New-bugs-announce mailing list