New submission from Mark Dickinson:

I'm not sure it's worth fixing this, but it seems worth recording:

>>> -0.5 // float('inf')
-1.0

I was expecting a value of `-0.0`, and while IEEE 754 doesn't cover the floor 
division operation, I'm reasonably confident that that's the value it would 
have recommended if it had. :-)

However, it's difficult to come up with a situation where the difference 
matters: there aren't any obvious invariants I can think of that are broken by 
this special case.  So unless anyone thinks it should be changed, I'll settle 
for recording the oddity in this issue, and closing as won't fix after a short 
period.

----------
assignee: mark.dickinson
components: Interpreter Core
messages: 225305
nosy: mark.dickinson
priority: normal
severity: normal
status: open
title: Odd floor-division corner case
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5

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

Reply via email to