[issue22198] Odd floor-division corner case

Petr Viktorin report at bugs.python.org
Sun Sep 7 21:06:27 CEST 2014


Petr Viktorin added the comment:

I tried my hand at writing a patch. I hope it is helpful.

The message of the 2001 commit that introduces this says that "there's no platform-independent way to write a test case for this". I assume with @support.requires_IEEE_754 that is no longer true (at least for non-exotic platforms), or was there another issue?

I noticed there is no test suite for float floordiv, so I attempted writing a fuller one, but when I saw that
>>> float('inf') // 1.0
nan
I decided to keep my first CPython patch small and focused, so I can learn the ropes. I'll file more issues later.

----------
keywords: +patch
nosy: +encukou
Added file: http://bugs.python.org/file36568/issue22198.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22198>
_______________________________________


More information about the Python-bugs-list mailing list