Steven D'Aprano writes:

> It doesn't round, it truncates.
> 
> [steve@ando ~]$ python2.7 -c "print round(799.0/100)"
> 8.0
> [steve@ando ~]$ python2.7 -c "print 799/100"
> 7

Seems it floors rather than truncates:

$ python2.7 -c "from math import trunc;print trunc(799./-100)"
-7
$ python2.7 -c "from math import floor;print floor(799./-100)"
-8.0
$ python2.7 -c "print 799/-100"
-8

$ python3.2 -c "print(799//-100)"
-8
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to