github.com/aergoio/aergo@v1.3.1/libtool/src/gmp-6.1.2/tests/rand/gmpstat.h (about) 1 /* gmpstat.h */ 2 3 /* 4 Copyright 1999 Free Software Foundation, Inc. 5 6 This file is part of the GNU MP Library test suite. 7 8 The GNU MP Library test suite is free software; you can redistribute it 9 and/or modify it under the terms of the GNU General Public License as 10 published by the Free Software Foundation; either version 3 of the License, 11 or (at your option) any later version. 12 13 The GNU MP Library test suite is distributed in the hope that it will be 14 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 16 Public License for more details. 17 18 You should have received a copy of the GNU General Public License along with 19 the 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. */ 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__ */