Larry Hastings <la...@hastings.org> added the comment:

> The problem is that there is a double rounding in
>     time = float(time_ns) / 1e9
> 1. When convert time_ns to float.
> 2. When divide it by 1e9.

I'm pretty sure that in Python 3, if you say
   c = a / b
and a and b are both "single-digit" integers, it first converts them both into 
doubles and then performs the divide.  See long_true_divide() in 
Objects/longobject.c, starting (currently) at line 3938.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39484>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to