質問

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?)

役に立ちましたか?

解決

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top