Bertini 2 - C++ Core
Software for Numerical Algebraic Geometry
Loading...
Searching...
No Matches
random.cpp File Reference

stuff to make random numbers in bertini2 More...

Include dependency graph for random.cpp:

Functions

mpfr_float bertini::RandomMp ()
 create a random number, at the current default precision
 
mpfr_float bertini::RandomMp (const mpfr_float &a, const mpfr_float &b)
 create a random number in a given interval, at the current default precision
 
mpfr_float bertini::RandomMp (const mpfr_float &a, const mpfr_float &b, unsigned num_digits)
 create a random number in a given interval, at the specified precision
 
mpfr_float bertini::RandomMp (unsigned num_digits)
 create a random number, at the specified precision
 
void bertini::RandomMpAssign (mpfr_float &a, unsigned num_digits)
 Set an existing mpfr_float to a random number, to a given precision.
 

Detailed Description

stuff to make random numbers in bertini2

Function Documentation

◆ RandomMp() [1/4]

mpfr_float bertini::RandomMp ( )

create a random number, at the current default precision

◆ RandomMp() [2/4]

mpfr_float bertini::RandomMp ( const mpfr_float & a,
const mpfr_float & b )

create a random number in a given interval, at the current default precision

◆ RandomMp() [3/4]

mpfr_float bertini::RandomMp ( const mpfr_float & a,
const mpfr_float & b,
unsigned num_digits )

create a random number in a given interval, at the specified precision

◆ RandomMp() [4/4]

mpfr_float bertini::RandomMp ( unsigned num_digits)

create a random number, at the specified precision

Parameters
num_digitsthe precision that you desire.

◆ RandomMpAssign()

void bertini::RandomMpAssign ( mpfr_float & a,
unsigned num_digits )

Set an existing mpfr_float to a random number, to a given precision.

This function is how to get random numbers at a precision different from the current default.