continuous_gaussian#

Module for sampling from a continuous Gaussian distribution.

Functions#

gaussian_inverse_cdf()

Returns inverse CDF for N(u,sigma_squared) at p.

gaussian()

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
Return type

tmlt.core.utils.arb.Arb

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

float