-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
julia> std([1e300, -1e300])
Infwhereas the correct answer is ≈ 1.4142e300, which is representable.
This is the same issue that arises in computing the norm of a vector, for which the naive algorithm overflows/underflows. This solution is simply to scale the array by dividing out maximum(abs, x) (this can be skipped if the maximum absolute value isn't too big or too small).
Metadata
Metadata
Assignees
Labels
No labels