[issue25177] OverflowError in statistics.mean when summing large floats
David MacIver
report at bugs.python.org
Sat Sep 19 15:58:54 CEST 2015
David MacIver added the comment:
I'm not sure what you mean by float having a limit here. It's certainly finite precision, but there is still a representable value with that finite precision closest to the mean.
As an example where there is an obvious correct answer that will trigger this error: statistics.mean([sys.float_info.max, sys.float_info.max]), this should return sys.float_info.max (which is definitely representable!), but instead raises this overflow error.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25177>
_______________________________________
More information about the Python-bugs-list
mailing list