Tim Peters added the comment:

To be clear, I agree -0.0 is "the correct" answer, and -1.0 is at best 
defensible via a mostly-inappropriate limit argument.  But in Py3 floor 
division of floats returns an integer, and there is no integer -0.  Nor, God 
willing, will there ever be ;-)

Looks to me like what (Py3's, at least) floatobject.c's floor_divmod() returns 
(the source of float floor division's result) when the 2nd argument is infinite 
is largely an accident, depending on what the platform C fmod() and floor() 
happen to return.  So it would require special-casing an infinite denominator 
in that function to force any specific cross-platform result.

----------

_______________________________________
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