Closed green-coder closed 5 years ago
I also fixed the variance function in the similar way.
I noticed some other functions which are using a double for the count but as those functions were less trivial, I was afraid to introduce rounding bugs (e.g. division between longs) so I did not touch them.
Many thanks for the sensible suggestions 👍
The count
c
parameter is initialized as a floating number and hinted as adouble
while it is used as a natural number to count. It is clearly a bug as a floating number will makes theinc
operation idempotent once it reaches a certain value.This is what I get on the JVM: