Skip to main content

Module distributions

Module distributions 

Source
Expand description

Statistical distribution intrinsics — full migration to typed marshal layer.

Per the intrinsics-typed-CC migration’s per-file table, all 5 distribution intrinsics (dist_uniform, dist_lognormal, dist_exponential, dist_poisson, dist_sample_n) migrate to register_typed_fn_N typed entries via create_distributions_intrinsics_module.

dist_sample_n previously called sibling intrinsic_dist_* legacy bodies via &[ValueWord]; bodies are now refactored to delegate to pure-helper functions (sample_uniform, sample_lognormal, etc.) so both the typed entries and dist_sample_n share the same sampling math without going through the marshal layer twice.

Sampling uses the thread-local RNG from the random module via random::with_rng.

Functions§

create_distributions_intrinsics_module
Create the distributions intrinsics module with all 5 typed-marshal entry points.