Domanda

I am trying to decide which to use with the modular inverse function of GMP, and I can't seem does find the difference between mpq_t and mpf_t. The GMP manual mentions

— Function: void mpz_set_q (mpz_t rop, const mpq_t op)

— Function: void mpz_set_f (mpz_t rop, const mpf_t op)

when it talks about initializing them. Could anyone shed some light on this? Does the mpf_t maybe deal with floats? (and if so, what does mpq_t deal with?)

È stato utile?

Soluzione

mpf_t is GMP's floating point type. mpq_t is GMP's rational type.

The documentation is here...

http://gmplib.org/manual/Nomenclature-and-Types.html#Nomenclature-and-Types

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top