summaryrefslogtreecommitdiff
path: root/tests/refmpn.c
diff options
context:
space:
mode:
authorTorbjorn Granlund <tege@gmplib.org>2011-11-07 18:42:27 +0100
committerTorbjorn Granlund <tege@gmplib.org>2011-11-07 18:42:27 +0100
commit98ec919fbc24e85c20818b472131687ba42ae6ab (patch)
tree5a402cf11ffb5ad59a3ddbfa09eba510b2592bdd /tests/refmpn.c
parent9e346a7777b9c5576e5a4758a1701ed114a9e977 (diff)
downloadgmp-98ec919fbc24e85c20818b472131687ba42ae6ab.tar.gz
Change how mpn_redc_1 works, use more broadly.
Diffstat (limited to 'tests/refmpn.c')
-rw-r--r--tests/refmpn.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/refmpn.c b/tests/refmpn.c
index fbcc602d6..7ace7ebce 100644
--- a/tests/refmpn.c
+++ b/tests/refmpn.c
@@ -2,7 +2,7 @@
of the normal gmp code. Speed isn't a consideration.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-2007, 2008, 2009 Free Software Foundation, Inc.
+2007, 2008, 2009, 2011 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -2303,12 +2303,9 @@ refmpn_redc_1 (mp_ptr rp, mp_ptr up, mp_srcptr mp, mp_size_t n, mp_limb_t invm)
for (j = n - 1; j >= 0; j--)
{
- up[0] = mpn_addmul_1 (up, mp, n, (up[0] * invm) & GMP_NUMB_MASK);
+ up[0] = refmpn_addmul_1 (up, mp, n, (up[0] * invm) & GMP_NUMB_MASK);
up++;
}
- cy = mpn_add_n (rp, up, up - n, n);
- if (cy != 0)
- mpn_sub_n (rp, rp, mp, n);
}
size_t