Loading...
Searching...
No Matches
gmpext.h File Reference

utility functions for gmp More...

`#include "cf_defs.h"`
`#include "imm.h"`

Go to the source code of this file.

## Functions

bool | mpz_is_imm (const mpz_t mpi)

## Detailed Description

utility functions for gmp

Definition in file gmpext.h.

## Function Documentation

## mpz_is_imm()

bool mpz_is_imm | ( | const mpz_t | mpi | ) |

inline

Definition at line 19 of file gmpext.h.

{
if (mpi->_mp_size==0)
return true;
if ((mpi->_mp_size>1)||(mpi->_mp_size< -1))
return false;
return ( mpz_cmp_si( mpi, MINIMMEDIATE ) >= 0 ) &&
( mpz_cmp_si( mpi, MAXIMMEDIATE ) <= 0 );
}
MAXIMMEDIATE
const long MAXIMMEDIATE
Definition imm.h:55
MINIMMEDIATE
const long MINIMMEDIATE
Definition imm.h:54