New submission from Backbench Family <hbutt4...@gmail.com>:

y = int(1.999999999999999) # fifteen decimal points
print(y)
1       # output is 1

y = int(1.9999999999999999) # sixteen decimal points
print(y)
2       # output is 2
It shows 1 when we type fifteen decimal whereas when we add sixteen decimal 
points the output becomes 2.

----------
components: Windows
messages: 392919
nosy: hbutt4319, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Incorrect type casting of float into int
type: compile error
versions: Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue44034>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to