public static mpf GetBiasedRandomBits(randstate state, long maxSize, long exp) { var f = new mpf(precision: DefaultPrecision); mpir.mpf_rrandomb(f, state, maxSize, exp); return(f); }
public static mpf GetUniformlyDistributedRandomBits(randstate state, ulong nbits) { var f = new mpf(precision: Math.Max(DefaultPrecision, nbits)); mpir.mpf_urandomb(f, state, nbits); return(f); }
public static mpc GetUniformlyDistributedRandom(randstate state, long?precision = null) { var c = new mpc(precision: precision.GetValueOrDefault(DefaultPrecision)); mpir.mpc_urandom(c, state); return(c); }
public override mpz NextPrimeCandidate(randstate state) { mpir.mpz_next_prime_candidate(this, this, state); return(this); }
public randstate(randstate op) { Val = mpir.gmp_randinit_set(op); }