[issue36055] Division using math.pow and math.log approximation fails

2019-02-20 Thread Mark Dickinson
Mark Dickinson added the comment: This isn't a bug: floating-point arithmetic is by its nature approximate, and two sequences of operations that would mathematically give the same result need not give the same result with floating-point. I'd recommend a read of this portion of the tutorial,

[issue36055] Division using math.pow and math.log approximation fails

2019-02-20 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +mark.dickinson, rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue36055] Division using math.pow and math.log approximation fails

2019-02-20 Thread Marcelo Marotta
New submission from Marcelo Marotta : 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)