version 1.1.1.1, 2000/09/09 14:13:18 |
version 1.1.1.2, 2003/08/25 16:06:15 |
|
|
number sequences. */ |
number sequences. */ |
|
|
/* |
/* |
Copyright (C) 1999, 2000 Free Software Foundation, Inc. |
Copyright 1999, 2000 Free Software Foundation, Inc. |
|
|
This file is part of the GNU MP Library. |
This file is part of the GNU MP Library. |
|
|
Line 63 for (each observation Xj) |
|
Line 63 for (each observation Xj) |
|
rm = max (rm, a[k] - j/n) |
rm = max (rm, a[k] - j/n) |
j += c[k] |
j += c[k] |
rp = max (rp, j/n - b[k]) |
rp = max (rp, j/n - b[k]) |
|
|
Kp = sqr (n) * rp |
Kp = sqr (n) * rp |
Km = sqr (n) * rm |
Km = sqr (n) * rm |
|
|
Line 539 spectral_test (mpf_t rop[], unsigned int T, mpz_t a, m |
|
Line 539 spectral_test (mpf_t rop[], unsigned int T, mpz_t a, m |
|
mpz_set_ui (p, 1); |
mpz_set_ui (p, 1); |
mpz_set_ui (pp, 0); |
mpz_set_ui (pp, 0); |
mpz_set (r, a); |
mpz_set (r, a); |
mpz_pow_ui (s, a, 2); |
mpz_pow_ui (s, a, 2); |
mpz_add_ui (s, s, 1); /* s = 1 + a^2 */ |
mpz_add_ui (s, s, 1); /* s = 1 + a^2 */ |
|
|
/* S2 [Euclidean step.] */ |
/* S2 [Euclidean step.] */ |
Line 735 spectral_test (mpf_t rop[], unsigned int T, mpz_t a, m |
|
Line 735 spectral_test (mpf_t rop[], unsigned int T, mpz_t a, m |
|
|
|
/* From Knuth p. 104: "The exhaustive search in steps S8-S10 |
/* From Knuth p. 104: "The exhaustive search in steps S8-S10 |
reduces the value of s only rarely." */ |
reduces the value of s only rarely." */ |
#ifdef DO_SEARCH |
#ifdef DO_SEARCH |
/* S7 [Prepare for search.] */ |
/* S7 [Prepare for search.] */ |
/* Find minimum in (x[1], ..., x[t]) satisfying condition |
/* Find minimum in (x[1], ..., x[t]) satisfying condition |
x[k]^2 <= f(y[1], ...,y[t]) * dot(V[k],V[k]) */ |
x[k]^2 <= f(y[1], ...,y[t]) * dot(V[k],V[k]) */ |
Line 802 spectral_test (mpf_t rop[], unsigned int T, mpz_t a, m |
|
Line 802 spectral_test (mpf_t rop[], unsigned int T, mpz_t a, m |
|
#endif /* DO_SEARCH */ |
#endif /* DO_SEARCH */ |
mpf_set_z (f_tmp1, s); |
mpf_set_z (f_tmp1, s); |
mpf_sqrt (rop[ui_t - 1], f_tmp1); |
mpf_sqrt (rop[ui_t - 1], f_tmp1); |
#ifdef DO_SEARCH |
#ifdef DO_SEARCH |
if (g_debug > DEBUG_2) |
if (g_debug > DEBUG_2) |
printf ("done.\n"); |
printf ("done.\n"); |
#endif /* DO_SEARCH */ |
#endif /* DO_SEARCH */ |