gmp.z

Multiple precision integers (Z).

Members

Aliases

CZ
alias CZ = CopyableMpZ
Undocumented in source.
CopyableMpZ
alias CopyableMpZ = _Z!(true)

Arbitrary precision integer (BigInt) with copy-on-write (CoW) automatic reference counting (ARC) API-compatible with std.bigint.

MpZ
alias MpZ = _Z!(false)

Arbitrary precision integer (BigInt) with explicit copying via .dup.

RZ
alias RZ = _Z!(true)
Undocumented in source.
Z
alias Z = MpZ
Undocumented in source.
__mp_limb_t
alias __mp_limb_t = ulong
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
com
alias com = onesComplement
Undocumented in source.
mp_bitcnt_t
alias mp_bitcnt_t = ulong
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
mpz_ptr
alias mpz_ptr = __mpz_struct*
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
mpz_srcptr
alias mpz_srcptr = const(__mpz_struct)*
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
powmod
alias powmod = powm

For std.bigint.BigInt compatibility.

toHex
alias toHex = toHexadecimalString

For std.bigint.BigInt compatibility.

Enums

Rounding
enum Rounding

Rounding used in division variants cdiv, fdiv and tdiv.

WordEndianess
enum WordEndianess

WordEndianess of serialization in MpZ.serialize and unserialization-construction from integer array.

WordOrder
enum WordOrder

Word-order of serialization in MpZ.serialize and unserialization-construction from integer array.

isLazyMpZExpr
eponymoustemplate isLazyMpZExpr(T)

Is true if type T is lazy (not yet evaluated) MpZ-expression.

isMpZExpr
eponymoustemplate isMpZExpr(T)

Call version(gmp_test) unittests taking long to execute. Is true if type T can be evaluated to a MpZ value.

Functions

