summaryrefslogtreecommitdiff
path: root/tests/refmpn.c
diff options
context:
space:
mode:
authorTorbjorn Granlund <tege@gmplib.org>2012-02-19 21:04:16 +0100
committerTorbjorn Granlund <tege@gmplib.org>2012-02-19 21:04:16 +0100
commit796a1b2660e8b10c1c9b8113e71ddff57516e3ad (patch)
treea9ba68a404749bc23f9df2ff92fdb80e70ff9795 /tests/refmpn.c
parent2d8505c4e91c252067110df0571564eab836b973 (diff)
downloadgmp-796a1b2660e8b10c1c9b8113e71ddff57516e3ad.tar.gz
Update redc_1 and redc_2 to do the add_n but not the conditional sub_n.
Diffstat (limited to 'tests/refmpn.c')
-rw-r--r--tests/refmpn.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/refmpn.c b/tests/refmpn.c
index 7eb6b8db3..656b2672f 100644
--- a/tests/refmpn.c
+++ b/tests/refmpn.c
@@ -2313,7 +2313,7 @@ refmpn_tdiv_qr (mp_ptr qp, mp_ptr rp, mp_size_t qxn,
}
}
-void
+mp_limb_t
refmpn_redc_1 (mp_ptr rp, mp_ptr up, mp_srcptr mp, mp_size_t n, mp_limb_t invm)
{
mp_size_t j;
@@ -2329,6 +2329,8 @@ refmpn_redc_1 (mp_ptr rp, mp_ptr up, mp_srcptr mp, mp_size_t n, mp_limb_t invm)
up[0] = refmpn_addmul_1 (up, mp, n, (up[0] * invm) & GMP_NUMB_MASK);
up++;
}
+ cy = mpn_add_n (rp, up, up - n, n);
+ return cy;
}
size_t