Tizen 2.1 base
[external/gmp.git] / tests / rand / gmpstat.h
1 /* gmpstat.h */
2
3 /*
4 Copyright 1999 Free Software Foundation, Inc.
5
6 This file is part of the GNU MP Library.
7
8 The GNU MP Library is free software; you can redistribute it and/or modify
9 it under the terms of the GNU Lesser General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or (at your
11 option) any later version.
12
13 The GNU MP Library is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
16 License for more details.
17
18 You should have received a copy of the GNU Lesser General Public License
19 along with the GNU MP Library.  If not, see http://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. */
27 extern 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
34 void
35 mpf_freqt (mpf_t Kp,
36            mpf_t Km,
37            mpf_t X[],
38            const unsigned long int n);
39 unsigned long int
40 mpz_freqt (mpf_t V,
41            mpz_t X[],
42            unsigned int imax,
43            const unsigned long int n);
44
45 /* Low level functions. */
46 void
47 ks (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
53 void
54 ks_table (mpf_t p, mpf_t val, const unsigned int n);
55
56 void
57 x2_table (double t[],
58           unsigned int v);
59
60 void
61 spectral_test (mpf_t rop[], unsigned int T, mpz_t a, mpz_t m);
62 void
63 vz_dot (mpz_t rop, mpz_t V1[], mpz_t V2[], unsigned int n);
64 void
65 f_floor (mpf_t rop, mpf_t op);
66
67 void
68 merit (mpf_t rop, unsigned int t, mpf_t v, mpz_t m);
69 double
70 merit_u (unsigned int t, mpf_t v, mpz_t m);
71
72 /* From separate source files: */
73 void zdiv_round (mpz_t rop, mpz_t n, mpz_t d);
74
75 #endif /* !__GMPSTAT_H__ */