__gmpz_abs
void __gmpz_abs(mpz_ptr , mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_add
void __gmpz_add(mpz_ptr , mpz_srcptr , mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_add_ui
void __gmpz_add_ui(mpz_ptr , mpz_srcptr , ulong )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_addmul
void __gmpz_addmul(mpz_ptr , mpz_srcptr , mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_addmul_ui
void __gmpz_addmul_ui(mpz_ptr , mpz_srcptr , ulong )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_and
void __gmpz_and(mpz_ptr , mpz_srcptr , mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_cdiv_q_ui
void __gmpz_cdiv_q_ui(mpz_ptr , mpz_srcptr , ulong )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_cdiv_qr_ui
void __gmpz_cdiv_qr_ui(mpz_ptr , mpz_ptr , mpz_srcptr , ulong )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_cdiv_r_ui
ulong __gmpz_cdiv_r_ui(mpz_ptr , mpz_srcptr , ulong )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_cdiv_ui
void __gmpz_cdiv_ui(mpz_srcptr , ulong )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_clear
void __gmpz_clear(mpz_ptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_clrbit
void __gmpz_clrbit(mpz_ptr , mp_bitcnt_t )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_cmp
int __gmpz_cmp(mpz_srcptr , mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_cmp_d
int __gmpz_cmp_d(mpz_srcptr , double )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_cmp_si
int __gmpz_cmp_si(mpz_srcptr , long )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_cmp_ui
int __gmpz_cmp_ui(mpz_srcptr , ulong )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_cmpabs
int __gmpz_cmpabs(mpz_srcptr , mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_cmpabs_d
int __gmpz_cmpabs_d(mpz_srcptr , double )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_cmpabs_ui
int __gmpz_cmpabs_ui(mpz_srcptr , ulong )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_com
void __gmpz_com(mpz_ptr , mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_combit
void __gmpz_combit(mpz_ptr , mp_bitcnt_t )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_divisible_p
int __gmpz_divisible_p(mpz_srcptr , mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_divisible_ui_p
int __gmpz_divisible_ui_p(mpz_srcptr , ulong )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_export
void* __gmpz_export(void* , size_t* , int , size_t , int , size_t , mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_fdiv_q_ui
void __gmpz_fdiv_q_ui(mpz_ptr , mpz_srcptr , ulong )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_fdiv_qr_ui
void __gmpz_fdiv_qr_ui(mpz_ptr , mpz_ptr , mpz_srcptr , ulong )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_fdiv_r_ui
ulong __gmpz_fdiv_r_ui(mpz_ptr , mpz_srcptr , ulong )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_fdiv_ui
void __gmpz_fdiv_ui(mpz_srcptr , ulong )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_fits_sint_p
int __gmpz_fits_sint_p(mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_fits_slong_p
int __gmpz_fits_slong_p(mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_fits_sshort_p
int __gmpz_fits_sshort_p(mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_fits_uint_p
int __gmpz_fits_uint_p(mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_fits_ulong_p
int __gmpz_fits_ulong_p(mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_fits_ushort_p
int __gmpz_fits_ushort_p(mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_gcd
void __gmpz_gcd(mpz_ptr , mpz_srcptr , mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_gcd_ui
ulong __gmpz_gcd_ui(mpz_ptr , mpz_srcptr , ulong )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_get_d
double __gmpz_get_d(mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_get_si
long __gmpz_get_si(mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_get_str
char* __gmpz_get_str(char* , int , mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_get_ui
ulong __gmpz_get_ui(mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_import
void __gmpz_import(mpz_ptr , size_t , int , size_t , int , size_t , void* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_init
void __gmpz_init(mpz_ptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_init_set
void __gmpz_init_set(mpz_ptr , mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_init_set_d
void __gmpz_init_set_d(mpz_ptr , double )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_init_set_si
void __gmpz_init_set_si(mpz_ptr , long )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_init_set_str
int __gmpz_init_set_str(mpz_ptr , char* , int )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_init_set_ui
void __gmpz_init_set_ui(mpz_ptr , ulong )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_invert
int __gmpz_invert(mpz_ptr , mpz_srcptr , mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_ior
void __gmpz_ior(mpz_ptr , mpz_srcptr , mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_lcm
void __gmpz_lcm(mpz_ptr , mpz_srcptr , mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_lcm_ui
void __gmpz_lcm_ui(mpz_ptr , mpz_srcptr , ulong )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_mod
void __gmpz_mod(mpz_ptr , mpz_srcptr , mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_mod_ui
void __gmpz_mod_ui(mpz_ptr , mpz_srcptr , ulong )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_mul
void __gmpz_mul(mpz_ptr , mpz_srcptr , mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_mul_2exp
void __gmpz_mul_2exp(mpz_ptr , mpz_srcptr , mp_bitcnt_t )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_mul_si
void __gmpz_mul_si(mpz_ptr , mpz_srcptr , long )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_mul_ui
void __gmpz_mul_ui(mpz_ptr , mpz_srcptr , ulong )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_neg
void __gmpz_neg(mpz_ptr , mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_nextprime
void __gmpz_nextprime(mpz_ptr , mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_perfect_power_p
int __gmpz_perfect_power_p(mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_perfect_square_p
int __gmpz_perfect_square_p(mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_popcount
mp_bitcnt_t __gmpz_popcount(mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_pow_ui
void __gmpz_pow_ui(mpz_ptr , mpz_srcptr , ulong )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_powm
void __gmpz_powm(mpz_ptr , mpz_srcptr , mpz_srcptr , mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_powm_ui
void __gmpz_powm_ui(mpz_ptr , mpz_srcptr , ulong , mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_probab_prime_p
int __gmpz_probab_prime_p(mpz_srcptr , int )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_root
int __gmpz_root(mpz_ptr , mpz_srcptr , ulong )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_rootrem
void __gmpz_rootrem(mpz_ptr , mpz_ptr , mpz_srcptr , ulong )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_set
void __gmpz_set(mpz_ptr rop, mpz_srcptr op)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_set_d
void __gmpz_set_d(mpz_ptr rop, double op)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_set_si
void __gmpz_set_si(mpz_ptr rop, long op)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_set_str
int __gmpz_set_str(mpz_ptr , char* , int )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_set_ui
void __gmpz_set_ui(mpz_ptr rop, ulong op)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_setbit
void __gmpz_setbit(mpz_ptr , mp_bitcnt_t )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_sizeinbase
size_t __gmpz_sizeinbase(mpz_srcptr , int )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_sqrt
void __gmpz_sqrt(mpz_ptr , mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_sqrtrem
void __gmpz_sqrtrem(mpz_ptr , mpz_ptr , mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_sub
void __gmpz_sub(mpz_ptr , mpz_srcptr , mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_sub_ui
void __gmpz_sub_ui(mpz_ptr , mpz_srcptr , ulong )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_swap
void __gmpz_swap(mpz_ptr , mpz_ptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_tdiv_q
void __gmpz_tdiv_q(mpz_ptr , mpz_srcptr , mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_tdiv_q_2exp
void __gmpz_tdiv_q_2exp(mpz_ptr , mpz_srcptr , mp_bitcnt_t b)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_tdiv_q_ui
void __gmpz_tdiv_q_ui(mpz_ptr , mpz_srcptr , ulong )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_tdiv_qr_ui
void __gmpz_tdiv_qr_ui(mpz_ptr , mpz_ptr , mpz_srcptr , ulong )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_tdiv_r
void __gmpz_tdiv_r(mpz_ptr , mpz_srcptr , mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_tdiv_r_ui
ulong __gmpz_tdiv_r_ui(mpz_ptr , mpz_srcptr , ulong )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_tdiv_ui
void __gmpz_tdiv_ui(mpz_srcptr , ulong )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_tstbit
int __gmpz_tstbit(mpz_srcptr , mp_bitcnt_t )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_ui_pow_ui
void __gmpz_ui_pow_ui(mpz_ptr , ulong , ulong )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_ui_sub
void __gmpz_ui_sub(mpz_ptr , ulong , mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
__gmpz_xor
void __gmpz_xor(mpz_ptr , mpz_srcptr , mpz_srcptr )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
abs
_Z!(cow) abs(_Z!(cow) x)

Get absolute value of x.

absUnsign
Unsigned!T absUnsign(_Z!(cow) x)

Get the absolute value of x converted to the corresponding unsigned type.

add
_Z!(cow) add(_Z!(cow) x, _Z!(cow) y)

Get sum of x and y (x + y).

cmpabs
int cmpabs(_Z!(cow) x, ulong y)
int cmpabs(_Z!(cow) x, double y)

Comparison of the absolute values of x and y.

cmpabs
int cmpabs(_Z!(cow) x, _Z!(cow) y)

Comparison of the absolute values of x and y.

gcd
_Z!(cow) gcd(_Z!(cow) x, ulong y)

Get greatest common divisor (gcd) of x and y.

gcd
_Z!(cow) gcd(_Z!(cow) x, _Z!(cow) y)

Get greatest common divisor (gcd) of x and y.

invert
_Z!(cow) invert(_Z!(cow) base, _Z!(cow) mod)

Get base ^^ -1 (modulo mod).

lcm
_Z!(cow) lcm(_Z!(cow) x, ulong y)

Get least common multiple (lcm) of x and y.

lcm
_Z!(cow) lcm(_Z!(cow) x, _Z!(cow) y)

Get least common multiple (lcm) of x and y.

mpz
_Z!(cow) mpz(Args args)

Instantiator for MpZ.

mul
_Z!(cow) mul(_Z!(cow) x, _Z!(cow) y)

Get product of x and y (x + y).

nextPrime
_Z!(cow) nextPrime(_Z!(cow) x)

Get next prime greater than x.

onesComplement
_Z!(cow) onesComplement(_Z!(cow) x)

Get one's complement of x.

powm
_Z!(cow) powm(_Z!(cow) base, ulong exp, _Z!(cow) mod)

Get base ^^ exp (modulo mod).

powm
_Z!(cow) powm(_Z!(cow) base, _Z!(cow) exp, _Z!(cow) mod)

Get base ^^ exp (modulo mod).

root
_Z!(cow) root(_Z!(cow) x, ulong n, bool isExact)

Get truncated integer part of the n:th root of x.

rootrem
_Z!(cow) rootrem(_Z!(cow) x, ulong n, _Z!(cow) rem)
Undocumented in source. Be warned that the author may not have intended to support it.
sqrt
_Z!(cow) sqrt(_Z!(cow) x)

Get truncated integer part of the square root of x.

sqrtrem
_Z!(cow) sqrtrem(_Z!(cow) x, _Z!(cow) rem)
Undocumented in source. Be warned that the author may not have intended to support it.
sub
_Z!(cow) sub(_Z!(cow) x, _Z!(cow) y)

Get difference of x and y (x - y).

swap
void swap(_Z!(cow) x, _Z!(cow) y)

Swap contents of x with contents of y.

toDecimalString
string toDecimalString(_Z!(cow) x)

Get x as a string in decimal base.

toHexadecimalString
string toHexadecimalString(_Z!(cow) x)

Get x as a uppercased string in hexadecimal base without any base prefix (0x).

Structs

__mpz_struct
struct __mpz_struct
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Meta