clbustos / distribution

Statistical Distributions multi library wrapper. Uses Ruby by default and C (statistics2/GSL) or Java extensions where available.
Other
141 stars 52 forks source link

bugfix for large values in normal cdf #12

Closed ozydingo closed 10 years ago

ozydingo commented 10 years ago

Distribution::Normal.cdf(x) was returning 0.5 for absolute values over 38, probably due to some overflow or numeric error. These cases should be covered by the changed lines, except that these lines weren't actually doing anything other than evaluating and carrying on.