Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
Loading...
Searching...
No Matches
bertini::multiprecision Namespace Reference

Typedefs

using complex = bertini::complex_mp
 Shorthand for the multiprecision complex type within this namespace.

Functions

void RandomRealAssign (complex &a, unsigned num_digits)
 Assign to a random real number $\in [-1,\,1]$, to current default precision.
complex RandomReal ()
 Produce a random real number $\in [-1,\,1]$, to current default precision.
complex RandomReal (unsigned num_digits)
 Produce a random real number $\in [-1,\,1]$, to specified precision.
complex rand ()
 Produce a random complex number, to default precision.
complex rand_unit ()
 Produce a random unit complex number, to default precision.
complex RandomUnit ()
 Produce a random unit-modulus complex number, to default precision.
complex rand_bounded_modulus ()
 Produce a random complex number whose modulus is pulled toward 1, to default precision.
complex RandomComplexBoundedModulus ()
 Produce a random complex number whose modulus is pulled toward 1 (away from 0 and infinity), at default precision.
void RandomComplexBoundedModulusAssign (complex &a, unsigned num_digits)
 Assign to a a random complex number whose modulus is pulled toward 1, at the given precision.
complex RandomComplexBoundedModulus (unsigned num_digits)
 Produce a random complex number whose modulus is pulled toward 1, at the given precision.
complex rand_real_bounded_modulus ()
 Produce a random REAL number whose modulus is pulled toward 1, to default precision.
complex RandomRealBoundedModulus ()
 Produce a random REAL number (imaginary part 0) whose modulus is pulled toward 1, at default precision.
void RandomRealBoundedModulusAssign (complex &a, unsigned num_digits)
 Assign to a a random REAL number (imaginary part 0) whose modulus is pulled toward 1, at the given precision.
complex RandomRealBoundedModulus (unsigned num_digits)
 Produce a random REAL number (imaginary part 0) whose modulus is pulled toward 1, at the given precision.
void rand_assign (complex &a, unsigned num_digits)
 Assign a random complex number to a, at the given precision.
void RandomComplexAssign (complex &a, unsigned num_digits)
 Assign a random complex number to a, at the given precision.
complex RandomComplex (unsigned num_digits)
 Produce a random complex number, at the given precision.
void RandomUnitAssign (complex &a, unsigned num_digits)
 Assign a random unit-modulus complex number to a, at the given precision.
complex RandomUnit (unsigned num_digits)
 Produce a random unit-modulus complex number, at the given precision.
template<unsigned int length_in_digits>
real_mp RandomMp ()
 Produce a random number with at length_in_digits non-zero digits.

Typedef Documentation

◆ complex

Shorthand for the multiprecision complex type within this namespace.

Function Documentation

◆ rand()

complex bertini::multiprecision::rand ( )
inline

Produce a random complex number, to default precision.

◆ rand_assign()

void bertini::multiprecision::rand_assign ( complex & a,
unsigned num_digits )
inline

Assign a random complex number to a, at the given precision.

◆ rand_bounded_modulus()

complex bertini::multiprecision::rand_bounded_modulus ( )
inline

Produce a random complex number whose modulus is pulled toward 1, to default precision.

Draw a box-uniform complex z (real, imag each in [-1,1]) and divide by sqrt(|z|), so the result has modulus sqrt(|z|): bounded away from both 0 and infinity, but NOT collapsed onto the unit circle (that would be z/abs(z) – see rand_unit). This is how Bertini 1 generates linear-form coefficients, and it avoids the heavy-tailed scaling of a ratio-of-integers draw (RandomRat: numerator/denominator each uniform, so the modulus has fat log-tails).

◆ rand_real_bounded_modulus()

complex bertini::multiprecision::rand_real_bounded_modulus ( )
inline

Produce a random REAL number whose modulus is pulled toward 1, to default precision.

The real-line analog of rand_bounded_modulus: draw x box-uniform in [-1,1] (imaginary part 0) and divide by sqrt(|x|), giving sign(x)*sqrt(|x|) – bounded away from both 0 and infinity, the same Bertini-1 recipe the (complex) start-system and patch coefficients use, but kept REAL so a real patch does not complexify a real path.

◆ rand_unit()

complex bertini::multiprecision::rand_unit ( )
inline

Produce a random unit complex number, to default precision.

◆ RandomComplex()

complex bertini::multiprecision::RandomComplex ( unsigned num_digits)
inline

Produce a random complex number, at the given precision.

◆ RandomComplexAssign()

void bertini::multiprecision::RandomComplexAssign ( complex & a,
unsigned num_digits )
inline

Assign a random complex number to a, at the given precision.

◆ RandomComplexBoundedModulus() [1/2]

complex bertini::multiprecision::RandomComplexBoundedModulus ( )
inline

Produce a random complex number whose modulus is pulled toward 1 (away from 0 and infinity), at default precision.

◆ RandomComplexBoundedModulus() [2/2]

complex bertini::multiprecision::RandomComplexBoundedModulus ( unsigned num_digits)
inline

Produce a random complex number whose modulus is pulled toward 1, at the given precision.

◆ RandomComplexBoundedModulusAssign()

void bertini::multiprecision::RandomComplexBoundedModulusAssign ( complex & a,
unsigned num_digits )
inline

Assign to a a random complex number whose modulus is pulled toward 1, at the given precision.

◆ RandomMp()

template<unsigned int length_in_digits>
real_mp bertini::RandomMp ( )

Produce a random number with at length_in_digits non-zero digits.

Template Parameters
length_in_digitsThe length of the desired random number

◆ RandomReal() [1/2]

complex bertini::multiprecision::RandomReal ( )
inline

Produce a random real number $\in [-1,\,1]$, to current default precision.

◆ RandomReal() [2/2]

complex bertini::multiprecision::RandomReal ( unsigned num_digits)
inline

Produce a random real number $\in [-1,\,1]$, to specified precision.

◆ RandomRealAssign()

void bertini::multiprecision::RandomRealAssign ( complex & a,
unsigned num_digits )
inline

Assign to a random real number $\in [-1,\,1]$, to current default precision.

◆ RandomRealBoundedModulus() [1/2]

complex bertini::multiprecision::RandomRealBoundedModulus ( )
inline

Produce a random REAL number (imaginary part 0) whose modulus is pulled toward 1, at default precision.

◆ RandomRealBoundedModulus() [2/2]

complex bertini::multiprecision::RandomRealBoundedModulus ( unsigned num_digits)
inline

Produce a random REAL number (imaginary part 0) whose modulus is pulled toward 1, at the given precision.

◆ RandomRealBoundedModulusAssign()

void bertini::multiprecision::RandomRealBoundedModulusAssign ( complex & a,
unsigned num_digits )
inline

Assign to a a random REAL number (imaginary part 0) whose modulus is pulled toward 1, at the given precision.

◆ RandomUnit() [1/2]

complex bertini::multiprecision::RandomUnit ( )
inline

Produce a random unit-modulus complex number, to default precision.

◆ RandomUnit() [2/2]

complex bertini::multiprecision::RandomUnit ( unsigned num_digits)
inline

Produce a random unit-modulus complex number, at the given precision.

◆ RandomUnitAssign()

void bertini::multiprecision::RandomUnitAssign ( complex & a,
unsigned num_digits )
inline

Assign a random unit-modulus complex number to a, at the given precision.