Function smartnoise_runtime::utilities::noise::sample_uniform_mpfr[][src]

pub fn sample_uniform_mpfr(min: f64, max: f64) -> Result<Float>

Returns random sample from Uniform[min,max) using the MPFR library.

If [min, max) == [0, 1), then this is done in a way that respects exact rounding. Otherwise, the return will be the result of a composition of two operations that respect exact rounding (though the result will not necessarily).

Arguments

Return

Draw from Unif[min, max].

Example

use smartnoise_runtime::utilities::noise::sample_uniform_mpfr;
let unif = sample_uniform_mpfr(0.0, 1.0);