diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2012-02-24 11:14:11 +0100 |
---|---|---|
committer | Marc Glisse <marc.glisse@inria.fr> | 2012-02-24 11:14:11 +0100 |
commit | 15cafc39ad37fb3f06cd0e769f855b199288fdf4 (patch) | |
tree | e81213fb0aa75cb6d8e069d3fd6caaf0be7c985d /gmpxx.h | |
parent | 38a9408ef532be12fb53f765541d32f014302f99 (diff) | |
download | gmp-15cafc39ad37fb3f06cd0e769f855b199288fdf4.tar.gz |
Use macros like NUM, ALLOC, SIZ, etc in mpq/*.
Test some mpq functions that were not used in the testsuite.
Implement q=z (in gmpxx) with mpq_set_z.
Diffstat (limited to 'gmpxx.h')
-rw-r--r-- | gmpxx.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -2036,6 +2036,11 @@ inline void __gmp_set_expr(mpz_ptr z, const __gmp_expr<mpf_t, T> &expr) mpz_set_f(z, temp.get_mpf_t()); } +inline void __gmp_set_expr(mpq_ptr q, const mpz_class &z) +{ + mpq_set_z(q, z.get_mpz_t()); +} + template <class T> inline void __gmp_set_expr(mpq_ptr q, const __gmp_expr<mpz_t, T> &expr) { |