Hi,
I'm happy to share my new gem here.
That is enumerable-statistics, a library providing the following basic statistical summary methods in Array and Enumerable:
- mean
- variance
- stdev
- mean_variance
- mean_stdev
The latter two methods calculate two statistics simultaneously.
These methods are fully implemented in C extension, so calculation is too fast.
Moreover, `sum` introduced in Ruby 2.4 (current trunk) is also defined in Array and Enumerable only if Ruby < 2.4.
So you can use fast precise sum on stable Ruby with this library.
All methods scan a collection only once, and don't cache values on memory.
The result is calculated by precision compensated algorithms.
See the documentation for more details.