summaryrefslogtreecommitdiff
path: root/tests/mpn
diff options
context:
space:
mode:
authorMarco Bodrato <bodrato@mail.dm.unipi.it>2015-08-14 17:38:58 +0200
committerMarco Bodrato <bodrato@mail.dm.unipi.it>2015-08-14 17:38:58 +0200
commit9e7fadb8bf8cc0ded9ead11d01ef7e6a0118ab1b (patch)
treecebf2cab4e50eb334c5a08d95d4beebcdca763f3 /tests/mpn
parentb7623063a707cb3531ad8a8417714810cb244f06 (diff)
downloadgmp-9e7fadb8bf8cc0ded9ead11d01ef7e6a0118ab1b.tar.gz
tests/mpn/t-broot.c: Test also k=1, - typo.
Diffstat (limited to 'tests/mpn')
-rw-r--r--tests/mpn/t-broot.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/mpn/t-broot.c b/tests/mpn/t-broot.c
index 1aa43319e..b20d23b08 100644
--- a/tests/mpn/t-broot.c
+++ b/tests/mpn/t-broot.c
@@ -95,10 +95,23 @@ main (int argc, char **argv)
gmp_fprintf (stderr, "k = %Mx\n", k);
gmp_fprintf (stderr, "a = %Nx\n", ap, n);
gmp_fprintf (stderr, "r = %Nx\n", rp, n);
- gmp_fprintf (stderr, "r^n = %Nx\n", pp, n);
+ gmp_fprintf (stderr, "r^k = %Nx\n", pp, n);
abort ();
}
}
+
+ mpn_broot (rp, ap, MAX_LIMBS, 1);
+ if (mpn_cmp (ap, rp, MAX_LIMBS) != 0)
+ {
+ gmp_fprintf (stderr,
+ "mpn_broot returned bad result: %u limbs\n",
+ (unsigned) MAX_LIMBS);
+ gmp_fprintf (stderr, "k = %Mx\n", 1);
+ gmp_fprintf (stderr, "a = %Nx\n", ap, MAX_LIMBS);
+ gmp_fprintf (stderr, "r = %Nx\n", rp, MAX_LIMBS);
+ abort ();
+ }
+
TMP_FREE;
tests_end ();
return 0;