JuliaStats / Distributions.jl

A Julia package for probability distributions and associated functions.
Other
1.08k stars 410 forks source link

von mises cdf #319

Open getzdan opened 9 years ago

getzdan commented 9 years ago

CDF should always be in [0,1]. the following fails this assertion:

cdf(VonMises(0.0,1.0),4.0)
1.0449336859158742
cdf(VonMises(0.0,1.0),-4.0)
-0.04493368591587421

the fix should check if x value to left or right of support and give 0.0 or 1.0 respectively. inside the support the function works ok (i guess).

getzdan commented 9 years ago

(same applies to pdf outside support - should be zero)

getzdan commented 9 years ago

pull request created (perhaps other similar fixes are needed): https://github.com/JuliaStats/Distributions.jl/pull/320