Author steven.daprano
Recipients David MacIver, bar.harel, benjamin.peterson, josh.r, mark.dickinson, steven.daprano
Date 2015-11-06.01:16:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20151106011319.GQ10946@ando.pearwood.info>
In-reply-to <1446772003.69.0.527144220615.issue25177@psf.upfronthosting.co.za>
Content
> 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
History
Date User Action Args
2015-11-06 01:16:07steven.dapranosetrecipients: + steven.daprano, mark.dickinson, benjamin.peterson, josh.r, David MacIver, bar.harel
2015-11-06 01:16:07steven.dapranolinkissue25177 messages
2015-11-06 01:16:06steven.dapranocreate