GNU Info

Info Node: (gmp.info)Miscellaneous Integer Functions

(gmp.info)Miscellaneous Integer Functions


Prev: Integer Random Numbers Up: Integer Functions
Enter node , (file) or (file)node

Miscellaneous Functions
=======================

 - Function: int mpz_fits_ulong_p (mpz_t OP)
 - Function: int mpz_fits_slong_p (mpz_t OP)
 - Function: int mpz_fits_uint_p (mpz_t OP)
 - Function: int mpz_fits_sint_p (mpz_t OP)
 - Function: int mpz_fits_ushort_p (mpz_t OP)
 - Function: int mpz_fits_sshort_p (mpz_t OP)
     Return non-zero iff the value of OP fits in an `unsigned long int',
     `signed long int', `unsigned int', `signed int', `unsigned short
     int', or `signed short int', respectively.  Otherwise, return zero.

 - Macro: int mpz_odd_p (mpz_t OP)
 - Macro: int mpz_even_p (mpz_t OP)
     Determine whether OP is odd or even, respectively.  Return
     non-zero if yes, zero if no.  These macros evaluate their argument
     more than once.

 - Function: size_t mpz_size (mpz_t OP)
     Return the size of OP measured in number of limbs.  If OP is zero,
     the returned value will be zero.

 - Function: size_t mpz_sizeinbase (mpz_t OP, int BASE)
     Return the size of OP measured in number of digits in base BASE.
     The base may vary from 2 to 36.  The sign of OP is ignored, just
     the absolute value is used.  The returned value will be exact or 1
     too big.  If BASE is a power of 2, the returned value will always
     be exact.

     This function is useful in order to allocate the right amount of
     space before converting OP to a string.  The right amount of
     allocation is normally two more than the value returned by
     `mpz_sizeinbase' (one extra for a minus sign and one for the
     null-terminator).


automatically generated by info2www version 1.2.2.9