New submission from Kostis Gourgoulias :
This was brought to my attention by a colleague, Albert B.
When considering the floor division // operator, 1//0.01 should return 100.0,
but instead returns 99.0. My understanding is that this is because 0.01 is
represented by
Decimal('0.0120816681711721685132943093776702880859375')
which is greater than 0.01.
math.floor(1/0.01) correctly outputs 100. Shouldn't the two approaches provide
the same answer?
--
components: macOS
messages: 362330
nosy: Kostis Gourgoulias, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: Floor division operator and floats
type: behavior
versions: Python 3.7
___
Python tracker
<https://bugs.python.org/issue39703>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com