New submission from Marcelo Marotta <marcelo....@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue36055>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to