NAME ^

php_gmp.pir - PHP gmp Library

DESCRIPTION ^

Note: Using BigInt is not the good way. The good way is by a full NCI wrapper over the GMP library.

Functions ^

resource gmp_abs(resource a)

Calculates absolute value

resource gmp_add(resource a, resource b)

Add a and b

resource gmp_and(resource a, resource b)

Calculates logical AND of a and b

void gmp_clrbit(resource &a, int index)

Clears bit in a

NOT IMPLEMENTED.

int gmp_cmp(resource a, resource b)

Compares two numbers

resource gmp_com(resource a)

Calculates one's complement of a

NOT IMPLEMENTED.

resource gmp_div_q(resource a, resource b [, int round])

Divide a by b, returns quotient only

NOT IMPLEMENTED.

array gmp_div_qr(resource a, resource b [, int round])

Divide a by b, returns quotient and reminder

NOT IMPLEMENTED.

resource gmp_div_r(resource a, resource b [, int round])

Divide a by b, returns reminder only

NOT IMPLEMENTED.

resource gmp_divexact(resource a, resource b)

Divide a by b using exact division algorithm

NOT IMPLEMENTED.

resource gmp_fact(int a)

Calculates factorial function

NOT IMPLEMENTED.

resource gmp_gcd(resource a, resource b)

Computes greatest common denominator (gcd) of a and b

NOT IMPLEMENTED.

array gmp_gcdext(resource a, resource b)

Computes G, S, and T, such that AS + BT = G = `gcd' (A, B)

NOT IMPLEMENTED.

int gmp_hamdist(resource a, resource b)

Calculates hamming distance between a and b

NOT IMPLEMENTED.

resource gmp_init(mixed number [, int base])

Initializes GMP number

STILL INCOMPLETE.

int gmp_intval(resource gmpnumber)

Gets signed long value of GMP number

resource gmp_invert(resource a, resource b)

Computes the inverse of a modulo b

NOT IMPLEMENTED.

int gmp_jacobi(resource a, resource b)

Computes Jacobi symbol

NOT IMPLEMENTED.

int gmp_legendre(resource a, resource b)

Computes Legendre symbol

NOT IMPLEMENTED.

resource gmp_mod(resource a, resource b)

Computes a modulo b

resource gmp_mul(resource a, resource b)

Multiply a and b

resource gmp_neg(resource a)

Negates a number

resource gmp_nextprime(resource a)

Finds next prime of a

NOT IMPLEMENTED.

resource gmp_or(resource a, resource b)

Calculates logical OR of a and b

bool gmp_perfect_square(resource a)

Checks if a is an exact square

NOT IMPLEMENTED.

int gmp_popcount(resource a)

Calculates the population count of a

NOT IMPLEMENTED.

resource gmp_pow(resource base, int exp)

Raise base to power exp

NOT IMPLEMENTED.

resource gmp_powm(resource base, resource exp, resource mod)

Raise base to power exp and take result modulo mod

NOT IMPLEMENTED.

int gmp_prob_prime(resource a[, int reps])

Checks if a is "probably prime"

NOT IMPLEMENTED.

resource gmp_random([int limiter])

Gets random number

NOT IMPLEMENTED.

int gmp_scan0(resource a, int start)

Finds first zero bit

NOT IMPLEMENTED.

int gmp_scan1(resource a, int start)

Finds first non-zero bit

NOT IMPLEMENTED.

void gmp_setbit(resource &a, int index[, bool set_clear])

Sets or clear bit in a

NOT IMPLEMENTED.

int gmp_sign(resource a)

Gets the sign of the number

NOT IMPLEMENTED.

resource gmp_sqrt(resource a)

Takes integer part of square root of a

NOT IMPLEMENTED.

array gmp_sqrtrem(resource a)

Square root with remainder

NOT IMPLEMENTED.

string gmp_strval(resource gmpnumber [, int base])

Gets string representation of GMP number

NOT IMPLEMENTED.

resource gmp_sub(resource a, resource b)

Subtract b from a

resource gmp_xor(resource a, resource b)

Calculates logical exclusive OR of a and b

NOT IMPLEMENTED.


parrot