Message225360
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. |
|
Date |
User |
Action |
Args |
2014-08-15 18:59:08 | tim.peters | set | recipients:
+ tim.peters, rhettinger, mark.dickinson, steven.daprano, skrah |
2014-08-15 18:59:08 | tim.peters | set | messageid: <1408129148.52.0.184653853085.issue22198@psf.upfronthosting.co.za> |
2014-08-15 18:59:08 | tim.peters | link | issue22198 messages |
2014-08-15 18:59:08 | tim.peters | create | |
|