On Tue, Sep 16, 2014 at 7:12 PM, Terry Reedy <tjre...@udel.edu> wrote:
> It does not really matter, however, as infinity cannot be 'floored' as
> required for //
>
>>>> math.floor(float('inf'))
> Traceback (most recent call last):
>   File "<pyshell#21>", line 1, in <module>
>     math.floor(float('inf'))
> OverflowError: cannot convert float infinity to integer
>
> and hence
>
>>>> float('inf') // 1.0
> nan

In C, floor(INFINITY) returns infinity (at least in the implementation
I just tested).
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to