Title: Last digit count error
Type: crash Stage: resolved
Components: Versions: Python 3.8
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: josh.r, talha.demirsoy
Priority: normal Keywords:

Created on 2020-04-06 02:02 by talha.demirsoy, last changed 2020-04-06 02:07 by talha.demirsoy. This issue is now closed.

Messages (3)
msg365834 - (view) Author: Talha Demirsoy (talha.demirsoy) Date: 2020-04-06 02:02
When I try to enter 10^23 or less its gives me ture but when I  tried 10^24 and more its give me just 1
msg365835 - (view) Author: Talha Demirsoy (talha.demirsoy) Date: 2020-04-06 02:05
sorry delete pls
msg365836 - (view) Author: Josh Rosenberg (josh.r) * (Python triager) Date: 2020-04-06 02:06
Your script is using "true" division with / , (that produces potentially inaccurate float results) not floor division with // , (which gets int results). When the inputs vastly exceed the integer representational capabilities of floats (52-53 bits, where 10 ** 24 is 80 bits), you'll have problems.

This is a bug in your script, not Python.
Date User Action Args
2020-04-06 02:07:03talha.demirsoysetfiles: -
2020-04-06 02:06:54josh.rsetstatus: open -> closed

nosy: + josh.r
messages: + msg365836

resolution: not a bug
stage: resolved
2020-04-06 02:05:48talha.demirsoysetmessages: + msg365835
2020-04-06 02:02:50talha.demirsoycreate