laplace
Module for sampling from a Laplace distribution.
Functions
-
laplace_inverse_cdf(u, b, p)
Returns value of the inverse CDF for Lap(u,`b`) at p.
- Parameters
u (float) – The mean of the distribution. Must be finite and non-nan.
b (float) – The scale of the distribution. Must be finite, non-nan and non-negative.
p (flint.arb) – Probability to compute the CDF at.
- Return type
flint.arb
-
laplace(u, b, step_size=63)
Samples a float from the Laplace distribution.
- Parameters
u (float) – The mean of the distribution. Must be finite and non-nan.
b (float) – The scale of the distribution. Must be positive, finite and non-nan.
step_size (int) – How many bits of probability to sample at a time.
- Return type
float