Expand description
Auto-generated module
🤖 Generated with SplitRS
Constants§
- EULER_
MASCHERONI - Euler–Mascheroni constant γ ≈ 0.5772156649.
Functions§
- box_
muller - Box-Muller transform: return two independent N(0,1) values.
- first_
n_ primes - Return the first
nprime numbers. - gamma_
fn - Gamma function Γ(z) = exp(log_gamma(z)).
- halton_
1d - Compute the 1D Halton sequence value at index
iwith basebase. - log_
gamma - Log-gamma function using Lanczos approximation.
- normal_
cdf - Standard normal CDF Φ(x) using rational approximation.
- normal_
ppf - Inverse normal CDF (probit function) via rational approximation.
- regularized_
incomplete_ beta - Regularized incomplete beta function I_x(a, b).
- sample_
gamma - Sample from Gamma(shape, scale) using Marsaglia-Tsang method.
- sample_
truncated_ normal - Sample from a truncated normal distribution N(mu, sigma²) on [a, b] using rejection sampling.
- sample_
without_ replacement - Sample
kdistinct indices from0..nwithout replacement. - scrambled_
halton_ 1d - Compute scrambled Halton value at index i with base and permutation.
- shuffle_
fisher_ yates - Fisher-Yates shuffle of a mutable slice in-place.
- student_
t_ cdf - Approximate Student-t CDF using numerical integration.
- weighted_
choice - Weighted random choice from a slice of
(value, weight)pairs. - weighted_
choice_ index - Choose an index from a probability vector given uniform variate
u.