continuous_gaussian#
Module for sampling from a continuous Gaussian distribution.
Functions#
Returns inverse CDF for N(u,sigma_squared) at p. |
|
Samples a float from the Gaussian distribution. |
- gaussian_inverse_cdf(u, sigma_squared, p, prec)#
Returns inverse CDF for N(u,sigma_squared) at p.
- Parameters:
u (Union[int, float, tmlt.core.utils.arb.Arb]) – The mean of the distribution. Must be finite and non-nan.
sigma_squared (Union[int, float, tmlt.core.utils.arb.Arb]) – The variance of the distribution. Must be finite, non-nan and non-negative.
p (tmlt.core.utils.arb.Arb) – Probability to compute the CDF at.
prec (int) – Precision to use for computing CDF.
- Return type:
- gaussian(sigma_squared, u=0, step_size=63)#
Samples a float from the Gaussian distribution.
- In particular, this returns a sample from the Gaussian
\(\mathcal{N}_{\mathbb{Z}}(u, sigma\_squared)\)
- Parameters:
sigma_squared (Union[tmlt.core.utils.arb.Arb, float]) – The variance of the distribution. Must be positive, finite and non-nan.
u (Union[tmlt.core.utils.arb.Arb, float]) – The mean of the distribution. Must be finite and non-nan. Defaults to 0
step_size (int) – How many bits of probability to sample at a time.
- Return type: