[issue44419] Wrong division calculation for numbers more than 16 digits

2021-06-14 Thread Steven D'Aprano
Steven D'Aprano added the comment: Also please read this: https://docs.python.org/3/faq/design.html#why-are-floating-point-calculations-so-inaccurate -- nosy: +steven.daprano ___ Python tracker

[issue44419] Wrong division calculation for numbers more than 16 digits

2021-06-14 Thread Zachary Ware
Zachary Ware added the comment: The `/` operator does true division, which means the result will be a `float` rather than an `int`. When the resultant float is large enough, precision will be lost. You can use the `//` operator for floor (integer) division, where the result will remain as

[issue44419] Wrong division calculation for numbers more than 16 digits

2021-06-14 Thread Abbas Baharforoosh
New submission from Abbas Baharforoosh : Hi For big numbers (more than about 16 digits), python wrong calculate division, but calculating mod (%) is correct. I write a sample code of manual division in file. Thanks -- files: big_number.py messages: 395798 nosy: abahar1996 priority: n