[issue27697] Obscure bug in the int() function

2016-08-05 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue27697] Obscure bug in the int() function

2016-08-05 Thread Ammar Askar
Ammar Askar added the comment: You've ran into a classic floating point number limitation. Please read the following doc page: https://docs.python.org/2/tutorial/floatingpoint.html The problem comes when you multiply the number by 100, which is what causes the precision loss and drops it by

[issue27697] Obscure bug in the int() function

2016-08-05 Thread nathan snobelen
New submission from nathan snobelen: Hi, I've noticed a bug in int() when converting a specific range of numbers it will incorrectly round the last digit down. We have some payment code which formats numbers for processing in our system and we noticed that the payment of 1108431.38 was