You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The difference between the two is only at most the floating point round-off error, and is an inevitable part of computation in finite precision arithmetic. You can see the variation by something like
A = Float64[]
for i in 1:1000
temp = rand(100);
push!(A, NaNMath.mean(temp) - StatsBase.mean(temp))
end
[minimum(A), maximum(A)]
NaNMath.mean and StatsBase.mean do not produce the same result
This will evaluate to false.
This seems to be true after digit 15:
round(mean(temp),digits=16) == round(NaNMath.mean(temp),digits=16)
Any idea why?
The text was updated successfully, but these errors were encountered: