[Gmp-commit] /var/hg/gmp: tests/mpz/t-bin.c: Extend tests, to cover _goetghel...
mercurial at gmplib.org
mercurial at gmplib.org
Thu Apr 19 09:43:53 CEST 2012
details: /var/hg/gmp/rev/7df54aea7a96
changeset: 14853:7df54aea7a96
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Thu Apr 19 09:43:14 2012 +0200
description:
tests/mpz/t-bin.c: Extend tests, to cover _goetgheluck.
diffstat:
ChangeLog | 1 +
tests/mpz/t-bin.c | 10 +++++-----
2 files changed, 6 insertions(+), 5 deletions(-)
diffs (50 lines):
diff -r cbead5bc8621 -r 7df54aea7a96 ChangeLog
--- a/ChangeLog Thu Apr 19 08:42:31 2012 +0200
+++ b/ChangeLog Thu Apr 19 09:43:14 2012 +0200
@@ -7,6 +7,7 @@
* mpz/bin_uiui.c (mpz_goetgheluck_bin_uiui): New, factor-based
implementation.
+ * tests/mpz/t-bin.c: Extend tests, to cover _goetgheluck.
2012-04-17 Torbjorn Granlund <tege at gmplib.org>
diff -r cbead5bc8621 -r 7df54aea7a96 tests/mpz/t-bin.c
--- a/tests/mpz/t-bin.c Thu Apr 19 08:42:31 2012 +0200
+++ b/tests/mpz/t-bin.c Thu Apr 19 09:43:14 2012 +0200
@@ -24,7 +24,7 @@
#include "tests.h"
/* Default number of generated tests. */
-#define COUNT 400
+#define COUNT 700
void
try_mpz_bin_ui (mpz_srcptr want, mpz_srcptr n, unsigned long k)
@@ -182,14 +182,14 @@
for (tests = 1; tests < count; tests++)
{
- r = gmp_urandomm_ui (rands, 30) + 1;
- for (i = r & 3; i > 0; i--)
+ r = gmp_urandomm_ui (rands, 62) + 1;
+ for (i = r & 7; i > 0; i--)
{
n++; k++;
mpz_mul_ui (want, want, n);
mpz_fdiv_q_ui (want, want, k);
}
- for (i = r >> 2; i > 0; i--)
+ for (i = r >> 3; i > 0; i--)
{
n++;
mpz_mul_ui (want, want, n);
@@ -259,7 +259,7 @@
tests_start ();
samples ();
- smallexaustive (count >> 3);
+ smallexaustive (count >> 4);
twos (count >> 1);
randomwalk (count - (count >> 1));
More information about the gmp-commit
mailing list