blob: 99c5cca195a7dafe02af9742583a53ef1f589fea [file] [log] [blame]
Austin Schuhdace2a62020-08-18 10:56:48 -07001/* gmpstat.h */
2
3/*
4Copyright 1999 Free Software Foundation, Inc.
5
6This file is part of the GNU MP Library test suite.
7
8The GNU MP Library test suite is free software; you can redistribute it
9and/or modify it under the terms of the GNU General Public License as
10published by the Free Software Foundation; either version 3 of the License,
11or (at your option) any later version.
12
13The GNU MP Library test suite is distributed in the hope that it will be
14useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
16Public License for more details.
17
18You should have received a copy of the GNU General Public License along with
19the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */
20
21/* This file requires the following header files: gmp.h */
22
23#ifndef __GMPSTAT_H__
24#define __GMPSTAT_H__
25
26/* Global debug flag. FIXME: Remove. */
27extern int g_debug;
28#define DEBUG_1 0
29#define DEBUG_2 1
30
31/* Max number of dimensions in spectral test. FIXME: Makw dynamic. */
32#define GMP_SPECT_MAXT 10
33
34void
35mpf_freqt (mpf_t Kp,
36 mpf_t Km,
37 mpf_t X[],
38 const unsigned long int n);
39unsigned long int
40mpz_freqt (mpf_t V,
41 mpz_t X[],
42 unsigned int imax,
43 const unsigned long int n);
44
45/* Low level functions. */
46void
47ks (mpf_t Kp,
48 mpf_t Km,
49 mpf_t X[],
50 void (P) (mpf_t, mpf_t),
51 const unsigned long int n);
52
53void
54ks_table (mpf_t p, mpf_t val, const unsigned int n);
55
56void
57x2_table (double t[],
58 unsigned int v);
59
60void
61spectral_test (mpf_t rop[], unsigned int T, mpz_t a, mpz_t m);
62void
63vz_dot (mpz_t rop, mpz_t V1[], mpz_t V2[], unsigned int n);
64void
65f_floor (mpf_t rop, mpf_t op);
66
67void
68merit (mpf_t rop, unsigned int t, mpf_t v, mpz_t m);
69double
70merit_u (unsigned int t, mpf_t v, mpz_t m);
71
72/* From separate source files: */
73void zdiv_round (mpz_t rop, mpz_t n, mpz_t d);
74
75#endif /* !__GMPSTAT_H__ */