This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tim.peters
Recipients mark.dickinson, rhettinger, skrah, steven.daprano, tim.peters
Date 2014-08-15.18:59:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1408129148.52.0.184653853085.issue22198@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-08-15 18:59:08tim.peterssetrecipients: + tim.peters, rhettinger, mark.dickinson, steven.daprano, skrah
2014-08-15 18:59:08tim.peterssetmessageid: <1408129148.52.0.184653853085.issue22198@psf.upfronthosting.co.za>
2014-08-15 18:59:08tim.peterslinkissue22198 messages
2014-08-15 18:59:08tim.peterscreate