[issue33372] Wrong calculation

2018-04-26 Thread Steven D'Aprano
Steven D'Aprano added the comment: Ah sheesh I copied and pasted the wrong bits. After the division terms go to zero, you get -590072-200112-18-18-18-18-18-18-18-18+9998599835 which goes to 9997809507 as calculated by Ruby and Python 2, and I promise that's the end of me replying to myself :

[issue33372] Wrong calculation

2018-04-26 Thread Steven D'Aprano
Steven D'Aprano added the comment: > Even Ruby gets the right answer (9997809507) for that :-) Oops, I forgot to say... Ruby 1.8 also does truncating division like Python 2. -- ___ Python tracker ___

[issue33372] Wrong calculation

2018-04-26 Thread Steven D'Aprano
Steven D'Aprano added the comment: I agree with Tim that this is likely to be the difference between Python 2 truncating division and Python 3 division. For the record, I get the following results: 9997809507L Python 2.7 9997809307.0 Python 3.5 9997809307 R 9997809307 Javascript (Rhino) 99978

[issue33372] Wrong calculation

2018-04-26 Thread Tim Peters
Tim Peters added the comment: Please find a minimal example that illustrates the problem you think you've found, and paste the plain text _into_ the bug report. In the meantime, I'm closing this as "not a bug". The division operator applied to integers in Python 2 defaults doing truncating i

[issue33372] Wrong calculation

2018-04-26 Thread an0n.r00t32
New submission from an0n.r00t32 : I found that python calculate this wrong. Other calculators gave me 9997809307 not 9997809507 (python), even python3 calculated it correctly. Here is the computation expression which Python 2.7 calculated wrong. https://pastebin.com/uKx1FYx3 -- messag