Message254157
> Has anyone confirmed that this bug actually exists?
Confirmed. The initial report is not quite correct: you need three
values to trigger the overflow, not two:
py> x = 8.988465674311579e+307
py> statistics.mean([x]*2) == x
True
py> statistics.mean([x]*3) == x
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "./statistics.py", line 289, in mean
return _sum(data)/n
File "./statistics.py", line 184, in _sum
return T(total)
File "/usr/local/lib/python3.3/numbers.py", line 296, in __float__
return self.numerator / self.denominator
OverflowError: integer division result too large for a float |
|
Date |
User |
Action |
Args |
2015-11-06 01:16:07 | steven.daprano | set | recipients:
+ steven.daprano, mark.dickinson, benjamin.peterson, josh.r, David MacIver, bar.harel |
2015-11-06 01:16:07 | steven.daprano | link | issue25177 messages |
2015-11-06 01:16:06 | steven.daprano | create | |
|