Message361300
> 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. |
|
Date |
User |
Action |
Args |
2020-02-03 14:28:55 | larry | set | recipients:
+ larry, lemburg, rhettinger, mark.dickinson, vstinner, stutzbach, serhiy.storchaka, vxgmichel |
2020-02-03 14:28:55 | larry | set | messageid: <1580740135.77.0.94263928641.issue39484@roundup.psfhosted.org> |
2020-02-03 14:28:55 | larry | link | issue39484 messages |
2020-02-03 14:28:55 | larry | create | |
|