summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjorn Granlund <tege@gmplib.org>2013-01-26 10:01:00 +0100
committerTorbjorn Granlund <tege@gmplib.org>2013-01-26 10:01:00 +0100
commit87ae4b7d12ba490cc6aa9deb4fb7a67b579046d2 (patch)
treeb15c3bab826391da365425bed5421c2b344e1491
parenteffeb0eca9d231514e9c157067273dbc29500851 (diff)
downloadgmp-87ae4b7d12ba490cc6aa9deb4fb7a67b579046d2.tar.gz
Test also mpn_mod_1s_3p.
-rw-r--r--tests/mpn/t-mod_1.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/mpn/t-mod_1.c b/tests/mpn/t-mod_1.c
index a0e331fc9..100211a07 100644
--- a/tests/mpn/t-mod_1.c
+++ b/tests/mpn/t-mod_1.c
@@ -1,6 +1,6 @@
/* Test mpn_mod_1 variants.
-Copyright 2010 Free Software Foundation, Inc.
+Copyright 2010, 2013 Free Software Foundation, Inc.
This file is part of the GNU MP Library test suite.
@@ -52,6 +52,17 @@ check_one (mp_srcptr ap, mp_size_t n, mp_limb_t b)
goto fail;
}
}
+ if (b <= GMP_NUMB_MASK / 3)
+ {
+ mp_limb_t pre[6];
+ mpn_mod_1s_3p_cps (pre, b);
+ r = mpn_mod_1s_3p (ap, n, b << pre[1], pre);
+ if (r != r_ref)
+ {
+ printf ("mpn_mod_1s_3p failed\n");
+ goto fail;
+ }
+ }
if (b <= GMP_NUMB_MASK / 4)
{
mp_limb_t pre[7];