#include <gmp.h>
#include "hashtable.h"
Go to the source code of this file.
Data Structures | |
struct | struct_mpz_pair_t |
A pair of mpz_t integers. More... | |
Defines | |
#define | _TIFA_GMP_UTILS_H_ |
Typedefs | |
typedef struct struct_mpz_pair_t | mpz_pair_t |
Equivalent to struct struct_mpz_pair_t . | |
Functions | |
static void | init_mpz_pair (mpz_pair_t *pair) |
inits a mpz_pair_t . | |
static void | clear_mpz_pair (mpz_pair_t *pair) |
Clears a mpz_pair_t . | |
void | empty_mpzpair_htable (hashtable_t *const htable) |
Empties a hashtable_t holding mpz_pair_t 's. | |
static void | free_mpzpair_htable (hashtable_t *htable) |
Clears a hashtable_t holding mpz_pair_t 's. | |
float | mpz_log10 (mpz_t n) |
Logarithm in base 10 of a multi-precision integer. |
Definition in file gmp_utils.h.
#define _TIFA_GMP_UTILS_H_ |
Standard include guard.
Definition at line 35 of file gmp_utils.h.
static void clear_mpz_pair | ( | mpz_pair_t * | pair | ) | [inline, static] |
Clears a mpz_pair_t
.
Clears a mpz_pair_t
.
[in] | pair | A pointer to the mpz_pair_t to clear. |
Definition at line 87 of file gmp_utils.h.
References struct_mpz_pair_t::x, and struct_mpz_pair_t::y.
void empty_mpzpair_htable | ( | hashtable_t *const | htable | ) |
Empties a hashtable_t
holding mpz_pair_t
's.
Empties a hashtable_t
holding mpz_pair_t
's and clears the memory associated to the keys and their associated data.
[in] | htable | A pointer to the hashtable_t to empty. |
Referenced by free_mpzpair_htable().
static void free_mpzpair_htable | ( | hashtable_t * | htable | ) | [inline, static] |
Clears a hashtable_t
holding mpz_pair_t
's.
Clears a hashtable_t
holding mpz_pair_t
's. It clears the memory associated to the keys, their associated data and the hashtable itself.
[in] | htable | A pointer to the hashtable_t to clear. |
Definition at line 111 of file gmp_utils.h.
References empty_mpzpair_htable(), and free_hashtable().
static void init_mpz_pair | ( | mpz_pair_t * | pair | ) | [inline, static] |
inits a mpz_pair_t
.
Inits a mpz_pair_t
by initializing each of its mpz_t
element.
[in] | pair | A pointer to the mpz_pair_t to init. |
Definition at line 75 of file gmp_utils.h.
References struct_mpz_pair_t::x, and struct_mpz_pair_t::y.
float mpz_log10 | ( | mpz_t | n | ) |
Logarithm in base 10 of a multi-precision integer.
Returns an crude approximation of the logarithm (in base 10) of a positive multi-precision integer n
. The approximation is usually valid up to the 4th decimal.
[in] | n | A positive multi-precision integer. |
n
) in base 10.