Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Value stability of distributions #786

Closed
dhardy opened this issue Apr 27, 2019 · 1 comment · Fixed by #933
Closed

Value stability of distributions #786

dhardy opened this issue Apr 27, 2019 · 1 comment · Fixed by #933
Milestone

Comments

@dhardy
Copy link
Member

dhardy commented Apr 27, 2019

In the past we have changed sampling algorithms for the Uniform integer and float implementations, thus breaking value stability. There is a good chance we will wish to do the same with some other algorithms in the future (e.g. Normal and Gamma).

We have yet to develop a policy for how to handle this (but see the note on portability in the book). Two things are clear:

  • value-breaking changes should not be included in patch releases, excepting bug fixes
  • we should add test vectors to all algorithms to detect such breaking changes

Also: changing the algorithm behind an implementation does not change the semantics of the API or cause build issues, thus IMO we should allow algorithm changes in minor releases even after 1.0.

One extra thing we could do is keep multiple implementations under the names of their methods, e.g. GSL has gsl_ran_gamma, gsl_ran_gamma_mt (the same impl) and gsl_ran_gamma_knuth which all implement the same distribution. I'm not keen on doing this everywhere because of the extra code and API, but this might have its uses (e.g. #763).

Are these guidelines sufficient?

Relevant links:

This was referenced Sep 15, 2019
@dhardy
Copy link
Member Author

dhardy commented Oct 4, 2019

Looks like the seq code also needs tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant