Skip to content

Add the Cauchy distribution.#1780

Closed
drtconway wants to merge 3 commits into
rust-random:masterfrom
drtconway:master
Closed

Add the Cauchy distribution.#1780
drtconway wants to merge 3 commits into
rust-random:masterfrom
drtconway:master

Conversation

@drtconway
Copy link
Copy Markdown

  • Added a CHANGELOG.md entry

Summary

Add code for generating variates from the Cauchy distribution.

Motivation

The Cauchy distribution is useful for generating arbitrary values for a range of tasks.

Details

The implementation uses the algorithm given in "Hand-book on STATISTICAL DISTRIBUTIONS for experimentalists" by Christian Walck.

It has no defined mean or variance, so the test suite check an empirical CDF against the analytic one with a Kolmogorov-Smirnoff test.

@dhardy
Copy link
Copy Markdown
Member

dhardy commented May 21, 2026

Thanks for making a PR, but the Cauchy distribution now lives in the rand_distr crate. See Cauchy.

@dhardy dhardy closed this May 21, 2026
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 this pull request may close these issues.

2 participants