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 /mpq/get_d.c | |
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 'mpq/get_d.c')
-rw-r--r-- | mpq/get_d.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mpq/get_d.c b/mpq/get_d.c index 0caefed89..3db822689 100644 --- a/mpq/get_d.c +++ b/mpq/get_d.c @@ -96,8 +96,8 @@ mpq_get_d (const MP_RAT *src) double res; mp_srcptr np, dp; mp_ptr remp, tp; - mp_size_t nsize = src->_mp_num._mp_size; - mp_size_t dsize = src->_mp_den._mp_size; + mp_size_t nsize = SIZ(NUM(src)); + mp_size_t dsize = SIZ(DEN(src)); mp_size_t qsize, prospective_qsize, zeros, chop, tsize; mp_size_t sign_quotient = nsize; long exp; @@ -115,8 +115,8 @@ mpq_get_d (const MP_RAT *src) TMP_MARK; nsize = ABS (nsize); dsize = ABS (dsize); - np = src->_mp_num._mp_d; - dp = src->_mp_den._mp_d; + np = PTR(NUM(src)); + dp = PTR(DEN(src)); prospective_qsize = nsize - dsize + 1; /* from using given n,d */ qsize = N_QLIMBS + 1; /* desired qsize */ |