[issue15438] Incredible issue in math.pow

2012-07-26 Thread andrea bergamini
andrea bergamini added the comment: Ok guys, ticket closed, but I'm still confused: I'm not a Python expert, I've understood that math is a sort of wrapper of C math.h or something like this, but: - I can't find any reason in using math.pow if I can get errors like the on

[issue15438] Incredible issue in math.pow

2012-07-24 Thread andrea bergamini
andrea bergamini added the comment: Well, from a library I'm used to expect a good result or an exception. Not a value that differs from the correct of one unit! I agree with Antoine, the doc should warn about this behavior. I've lost a lot of time before discovering my applica

[issue15438] Incredible issue in math.pow

2012-07-24 Thread andrea bergamini
andrea bergamini added the comment: Ok, but math.pow IMPO has to be aligned to pow and built-in pow (**), otherwise this kind of "inaccuracies" can compromise the application behavior. I was using this funcion in a cryptographic mechanisms, and this issue resulted in a failure.

[issue15438] Incredible issue in math.pow

2012-07-24 Thread andrea bergamini
New submission from andrea bergamini : math.pow(43, 10) gives the wrong result: 21611482313284248.0 Instead, the build-in function 43**10 and pow(43, 10) give the correct result: 21611482313284249L. This bug has been seen on ActivePython 2.5.1.1. Sorry no tests on recent versions