htestu 0.1.1.1 → 0.1.1.2
raw patch · 79 files changed
+6347/−7 lines, 79 files
Files
- cbits/testu/include/addstr.h +46/−0
- cbits/testu/include/bbattery.h +101/−0
- cbits/testu/include/bitset.h +57/−0
- cbits/testu/include/chrono.h +47/−0
- cbits/testu/include/config.h +99/−0
- cbits/testu/include/fbar.h +113/−0
- cbits/testu/include/fcho.h +64/−0
- cbits/testu/include/fcong.h +93/−0
- cbits/testu/include/fdist.h +186/−0
- cbits/testu/include/ffam.h +50/−0
- cbits/testu/include/ffsr.h +45/−0
- cbits/testu/include/finv.h +99/−0
- cbits/testu/include/fknuth.h +79/−0
- cbits/testu/include/fmarsa.h +63/−0
- cbits/testu/include/fmass.h +97/−0
- cbits/testu/include/fmultin.h +104/−0
- cbits/testu/include/fnpair.h +57/−0
- cbits/testu/include/fres.h +108/−0
- cbits/testu/include/fspectral.h +20/−0
- cbits/testu/include/fstring.h +92/−0
- cbits/testu/include/ftab.h +91/−0
- cbits/testu/include/fvaria.h +61/−0
- cbits/testu/include/fwalk.h +52/−0
- cbits/testu/include/gdef.h +88/−0
- cbits/testu/include/gdefconf.h +30/−0
- cbits/testu/include/gofs.h +105/−0
- cbits/testu/include/gofw.h +170/−0
- cbits/testu/include/mystr.h +38/−0
- cbits/testu/include/num.h +92/−0
- cbits/testu/include/num2.h +65/−0
- cbits/testu/include/rijndael-alg-fst.h +50/−0
- cbits/testu/include/scatter.h +54/−0
- cbits/testu/include/scomp.h +36/−0
- cbits/testu/include/sentrop.h +61/−0
- cbits/testu/include/sknuth.h +98/−0
- cbits/testu/include/smarsa.h +88/−0
- cbits/testu/include/smultin.h +279/−0
- cbits/testu/include/snpair.h +225/−0
- cbits/testu/include/sres.h +143/−0
- cbits/testu/include/sspacings.h +73/−0
- cbits/testu/include/sspectral.h +50/−0
- cbits/testu/include/sstring.h +141/−0
- cbits/testu/include/statcoll.h +59/−0
- cbits/testu/include/svaria.h +54/−0
- cbits/testu/include/swalk.h +64/−0
- cbits/testu/include/swrite.h +54/−0
- cbits/testu/include/tables.h +75/−0
- cbits/testu/include/tu01_sha1.h +20/−0
- cbits/testu/include/uautomata.h +23/−0
- cbits/testu/include/ubrent.h +54/−0
- cbits/testu/include/ucarry.h +86/−0
- cbits/testu/include/ucrypto.h +36/−0
- cbits/testu/include/ucubic.h +45/−0
- cbits/testu/include/udeng.h +26/−0
- cbits/testu/include/ufile.h +36/−0
- cbits/testu/include/ugfsr.h +104/−0
- cbits/testu/include/ugranger.h +76/−0
- cbits/testu/include/uinv.h +56/−0
- cbits/testu/include/uknuth.h +35/−0
- cbits/testu/include/ulcg.h +117/−0
- cbits/testu/include/ulec.h +140/−0
- cbits/testu/include/umarsa.h +120/−0
- cbits/testu/include/umrg.h +59/−0
- cbits/testu/include/unif01.h +195/−0
- cbits/testu/include/unumrec.h +28/−0
- cbits/testu/include/uquad.h +23/−0
- cbits/testu/include/usoft.h +95/−0
- cbits/testu/include/utaus.h +56/−0
- cbits/testu/include/utezuka.h +30/−0
- cbits/testu/include/util.h +79/−0
- cbits/testu/include/utouzin.h +56/−0
- cbits/testu/include/uvaria.h +43/−0
- cbits/testu/include/uweyl.h +25/−0
- cbits/testu/include/uwu.h +28/−0
- cbits/testu/include/uxorshift.h +49/−0
- cbits/testu/include/vectorsF2.h +335/−0
- cbits/testu/include/wdist.h +29/−0
- cbits/testu/src/fftc.c +222/−0
- htestu.cabal +5/−7
+ cbits/testu/include/addstr.h view
@@ -0,0 +1,46 @@+ +/* addstr.h for ANSI C */+#ifndef ADDSTR_H+#define ADDSTR_H+ +#include "gdef.h"+++void addstr_Int (char *to, const char *add, int n);++void addstr_Uint (char *to, const char *add, unsigned int n);++void addstr_Long (char *to, const char *add, long n);++void addstr_Ulong (char *to, const char *add, unsigned long n);++void addstr_Double (char *to, const char *add, double x);++void addstr_Char (char *to, const char *add, char c);++void addstr_Bool (char *to, const char *add, int b);+++#ifdef USE_LONGLONG+void addstr_LONG (char *to, const char *add, longlong n);++void addstr_ULONG (char *to, const char *add, ulonglong n);+#endif+++void addstr_ArrayInt (char *to, const char *add, int high, int []);++void addstr_ArrayUint (char *to, const char *add, int high,+ unsigned int []);++void addstr_ArrayLong (char *to, const char *add, int high, long []);++void addstr_ArrayUlong (char *to, const char *add, int high,+ unsigned long []);++void addstr_ArrayDouble (char *to, const char *add, int high, double []);++ +#endif+ +
+ cbits/testu/include/bbattery.h view
@@ -0,0 +1,101 @@+ +/* bbattery.h for ANSI C */+#ifndef BBATTERY_H+#define BBATTERY_H+ +#include <stdlib.h>+#include "unif01.h"+++extern int bbattery_NTests;++ typedef struct BatteryResults {+ double* pValues;+ int testNumber;+ } BatteryResult;++ BatteryResult* wrap(double* pValues, int testNumber) {+ BatteryResult* result = (BatteryResult*) malloc(sizeof(BatteryResult));+ result->pValues = pValues;+ result->testNumber = testNumber;+ return result;+ }++++extern double bbattery_pVal[];++++extern char *bbattery_TestNames[];+++BatteryResult* bbattery_SmallCrush (unif01_Gen *gen);++void bbattery_SmallCrushFile (char *filename);++++void bbattery_RepeatSmallCrush (unif01_Gen *gen, int rep[]);++++BatteryResult* bbattery_Crush (unif01_Gen *gen);++++void bbattery_RepeatCrush (unif01_Gen *gen, int rep[]);++++BatteryResult* bbattery_BigCrush (unif01_Gen *gen);++++void bbattery_RepeatBigCrush (unif01_Gen *gen, int rep[]);++++void bbattery_Rabbit (unif01_Gen *gen, double nb);+++void bbattery_RabbitFile (char *filename, double nb);+++void bbattery_RepeatRabbit (unif01_Gen *gen, double nb, int rep[]);++++void bbattery_Alphabit (unif01_Gen *gen, double nb, int r, int s);++++void bbattery_AlphabitFile (char *filename, double nb);+++void bbattery_RepeatAlphabit (unif01_Gen *gen, double nb, int r, int s,+ int rep[]);++++void bbattery_BlockAlphabit (unif01_Gen *gen, double nb, int r, int s);+void bbattery_BlockAlphabitFile (char *filename, double nb);++++void bbattery_RepeatBlockAlphabit (unif01_Gen *gen, double nb, int r, int s,+ int rep[], int w);++++BatteryResult* bbattery_pseudoDIEHARD (unif01_Gen *gen);++++void bbattery_FIPS_140_2 (unif01_Gen *gen);+void bbattery_FIPS_140_2File (char *filename);++ +#endif+ +
+ cbits/testu/include/bitset.h view
@@ -0,0 +1,57 @@+ +/* bitset.h for ANSI C */+#ifndef BITSET_H+#define BITSET_H+#include "gdef.h"+ ++extern unsigned long bitset_maskUL[];++++extern unsigned long bitset_MASK[];+++typedef unsigned long bitset_BitSet;++ +#define bitset_SetBit(S, b) ((S) |= (bitset_maskUL[b]))+ ++ +#define bitset_ClearBit(S, b) ((S) &= ~(bitset_maskUL[b]))+ ++ +#define bitset_FlipBit(S, b) ((S) ^= (bitset_maskUL[b]))+ ++ +#define bitset_TestBit(S, b) ((S) & (bitset_maskUL[b]) ? 1 : 0)+ ++ +#define bitset_RotateLeft(S, t, r) do { \+ unsigned long v853 = (S) >> ((t) - (r)); \+ (S) <<= (r); (S) |= v853; (S) &= bitset_MASK[t]; \+ } while (0)+ ++ +#define bitset_RotateRight(S, t, r) do { \+ unsigned long v972 = (S) >> (r); \+ (S) <<= ((t) - (r)); (S) |= v972; (S) &= bitset_MASK[t]; \+ } while (0)+ +++bitset_BitSet bitset_Reverse (bitset_BitSet Z, int s);++++void bitset_WriteSet (char *desc, bitset_BitSet Z, int s);++ +#endif+ +
+ cbits/testu/include/chrono.h view
@@ -0,0 +1,47 @@++ +/* chrono.h for ANSI C */++#ifndef CHRONO_H+#define CHRONO_H +#include "gdef.h"+ +++typedef struct {+ unsigned long microsec;+ unsigned long second;+ } chrono_Chrono;++++typedef enum {+ chrono_sec,+ chrono_min,+ chrono_hours, + chrono_days,+ chrono_hms+ } chrono_TimeFormat;+++chrono_Chrono * chrono_Create (void);++++void chrono_Delete (chrono_Chrono * C);++++void chrono_Init (chrono_Chrono * C);++++double chrono_Val (chrono_Chrono * C, chrono_TimeFormat Unit);++++void chrono_Write (chrono_Chrono * C, chrono_TimeFormat Unit);++ +#endif+
+ cbits/testu/include/config.h view
@@ -0,0 +1,99 @@+/* include/config.h. Generated from config.h.in by configure. */+/* include/config.h.in. Generated from configure.ac by autoheader. */++/* Define to 1 if you have the <dlfcn.h> header file. */+#define HAVE_DLFCN_H 1++/* Define to 1 if you have the `erf' function. */+#define HAVE_ERF 1++/* Define to 1 if you have the <gmp.h> header file. */+#define HAVE_GMP_H 1++/* Define to 1 if you have the <inttypes.h> header file. */+#define HAVE_INTTYPES_H 1++/* Define to 1 if you have the `lgamma' function. */+#define HAVE_LGAMMA 1++/* Define to 1 if you have the `log1p' function. */+#define HAVE_LOG1P 1++/* Define to 1 if the system has the type `long long'. */+#define HAVE_LONG_LONG 1++/* Define when Mathematica is installed */+/* #undef HAVE_MATHEMATICA */++/* Define to 1 if you have the <memory.h> header file. */+#define HAVE_MEMORY_H 1++/* Define to 1 if you have the `random' function. */+#define HAVE_RANDOM 1++/* Define to 1 if you have the <stdint.h> header file. */+#define HAVE_STDINT_H 1++/* Define to 1 if you have the <stdlib.h> header file. */+#define HAVE_STDLIB_H 1++/* Define to 1 if you have the <strings.h> header file. */+#define HAVE_STRINGS_H 1++/* Define to 1 if you have the <string.h> header file. */+#define HAVE_STRING_H 1++/* Define to 1 if you have the <sys/stat.h> header file. */+#define HAVE_SYS_STAT_H 1++/* Define to 1 if you have the <sys/types.h> header file. */+#define HAVE_SYS_TYPES_H 1++/* Define to 1 if you have the <sys/utsname.h> header file. */+#define HAVE_SYS_UTSNAME_H 1++/* Define to 1 if the system has the type `uint32_t'. */+#define HAVE_UINT32_T 1++/* Define to 1 if the system has the type `uint8_t'. */+#define HAVE_UINT8_T 1++/* Define to 1 if you have the <unistd.h> header file. */+#define HAVE_UNISTD_H 1++/* Define to 1 if you have the <windows.h> header file. */+/* #undef HAVE_WINDOWS_H */++/* Name of package */+#define PACKAGE "testu01"++/* Define to the address where bug reports for this package should be sent. */+#define PACKAGE_BUGREPORT "lecuyer@iro.umontreal.ca"++/* Define to the full name of this package. */+#define PACKAGE_NAME "TestU01"++/* Define to the full name and version of this package. */+#define PACKAGE_STRING "TestU01 1.2.3"++/* Define to the one symbol short name of this package. */+#define PACKAGE_TARNAME "testu01"++/* Define to the version of this package. */+#define PACKAGE_VERSION "1.2.3"++/* Define to 1 if you have the ANSI C header files. */+#define STDC_HEADERS 1++/* Version number of package */+#define VERSION "1.2.3"++/* Define to 1 if your processor stores words with the most significant byte+ first (like Motorola and SPARC, unlike Intel and VAX). */+/* #undef WORDS_BIGENDIAN */++/* Define to empty if `const' does not conform to ANSI C. */+/* #undef const */++/* Define to `unsigned int' if <sys/types.h> does not define. */+/* #undef size_t */
+ cbits/testu/include/fbar.h view
@@ -0,0 +1,113 @@+ +/* fbar.h for ANSI C */+#ifndef FBAR_H+#define FBAR_H+ +#include "gdef.h"+#include "fmass.h"+++double fbar_Unif (double x);++++double fbar_Expon (double x);++++double fbar_Weibull (double alpha, double x);++++double fbar_Logistic (double x);++++double fbar_Pareto (double c, double x);++++double fbar_Normal1 (double x);++++double fbar_Normal2 (double x);++++#ifdef HAVE_ERF+ double fbar_Normal3 (double x);+#endif++++double fbar_BiNormal1 (double x, double y, double rho, int ndig);++++double fbar_BiNormal2 (double x, double y, double rho);++++double fbar_ChiSquare1 (long N, double x);++++double fbar_ChiSquare2 (long N, int d, double x);++++double fbar_Gamma (double a, int d, double x);++++double fbar_KS1 (long n, double x);++++double fbar_KSPlus (long n, double x);++++double fbar_LogNormal (double mu, double sigma, double x);++double fbar_JohnsonSB (double alpha, double beta, double a, double b,+ double x);++double fbar_JohnsonSU (double alpha, double beta, double x);++double fbar_CramerMises (long n, double x);++double fbar_WatsonU (long n, double x);++double fbar_WatsonG (long n, double x);++double fbar_AndersonDarling (long n, double x);+++double fbar_Geometric (double p, long s);++++double fbar_Poisson1 (double lambda, long s);++++double fbar_Poisson2 (fmass_INFO W, long s);++++double fbar_Binomial2 (fmass_INFO W, long s);++++double fbar_NegaBin2 (fmass_INFO W, long s);++++double fbar_Scan (long N, double d, long m);++ +#endif+ +
+ cbits/testu/include/fcho.h view
@@ -0,0 +1,64 @@+ +/* fcho.h for ANSI C */+#ifndef FCHO_H+#define FCHO_H+ +++typedef struct {+ void *param;+ double (*Choose) (void *param, long, long);+ void (*Write) (void *param, long, long);+ char *name;+} fcho_Cho;++++long fcho_ChooseParamL (fcho_Cho *cho, long min, long max, long i, long j);+++typedef struct {+ fcho_Cho *Chon;+ fcho_Cho *Chop2;+} fcho_Cho2;++++fcho_Cho2 * fcho_CreateCho2 (fcho_Cho *Chon, fcho_Cho *Chop2);++++void fcho_DeleteCho2 (fcho_Cho2 *cho);+++typedef double (*fcho_FuncType) (double);++++double fcho_Linear (double x);++++double fcho_LinearInv (double x);++++double fcho_2Pow (double x);++++fcho_Cho * fcho_CreateSampleSize (double a, double b, double c,+ fcho_FuncType F, char *name);++++void fcho_DeleteSampleSize (fcho_Cho *cho);++++int fcho_Chooses (int r, int s, int resol);++ +#endif+ +
+ cbits/testu/include/fcong.h view
@@ -0,0 +1,93 @@+ +/* fcong.h for ANSI C */+#ifndef FCONG_H+#define FCONG_H+ +#include "ffam.h"+++ffam_Fam * fcong_CreateLCG (char *fname, int i1, int i2, int istep);++++ffam_Fam * fcong_CreateLCGPow2 (char *fname, int i1, int i2, int istep);++++ffam_Fam * fcong_CreateMRG2 (char *fname, int i1, int i2, int istep);++++ffam_Fam * fcong_CreateMRG3 (char *fname, int i1, int i2, int istep);++++ffam_Fam * fcong_CreateCombL2 (char *fname, int i1, int i2, int istep);++++ffam_Fam * fcong_CreateCombWH2 (char *fname, int i1, int i2, int istep);++++ffam_Fam * fcong_CreateInvImpl (char *fname, int i1, int i2, int istep);++++ffam_Fam * fcong_CreateInvImpl2a (char *fname, int i1, int i2, int istep);++++ffam_Fam * fcong_CreateInvImpl2b (char *fname, int i1, int i2, int istep);++++ffam_Fam * fcong_CreateInvExpl (char *fname, int i1, int i2, int istep);++++ffam_Fam * fcong_CreateInvExpl2a (char *fname, int i1, int i2, int istep);++++ffam_Fam * fcong_CreateInvExpl2b (char *fname, int i1, int i2, int istep);++++ffam_Fam * fcong_CreateInvMRG2 (char *fname, int i1, int i2, int istep);++++ffam_Fam * fcong_CreateCubic1 (char *fname, int i1, int i2, int istep);++++ffam_Fam * fcong_CreateCombCubic2 (char *fname, int i1, int i2, int istep);++++ffam_Fam * fcong_CreateCombCubLCG (char *fname, int i1, int i2, int istep);+++void fcong_DeleteLCG (ffam_Fam *fam);+void fcong_DeleteLCGPow2 (ffam_Fam *fam);+void fcong_DeleteMRG2 (ffam_Fam *fam);+void fcong_DeleteMRG3 (ffam_Fam *fam);+void fcong_DeleteCombL2 (ffam_Fam *fam);+void fcong_DeleteCombWH2 (ffam_Fam *fam);+void fcong_DeleteInvImpl (ffam_Fam *fam);+void fcong_DeleteInvImpl2a (ffam_Fam *fam);+void fcong_DeleteInvImpl2b (ffam_Fam *fam);+void fcong_DeleteInvExpl (ffam_Fam *fam);+void fcong_DeleteInvExpl2a (ffam_Fam *fam);+void fcong_DeleteInvExpl2b (ffam_Fam *fam);+void fcong_DeleteInvMRG2 (ffam_Fam *fam);+void fcong_DeleteCubic1 (ffam_Fam *fam);+void fcong_DeleteCombCubic2 (ffam_Fam *fam);+void fcong_DeleteCombCubLCG (ffam_Fam *fam);+++ +#endif+ +
+ cbits/testu/include/fdist.h view
@@ -0,0 +1,186 @@+ +/* fdist.h for ANSI C */+#ifndef FDIST_H+#define FDIST_H+ +#include "gdef.h"+#include "fmass.h"+++double fdist_Unif (double x);++++double fdist_Expon (double x);++++double fdist_Weibull (double alpha, double x);++++double fdist_ExtremeValue (double x);++++double fdist_Logistic (double x);++++double fdist_Pareto (double c, double x);++++double fdist_Normal1 (double x);++++double fdist_Normal2 (double x);++++#ifdef HAVE_ERF+ double fdist_Normal3 (double x);+#endif++++double fdist_Normal4 (double x);++++double fdist_BiNormal1 (double x, double y, double rho, int ndig);++++double fdist_BiNormal2 (double x, double y, double rho);++++double fdist_LogNormal (double mu, double sigma, double x);++++double fdist_JohnsonSB (double alpha, double beta, double a, double b,+ double x);++++double fdist_JohnsonSU (double alpha, double beta, double x);++++double fdist_ChiSquare1 (long k, double x);++++double fdist_ChiSquare2 (long k, int d, double x);++++double fdist_Student1 (long n, double x);++++double fdist_Student2 (long n, int d, double x);++++double fdist_Gamma (double a, int d, double x);++++double fdist_Beta (double p, double q, int d, double x);++++double fdist_BetaSymmetric (double p, double x);++++double fdist_KSPlus (long n, double x);++++double fdist_KS1 (long n, double x);++++double fdist_KS2 (long n, double x);++++double fdist_KSPlusJumpOne (long n, double a, double x);++#if 0++void fdist_FindJumps (fdist_FUNC_JUMPS *H, int Detail);++++void fdist_FreeJumps (fdist_FUNC_JUMPS *H);++++double fdist_KSMinusJumpsMany (fdist_FUNC_JUMPS *H, double x);++++double fdist_KSPlusJumpsMany (fdist_FUNC_JUMPS *H, double x);+#endif++++double fdist_CramerMises (long n, double x);++++double fdist_WatsonG (long n, double x);++++double fdist_WatsonU (long n, double x);++++double fdist_AndersonDarling (long n, double x);++++double fdist_AndersonDarling2 (long n, double x);+++double fdist_Geometric (double p, long s);++++double fdist_Poisson1 (double lambda, long s);++++double fdist_Poisson2 (fmass_INFO W, long s);++++double fdist_Binomial1 (long n, double p, long s);++++double fdist_Binomial2 (fmass_INFO W, long s);++++double fdist_NegaBin1 (long n, double p, long s);++++double fdist_NegaBin2 (fmass_INFO W, long s);++++double fdist_Scan (long N, double d, long m);++ +#endif+ +
+ cbits/testu/include/ffam.h view
@@ -0,0 +1,50 @@+ +/* ffam.h for ANSI C */+#ifndef FFAM_H+#define FFAM_H+ +#include "unif01.h"++++typedef struct {+ unif01_Gen **Gen;+ int *LSize;+ int *Resol;+ int Ng;+ char *name;+} ffam_Fam;++++ffam_Fam * ffam_CreateFam (int Ng, char *name);++++void ffam_DeleteFam (ffam_Fam *fam);++++void ffam_PrintFam (ffam_Fam *fam);++++void ffam_ReallocFam (ffam_Fam *fam, int Ng);++++ffam_Fam * ffam_CreateSingle (unif01_Gen *gen, int resol, int i1, int i2);++++void ffam_DeleteSingle (ffam_Fam *fam);++ +#include <stdio.h>++FILE * ffam_OpenFile (char *filename, char *defaultfile);+++#endif+ +
+ cbits/testu/include/ffsr.h view
@@ -0,0 +1,45 @@+ +/* ffsr.h for ANSI C */+#ifndef FFSR_H+#define FFSR_H+ +#include "ffam.h"+++ffam_Fam * ffsr_CreateLFSR1 (char *fname, int i1, int i2, int istep);++++ffam_Fam * ffsr_CreateLFSR2 (char *fname, int i1, int i2, int istep);++++ffam_Fam * ffsr_CreateLFSR3 (char *fname, int i1, int i2, int istep);++++ffam_Fam * ffsr_CreateGFSR3 (char *fname, int i1, int i2, int istep);++++ffam_Fam * ffsr_CreateGFSR5 (char *fname, int i1, int i2, int istep);++++ffam_Fam * ffsr_CreateTGFSR1 (char *fname, int i1, int i2, int istep);++++ffam_Fam * ffsr_CreateTausLCG2 (char *fname, int i1, int i2, int istep);+++void ffsr_DeleteLFSR1 (ffam_Fam *fam);+void ffsr_DeleteLFSR2 (ffam_Fam *fam);+void ffsr_DeleteLFSR3 (ffam_Fam *fam);+void ffsr_DeleteTausLCG2 (ffam_Fam *fam);+++ +#endif+ +
+ cbits/testu/include/finv.h view
@@ -0,0 +1,99 @@+ +/* finv.h for ANSI C */++#ifndef FINV_H+#define FINV_H+ +#include "gdef.h" /* From the library mylib */+#include "fmass.h"+#include "fdist.h"+#include "wdist.h"+++double finv_Expon (double u);+++double finv_Weibull (double alpha, double u);++++double finv_ExtremeValue (double u);+++double finv_Logistic (double u);+++double finv_Pareto (double c, double u);++++double finv_Normal1 (double u);++++double finv_Normal2 (double u);++++double finv_Normal3 (double u);++++double finv_LogNormal (double mu, double sigma, double u);++++double finv_JohnsonSB (double alpha, double beta, double a, double b,+ double u);++++double finv_JohnsonSU (double alpha, double beta, double u);++++double finv_ChiSquare1 (long k, double u);++++double finv_ChiSquare2 (long k, double u);++++double finv_Student (long n, double u);++++double finv_BetaSymmetric (double p, double u);++++double finv_GenericC (wdist_CFUNC F, double par[], double u, int d,+ int detail);+++long finv_GenericD1 (fmass_INFO W, double u);+++#if 0+long finv_GenericD2 (wdist_DFUNC F, fmass_INFO W, double u);+#endif++++long finv_Geometric (double p, double u);+++ +#if 0+long finv_Poisson2 (fmass_INFO W, double u);++++long finv_Binomial2 (fmass_INFO W, double u);+++#endif+#endif+ +
+ cbits/testu/include/fknuth.h view
@@ -0,0 +1,79 @@+ +/* fknuth.h for ANSI C */+#ifndef FKNUTH_H+#define FKNUTH_H+ +#include "gdef.h"+#include "ffam.h"+#include "fres.h"+#include "fcho.h"+++extern long fknuth_Maxn;+++typedef struct {+ fres_Cont *Chi;+ fres_Cont *AD;+} fknuth_Res1;++++fknuth_Res1 * fknuth_CreateRes1 (void);++++void fknuth_DeleteRes1 (fknuth_Res1 *res);+++void fknuth_Serial1 (void);++++void fknuth_SerialSparse1 (void);++++void fknuth_Collision1 (void);++++void fknuth_Permutation1 (void);++++void fknuth_CollisionPermut1 (void);++++void fknuth_Gap1 (ffam_Fam *fam, fres_Cont *res, fcho_Cho *cho,+ long N, int r, double Alpha, double Beta,+ int Nr, int j1, int j2, int jstep);++++void fknuth_SimpPoker1 (ffam_Fam *fam, fres_Cont *res, fcho_Cho *cho,+ long N, int r, int d, int k,+ int Nr, int j1, int j2, int jstep);++++void fknuth_CouponCollector1 (ffam_Fam *fam, fres_Cont *res, fcho_Cho *cho,+ long N, int r, int d,+ int Nr, int j1, int j2, int jstep);++++void fknuth_Run1 (ffam_Fam *fam, fres_Cont *res, fcho_Cho *cho,+ long N, int r, lebool Up, lebool Indep,+ int Nr, int j1, int j2, int jstep);+++++void fknuth_MaxOft1 (ffam_Fam *fam, fknuth_Res1 *res, fcho_Cho *cho,+ long N, int r, int d, int t,+ int Nr, int j1, int j2, int jstep);+ +#endif+
+ cbits/testu/include/fmarsa.h view
@@ -0,0 +1,63 @@+ +/* fmarsa.h for ANSI C */+#ifndef FMARSA_H+#define FMARSA_H+ +#include "ffam.h"+#include "fres.h"+#include "fcho.h"+++extern long fmarsa_Maxn, fmarsa_MaxL;+++typedef struct {+ fres_Cont *GCD;+ fres_Cont *NumIter; +} fmarsa_Res2;++++fmarsa_Res2 * fmarsa_CreateRes2 (void);++++void fmarsa_DeleteRes2 (fmarsa_Res2 *res);+++fcho_Cho * fmarsa_CreateBirthEC (long N, int t, double EC);++++void fmarsa_DeleteBirthEC (fcho_Cho *cho);+++void fmarsa_SerialOver1 (void);++++void fmarsa_CollisionOver1 (void);++++void fmarsa_BirthdayS1 (ffam_Fam *fam, fres_Poisson *res, fcho_Cho2 *cho,+ long N, int r, int t, int p,+ int Nr, int j1, int j2, int jstep);++++void fmarsa_MatrixR1 (ffam_Fam *fam, fres_Cont *res, fcho_Cho2 *cho,+ long N, long n, int r, int s, int L,+ int Nr, int j1, int j2, int jstep);++++void fmarsa_GCD1 (ffam_Fam *fam, fmarsa_Res2 *res, fcho_Cho *cho,+ long N, int r, int s,+ int Nr, int j1, int j2, int jstep);+++ +#endif+ +
+ cbits/testu/include/fmass.h view
@@ -0,0 +1,97 @@+ +/* fmass.h for ANSI C */+#ifndef FMASS_H+#define FMASS_H+ ++struct fmass_INFO_T;+ +/*+ For better precision in the tails, we keep the cumulative probabilities+ (F) in cdf[s] for s <= smed (i.e. cdf[s] is the sum off all the probabi-+ lities pdf[i] for i <= s),+ and the complementary cumulative probabilities (1 - F) in cdf[s] for+ s > smed (i.e. cdf[s] is the sum off all the probabilities pdf[i]+ for i >= s).+*/ +struct fmass_INFO_T {+ double *cdf; /* cumulative probabilities */+ double *pdf; /* probability terms or mass distribution */+ double *paramR; /* real parameters of the distribution */+ long *paramI; /* integer parameters of the distribution */+ long smin; /* pdf[s] = 0 for s < smin */+ long smax; /* pdf[s] = 0 for s > smax */ + long smed; /* cdf[s] = F(s) for s <= smed, and + cdf[s] = bar_F(s) for s > smed */+};+ +typedef struct fmass_INFO_T *fmass_INFO;+++extern double fmass_Epsilon;+++extern double fmass_MaxLambdaPoisson; /* = 100000 */++extern double fmass_MaxnBinomial; /* = 100000 */++extern double fmass_MaxnNegaBin; /* = 100000 */+++double fmass_PoissonTerm1 (double lambda, long s);++++fmass_INFO fmass_CreatePoisson (double lambda);++++void fmass_DeletePoisson (fmass_INFO W);+++ +double fmass_PoissonTerm2 (fmass_INFO W, long s);++++double fmass_BinomialTerm3 (long n, double p, long s);++++double fmass_BinomialTerm1 (long n, double p, double q, long s);++++double fmass_BinomialTerm4 (long n, double p, double p2, long s);++++fmass_INFO fmass_CreateBinomial (long n, double p, double q);++++void fmass_DeleteBinomial (fmass_INFO W);++++double fmass_BinomialTerm2 (fmass_INFO W, long s);+++double fmass_NegaBinTerm1 (long n, double p, long s);++++fmass_INFO fmass_CreateNegaBin (long n, double p);++++void fmass_DeleteNegaBin (fmass_INFO W);+++ +double fmass_NegaBinTerm2 (fmass_INFO W, long s);++ +#endif+ +
+ cbits/testu/include/fmultin.h view
@@ -0,0 +1,104 @@+ +/* fmultin.h for ANSI C */+#ifndef FMULTIN_H+#define FMULTIN_H+ +#include "gdef.h"+#include "ftab.h"+#include "ffam.h"+#include "fres.h"+#include "fcho.h"+#include "smultin.h"+++extern long fmultin_Maxn;+++typedef struct {+ smultin_Param *Par;+ fres_Cont *PowDiv[smultin_MAX_DELTA];+ fres_Poisson *Coll;+ fres_Poisson *Empty;+ fres_Poisson *Balls[1 + smultin_MAXB];+ ftab_Table *COApprox;+} fmultin_Res;++++fmultin_Res * fmultin_CreateRes (smultin_Param *par);++++void fmultin_DeleteRes (fmultin_Res *res);++++fcho_Cho * fmultin_CreateEC_DT (long N, int t, double EC);+fcho_Cho * fmultin_CreateEC_2HT (long N, int t, double EC);+fcho_Cho * fmultin_CreateEC_2L (long N, double EC);+fcho_Cho * fmultin_CreateEC_T (long N, double EC);++++void fmultin_DeleteEC (fcho_Cho *cho);++++fcho_Cho * fmultin_CreateDens_DT (int t, double R);+fcho_Cho * fmultin_CreateDens_2HT (int t, double R);+fcho_Cho * fmultin_CreateDens_2L (double R);+fcho_Cho * fmultin_CreateDens_T (double R);++++void fmultin_DeleteDens (fcho_Cho *cho);++++fcho_Cho * fmultin_CreatePer_DT (int t, double R);+fcho_Cho * fmultin_CreatePer_2HT (int t, double R);+fcho_Cho * fmultin_CreatePer_2L (double R);+fcho_Cho * fmultin_CreatePer_T (double R);++++void fmultin_DeletePer (fcho_Cho *cho);+++void fmultin_Serial1 (ffam_Fam *fam, smultin_Param *par,+ fmultin_Res *res, fcho_Cho2 *cho,+ long N, int r, int t, lebool Sparse,+ int Nr, int j1, int j2, int jstep);++++void fmultin_SerialOver1 (ffam_Fam *fam, smultin_Param *par,+ fmultin_Res *res, fcho_Cho2 *cho,+ long N, int r, int t, lebool Sparse,+ int Nr, int j1, int j2, int jstep);++++void fmultin_SerialBits1 (ffam_Fam *fam, smultin_Param *par,+ fmultin_Res *res, fcho_Cho2 *cho,+ long N, int r, int s, lebool Sparse,+ int Nr, int j1, int j2, int jstep);++++void fmultin_SerialBitsOver1 (ffam_Fam *fam, smultin_Param *par,+ fmultin_Res *res, fcho_Cho2 *cho,+ long N, int r, int s, lebool Sparse,+ int Nr, int j1, int j2, int jstep);++++void fmultin_Permut1 (ffam_Fam *fam, smultin_Param *par,+ fmultin_Res *res, fcho_Cho2 *cho,+ long N, int r, lebool Sparse,+ int Nr, int j1, int j2, int jstep);++ +#endif+ +
+ cbits/testu/include/fnpair.h view
@@ -0,0 +1,57 @@+ +/* fnpair.h for ANSI C */+#ifndef FNPAIR_H+#define FNPAIR_H+ +#include "gdef.h"+#include "ffam.h"+#include "fres.h"+#include "fcho.h"+#include "snpair.h"+++extern long fnpair_Maxn;+++typedef struct {+ ftab_Table *PVal[snpair_StatType_N];+} fnpair_Res1;++++fnpair_Res1 * fnpair_CreateRes1 (void);++++void fnpair_DeleteRes1 (fnpair_Res1 *res);++++fcho_Cho *fnpair_CreateM1 (int maxm);++++void fnpair_DeleteM1 (fcho_Cho * cho);++++void fnpair_ClosePairs1 (ffam_Fam *fam, fnpair_Res1 *res, fcho_Cho2 *cho,+ long N, int r, int t, int p, int m,+ int Nr, int j1, int j2, int jstep);++++void fnpair_Bickel1 (ffam_Fam *fam, fnpair_Res1 *res, fcho_Cho *cho,+ long N, int r, int t, int p, lebool Torus,+ int Nr, int j1, int j2, int jstep);++++void fnpair_BitMatch1 (ffam_Fam *fam, fnpair_Res1 *res, fcho_Cho *cho,+ long N, int r, int t,+ int Nr, int j1, int j2, int jstep);++ +#endif+ +
+ cbits/testu/include/fres.h view
@@ -0,0 +1,108 @@++ +/* fres.h for ANSI C */+#ifndef FRES_H+#define FRES_H+ +#include "gofw.h"+#include "ftab.h"+#include "ffam.h"+#include "bitset.h"++++typedef struct {+ ftab_Table *PVal [gofw_NTestTypes];+ bitset_BitSet Active;+ char *name;+} fres_Cont;++++fres_Cont *fres_CreateCont (void);++++void fres_DeleteCont (fres_Cont *res);++ ++void fres_InitCont (ffam_Fam *fam, fres_Cont *res, int N,+ int Nr, int j1, int j2, int jstep, char *nam);++ ++void fres_PrintCont (fres_Cont *res);++++void fres_FillTableEntryC (fres_Cont *res, gofw_TestArray pval, int N,+ int irow, int icol);+++typedef struct {+ ftab_Table *PLeft;+ ftab_Table *PRight;+ ftab_Table *PVal2;+ char *name;+} fres_Disc;++++fres_Disc * fres_CreateDisc (void);++++void fres_DeleteDisc (fres_Disc *res);++ ++void fres_InitDisc (ffam_Fam *fam, fres_Disc *res,+ int Nr, int j1, int j2, int jstep, char *nam);++ ++void fres_PrintDisc (fres_Disc *res, lebool LR);++++void fres_FillTableEntryD (fres_Disc *res, double pLeft, double pRight,+ double pVal2, int irow, int icol);+++typedef struct {+ ftab_Table *Exp;+ ftab_Table *Obs;+ ftab_Table *PLeft;+ ftab_Table *PRight;+ ftab_Table *PVal2;+ char *name;+} fres_Poisson;++++fres_Poisson * fres_CreatePoisson (void);++++void fres_DeletePoisson (fres_Poisson *res);++ ++void fres_InitPoisson (ffam_Fam *fam, fres_Poisson *res,+ int Nr, int j1, int j2, int jstep, char *nam);++ ++void fres_PrintPoisson (fres_Poisson *res, lebool LR, lebool Ratio);++++void fres_FillTableEntryPoisson (fres_Poisson *res, double Exp, double Obs, + double pLeft, double pRight, double pVal2,+ int irow, int icol);++ +#endif+ +
+ cbits/testu/include/fspectral.h view
@@ -0,0 +1,20 @@+ +/* fspectral.h for ANSI C */+#ifndef FSPECTRAL_H+#define FSPECTRAL_H+ +#include "ffam.h"+#include "fres.h"+#include "fcho.h"+++extern long fspectral_MaxN;++void fspectral_Fourier3 (ffam_Fam *fam, fres_Cont *res, fcho_Cho *cho,+ int k, int r, int s,+ int Nr, int j1, int j2, int jstep);++ +#endif+ +
+ cbits/testu/include/fstring.h view
@@ -0,0 +1,92 @@+ +/* fstring.h for ANSI C */+#ifndef FSTRING_H+#define FSTRING_H+ +#include "ffam.h"+#include "fres.h"+#include "fcho.h"+++extern long fstring_Maxn, fstring_MaxL;+++typedef struct {+ fres_Cont *BLen;+ fres_Disc *GLen;+} fstring_Res1;++++fstring_Res1 * fstring_CreateRes1 (void);++++void fstring_DeleteRes1 (fstring_Res1 *res);+++typedef struct {+ fres_Cont *NBits;+ fres_Cont *NRuns;+} fstring_Res2;++++fstring_Res2 * fstring_CreateRes2 (void);++++void fstring_DeleteRes2 (fstring_Res2 *res);+++void fstring_Period1 (ffam_Fam *fam, fres_Cont *res, fcho_Cho *cho,+ long N, int r, int s,+ int Nr, int j1, int j2, int jstep);++++void fstring_Run1 (ffam_Fam *fam, fstring_Res2 *res, fcho_Cho *cho,+ long N, int r, int s,+ int Nr, int j1, int j2, int jstep);++++void fstring_AutoCor1 (ffam_Fam *fam, fres_Cont *res, fcho_Cho *cho,+ long N, int r, int s, int d,+ int Nr, int j1, int j2, int jstep);++++void fstring_LongHead1 (ffam_Fam *fam, fstring_Res1 *res, fcho_Cho2 *cho,+ long N, long n, int r, int s, long L,+ int Nr, int j1, int j2, int jstep);++++void fstring_HamWeight1 (ffam_Fam *fam, fres_Cont *res, fcho_Cho2 *cho,+ long N, long n, int r, int s, long L,+ int Nr, int j1, int j2, int jstep);++++void fstring_HamWeight2 (ffam_Fam *fam, fres_Cont *res, fcho_Cho2 *cho,+ long N, long n, int r, int s, long L,+ int Nr, int j1, int j2, int jstep);++++void fstring_HamCorr1 (ffam_Fam *fam, fres_Cont *res, fcho_Cho2 *cho,+ long N, long n, int r, int s, long L,+ int Nr, int j1, int j2, int jstep);++++void fstring_HamIndep1 (ffam_Fam *fam, fres_Cont *res, fcho_Cho2 *cho,+ long N, long n, int r, int s, long L,+ int Nr, int j1, int j2, int jstep);+++ +#endif+ +
+ cbits/testu/include/ftab.h view
@@ -0,0 +1,91 @@+ +/* ftab.h for ANSI C */+#ifndef FTAB_H+#define FTAB_H+ +#include "ffam.h"+#include "unif01.h"++ +typedef enum {+ ftab_NotInit, /* Uninitialized */+ ftab_pVal1, /* One-sided p-value */+ ftab_pVal2, /* Two-sided p-value */+ ftab_pLog10, /* Logarithm of p-value in base 10 */+ ftab_pLog2, /* Logarithm of p-value in base 2 */+ ftab_Integer, /* Integer number */+ ftab_Real, /* Real number */+ ftab_String /* String */+} ftab_FormType;+ ++typedef struct {+ double **Mat;+ int *LSize;+ int Nr, Nc;+ int j1, j2, jstep;+ ftab_FormType Form;+ char *Desc;+ char **Strings;+ int Ns;+} ftab_Table;+++ftab_Table *ftab_CreateTable (int Nr, int j1, int j2, int jstep,+ char *Desc, ftab_FormType Form, int Ns);++++void ftab_DeleteTable (ftab_Table *T);++++void ftab_SetDesc (ftab_Table *T, char *Desc);++++void ftab_InitMatrix (ftab_Table *T, double x);++++typedef void (*ftab_CalcType) (ffam_Fam *fam, void *res, void *cho,+ void *par, int LSize, int j,+ int irow, int icol);++++void ftab_MakeTables (ffam_Fam *fam, void *res, void *cho, void *par,+ ftab_CalcType Calc, + int Nr, int j1, int j2, int jstep);+++typedef enum {+ ftab_Plain, /* To print tables in plain text */+ ftab_Latex /* To print tables in Latex format */+} ftab_StyleType;++++extern ftab_StyleType ftab_Style;++++extern double ftab_Suspectp;++++extern int ftab_SuspectLog2p;++++void ftab_PrintTable (ftab_Table *T);++++void ftab_PrintTable2 (ftab_Table *T1, ftab_Table *T2, lebool ratioF);+++ +#endif+ +
+ cbits/testu/include/fvaria.h view
@@ -0,0 +1,61 @@+ +/* fvaria.h for ANSI C */+#ifndef FVARIA_H+#define FVARIA_H+ +#include "ffam.h"+#include "fres.h"+#include "fcho.h"+++extern long fvaria_MaxN;+extern long fvaria_Maxn;+extern long fvaria_Maxk;+extern long fvaria_MaxK;+++void fvaria_SampleMean1 (ffam_Fam *fam, fres_Cont *res, fcho_Cho *cho,+ long n, int r,+ int Nr, int j1, int j2, int jstep);++++void fvaria_SampleCorr1 (ffam_Fam *fam, fres_Cont *res, fcho_Cho *cho,+ long N, int r, int k,+ int Nr, int j1, int j2, int jstep);++++void fvaria_SampleProd1 (ffam_Fam *fam, fres_Cont *res, fcho_Cho *cho,+ long N, int r, int t,+ int Nr, int j1, int j2, int jstep);++++void fvaria_SumLogs1 (ffam_Fam *fam, fres_Cont *res, fcho_Cho *cho,+ long N, int r,+ int Nr, int j1, int j2, int jstep);++++void fvaria_SumCollector1 (ffam_Fam *fam, fres_Cont *res, fcho_Cho *cho,+ long N, int r, double g,+ int Nr, int j1, int j2, int jstep);++++void fvaria_Appearance1 (ffam_Fam *fam, fres_Cont *res, fcho_Cho *cho,+ long N, int r, int s, int L,+ int Nr, int j1, int j2, int jstep); ++++void fvaria_WeightDistrib1 (ffam_Fam *fam, fres_Cont *res, fcho_Cho2 *cho,+ long N, long n, int r, long k,+ double alpha, double beta,+ int Nr, int j1, int j2, int jstep);++ +#endif+ +
+ cbits/testu/include/fwalk.h view
@@ -0,0 +1,52 @@+ +/* fwalk.h for ANSI C */+#ifndef FWALK_H+#define FWALK_H+ +#include "ffam.h"+#include "fres.h"+#include "fcho.h"+++extern long fwalk_Maxn;+extern long fwalk_MaxL;+extern double fwalk_MinMu;+++typedef struct {+ fres_Cont *H;+ fres_Cont *M;+ fres_Cont *J;+ fres_Cont *R;+ fres_Cont *C;+} fwalk_Res1;++++fwalk_Res1 * fwalk_CreateRes1 (void);++++void fwalk_DeleteRes1 (fwalk_Res1 *res);+++void fwalk_RWalk1 (ffam_Fam *fam, fwalk_Res1 *res, fcho_Cho2 *cho,+ long N, long n, int r, int s, long L,+ int Nr, int j1, int j2, int jstep);++++void fwalk_VarGeoP1 (ffam_Fam *fam, fres_Cont *res, fcho_Cho2 *cho,+ long N, long n, int r, double Mu,+ int Nr, int j1, int j2, int jstep);++++void fwalk_VarGeoN1 (ffam_Fam *fam, fres_Cont *res, fcho_Cho2 *cho,+ long N, long n, int r, double Mu,+ int Nr, int j1, int j2, int jstep);++ +#endif+ +
+ cbits/testu/include/gdef.h view
@@ -0,0 +1,88 @@+ +/* gdef.h for ANSI C */+#ifndef GDEF_H+#define GDEF_H++#include <gdefconf.h>+#include <limits.h>++#ifdef HAVE_LONG_LONG+#define USE_LONGLONG+#else+#undef USE_LONGLONG+#endif++#ifdef HAVE_GMP_H+#define USE_GMP+#else+#undef USE_GMP+#endif+ ++#define FALSE 0+#define TRUE 1++typedef int lebool;++++#ifdef HAVE_STDINT_H+#include <stdint.h>+#endif++#ifndef HAVE_UINT32_T+#if UINT_MAX >= 4294967295UL+ typedef unsigned int uint32_t;+#else+ typedef unsigned long uint32_t;+#endif+#endif++#ifndef HAVE_UINT8_T+ typedef unsigned char uint8_t;+#endif++++#define USE_LONGLONG++++#ifdef USE_LONGLONG+ typedef long long longlong;+ typedef unsigned long long ulonglong;+#define PRIdLEAST64 "lld"+#define PRIuLEAST64 "llu"+#endif++++#if ULONG_MAX == 4294967295UL+#define IS_ULONG32+#endif++++#undef USE_ANSI_CLOCK++++#define DIR_SEPARATOR "/"++++#undef USE_GMP++++#undef HAVE_MATHEMATICA+++void gdef_GetHostName (char machine[], int n);++++void gdef_WriteHostName (void);++#endif+
+ cbits/testu/include/gdefconf.h view
@@ -0,0 +1,30 @@+/* include/gdefconf.h. Generated from gdefconf.h.in by configure. */+/* gdef.h for ANSI C */+#ifndef GDEFCONF_H+#define GDEFCONF_H++/* #undef HAVE_LEBOOL */++#define HAVE_LONG_LONG 1++#define HAVE_ERF 1++#define HAVE_RANDOM 1++#define HAVE_LGAMMA 1++#define HAVE_GMP_H 1++/* #undef HAVE_MATHEMATICA */++#define HAVE_SYS_UTSNAME_H 1++#define HAVE_UNISTD_H 1++#define HAVE_STDINT_H 1++#define HAVE_UINT32_T 1++#define HAVE_UINT8_T 1++#endif
+ cbits/testu/include/gofs.h view
@@ -0,0 +1,105 @@+ +/* gofs.h for ANSI C */+#ifndef GOFS_H+#define GOFS_H+ +#include "bitset.h" /* From the library mylib */+#include "fmass.h"+#include "fdist.h"+#include "wdist.h"++++extern double gofs_MinExpected;++++extern double gofs_EpsilonAD;+++void gofs_ContUnifTransform (double V[], long N, wdist_CFUNC F,+ double par[], double U[]);++++void gofs_DiscUnifTransform (double V[], long N, wdist_DFUNC F,+ fmass_INFO W, double U[]);++++void gofs_DiffD (double U[], double D[], long N1, long N2, + double a, double b);++++void gofs_DiffL (long U[], long D[], long N1, long N2, long a, long b);++#ifdef USE_LONGLONG+void gofs_DiffLL (longlong U[], longlong D[], long N1, long N2,+ longlong a, longlong b);+void gofs_DiffULL (ulonglong U[], ulonglong D[], long N1, long N2,+ ulonglong a, ulonglong b);+#endif++++void gofs_IterateSpacings (double V[], double S[], long N);++++void gofs_PowerRatios (double U[], long N);++++void gofs_MergeClasses (double NbExp[], long Loc[],+ long *smin, long *smax, long *NbClasses);++++void gofs_WriteClasses (double NbExp[], long Loc[], + long smin, long smax, long NbClasses);+++double gofs_Chi2 (double NbExp[], long Count[], long smin, long smax);++++double gofs_Chi2Equal (double NbExp, long Count[], long smin, long smax);++++long gofs_Scan (double U[], long N, double d);++++double gofs_CramerMises (double U[], long N);++++double gofs_WatsonG (double U[], long N);++++double gofs_WatsonU (double U[], long N);++++double gofs_AndersonDarling (double U[], long N);++++void gofs_KS (double U[], long N, double *DP, double *DM, double *D);++++void gofs_KSJumpOne (double U[], long N, double a, double *DP, double *DM);++#if 0+void gofs_KSJumpsMany (double X[], int N, wdist_CFUNC F, double W[],+ double *DP, double *DM, int Detail);+#endif++ +#endif+ +
+ cbits/testu/include/gofw.h view
@@ -0,0 +1,170 @@+ +/* gofw.h for ANSI C */+#ifndef GOFW_H+#define GOFW_H+ +#include "gdef.h" /* From the library mylib */+#include "bitset.h" /* From the library mylib */+#include "fdist.h"+#include "wdist.h"+#include <stdio.h>+++typedef enum {+ gofw_Gnuplot,+ gofw_Mathematica+ } gofw_GraphType;++++extern gofw_GraphType gofw_GraphSoft;++++void gofw_GraphFunc (FILE *f, wdist_CFUNC F, double par[], double a,+ double b, int m, int mono, char Desc[]);++++void gofw_GraphDistUnif (FILE *f, double U[], long N, char Desc[]);+++extern double gofw_Epsilonp;+extern double gofw_Epsilonp1;++++extern double gofw_Suspectp;++++double gofw_pDisc (double pL, double pR);++++void gofw_Writep0 (double p);++++void gofw_Writep1 (double p);++++void gofw_Writep2 (double x, double p);++++void gofw_WriteKS0 (long N, double DP, double DM, double D);++++void gofw_WriteKS1 (double V[], long N, wdist_CFUNC F, double par[]);++++void gofw_WriteKSJumpOne0 (long N, double a, double DP);++++void gofw_WriteKSJumpOne1 (double V[], long N, + wdist_CFUNC F, double par[], double a);++#if 0++void gofw_KSJumpsMany0 (double DP, double DM, fdist_FUNC_JUMPS *H);++++void gofw_KSJumpsMany2 (statcoll_Collector *S, fdist_FUNC_JUMPS *H,+ int Detail);++++#endif+++typedef enum {+ gofw_KSP, /* Kolmogorov-Smirnov+ */+ gofw_KSM, /* Kolmogorov-Smirnov- */+ gofw_KS, /* Kolmogorov-Smirnov */+ gofw_AD, /* Anderson-Darling */+ gofw_CM, /* Cramer-vonMises */+ gofw_WG, /* Watson G */+ gofw_WU, /* Watson U */+ gofw_Mean, /* Mean */+ gofw_Var, /* Variance */+ gofw_Cor, /* Correlation */+ gofw_Sum, /* Sum */+ gofw_NTestTypes /* Total number of test types */+ } gofw_TestType;++++typedef double gofw_TestArray [gofw_NTestTypes];++++extern char *gofw_TestNames [gofw_NTestTypes];++++extern bitset_BitSet gofw_ActiveTests;++++void gofw_InitTestArray (gofw_TestArray A, double x);++++void gofw_Tests0 (double U[], long N, gofw_TestArray sVal);++++void gofw_Tests1 (double V[], long N, wdist_CFUNC F, double par[],+ gofw_TestArray sVal);++++void gofw_ActiveTests0 (double U[], long N, + gofw_TestArray sVal, gofw_TestArray pVal);++++void gofw_ActiveTests1 (double V[], long N, wdist_CFUNC F, double par[],+ gofw_TestArray sVal, gofw_TestArray pVal);++++void gofw_ActiveTests2 (double V[], double U[], long N, wdist_CFUNC F,+ double par[], gofw_TestArray sVal,+ gofw_TestArray pVal);++++void gofw_WriteActiveTests0 (long N, gofw_TestArray sVal,+ gofw_TestArray pVal);++++void gofw_WriteActiveTests1 (double V[], long N, + wdist_CFUNC F, double par[]);++++void gofw_WriteActiveTests2 (long N, gofw_TestArray sVal,+ gofw_TestArray pVal, char Desc[]);++++void gofw_IterSpacingsTests0 (double U[], long N, int k, + lebool printval, lebool graph, FILE *f);++++void gofw_IterPowRatioTests0 (double U[], long N, int k,+ lebool printval, lebool graph, FILE *f);++ +#endif+ +
+ cbits/testu/include/mystr.h view
@@ -0,0 +1,38 @@+ +/* mystr.h for ANSI C */++#ifndef MYSTR_H+#define MYSTR_H+ ++void mystr_Delete (char S[], unsigned int index, unsigned int len);++++void mystr_Insert (char Res[], char Source[], unsigned int Pos);++++void mystr_ItemS (char R[], char S[], const char T[], unsigned int N);++++int mystr_Match (char Source[], char Pattern[]);++++void mystr_Slice (char R[], char S[], unsigned int P, unsigned int L);++++void mystr_Subst (char Source[], char OldPattern[], char NewPattern[]);++++void mystr_Position (char Substring[], char Source[], unsigned int at,+ unsigned int * pos, int * found);++ ++#endif+
+ cbits/testu/include/num.h view
@@ -0,0 +1,92 @@+ +/* num.h for ANSI C */++#ifndef NUM_H+#define NUM_H+ +#include "gdef.h"+++#define num_Pi 3.14159265358979323846+++#define num_ebase 2.7182818284590452354+++#define num_Rac2 1.41421356237309504880+++#define num_1Rac2 0.70710678118654752440+++#define num_Ln2 0.69314718055994530941+++#define num_1Ln2 1.44269504088896340737+++#define num_MaxIntDouble 9007199254740992.0+++#define num_MaxTwoExp 64+++extern double num_TwoExp[]; +++#define num_MAXTENNEGPOW 16+++extern double num_TENNEGPOW[];+++#define num_Log2(x) (num_1Ln2 * log(x)) ++++long num_RoundL (double x);++++double num_RoundD (double x);++++int num_IsNumber (char S[]);++++void num_IntToStrBase (long k, long b, char S[]);++++void num_Uint2Uchar (unsigned char output[], unsigned int input[], int L);++++void num_WriteD (double x, int i, int j, int k);++++void num_WriteBits (unsigned long x, int k);++++long num_MultModL (long a, long s, long c, long m);++++double num_MultModD (double a, double s, double c, double m);++++long num_InvEuclid (long m, long z);++++unsigned long num_InvExpon (int E, unsigned long z);++ +#endif+ +
+ cbits/testu/include/num2.h view
@@ -0,0 +1,65 @@+ +/* num2.h for ANSI C */++#ifndef NUM2_H+#define NUM2_H+ +#include "gdef.h"+#include <math.h>+++double num2_Factorial (int n);++++double num2_LnFactorial (int n);++++double num2_Combination (int n, int s);++++#ifdef HAVE_LGAMMA+#define num2_LnGamma lgamma+#else+ double num2_LnGamma (double x);+#endif++++double num2_Digamma (double x);++++#ifdef HAVE_LOG1P+#define num2_log1p log1p+#else+ double num2_log1p (double x);+#endif++++void num2_CalcMatStirling (double *** M, int m, int n);++++void num2_FreeMatStirling (double *** M, int m);++++double num2_VolumeSphere (double p, int t);++++double num2_EvalCheby (const double A[], int N, double x);++++double num2_BesselK025 (double x);++ ++#endif+ +
+ cbits/testu/include/rijndael-alg-fst.h view
@@ -0,0 +1,50 @@++/* Remarks for TestU01:+ * The only changes I have made in the authors' code below is to rename the+ * types u8, u32. I have also removed 3 unused defined constants.+ * (R. Simard for TestU01)+ *+ *===========================================================================*/+ +/**+ * rijndael-alg-fst.h+ *+ * @version 3.0 (December 2000)+ *+ * Optimised ANSI C code for the Rijndael cipher (now AES)+ *+ * @author Vincent Rijmen <vincent.rijmen@esat.kuleuven.ac.be>+ * @author Antoon Bosselaers <antoon.bosselaers@esat.kuleuven.ac.be>+ * @author Paulo Barreto <paulo.barreto@terra.com.br>+ *+ * This code is hereby placed in the public domain.+ *+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.+ */+#ifndef __RIJNDAEL_ALG_FST_H+#define __RIJNDAEL_ALG_FST_H+#include "gdef.h"+++int rijndaelKeySetupEnc(uint32_t rk[/*4*(Nr + 1)*/], const uint8_t cipherKey[], int keyBits);+int rijndaelKeySetupDec(uint32_t rk[/*4*(Nr + 1)*/], const uint8_t cipherKey[], int keyBits);+void rijndaelEncrypt(const uint32_t rk[/*4*(Nr + 1)*/], int Nr, const uint8_t pt[16], uint8_t ct[16]);+void rijndaelDecrypt(const uint32_t rk[/*4*(Nr + 1)*/], int Nr, const uint8_t ct[16], uint8_t pt[16]);++#ifdef INTERMEDIATE_VALUE_KAT+void rijndaelEncryptRound(const uint32_t rk[/*4*(Nr + 1)*/], int Nr, uint8_t block[16], int rounds);+void rijndaelDecryptRound(const uint32_t rk[/*4*(Nr + 1)*/], int Nr, uint8_t block[16], int rounds);+#endif /* INTERMEDIATE_VALUE_KAT */++#endif /* __RIJNDAEL_ALG_FST_H */+
+ cbits/testu/include/scatter.h view
@@ -0,0 +1,54 @@++ +/* scatter.h for ANSI C */+#ifndef SCATTER_H+#define SCATTER_H+ +#include "gdef.h"+#include "unif01.h"+++typedef enum {+ scatter_latex, /* Latex format */+ scatter_gnu_ps, /* gnuplot format for Postscript file */ + scatter_gnu_term /* Interactive gnuplot format */+ } scatter_OutputType;+++#define scatter_MAXDIM 64+++extern long scatter_N; /* Number of points generated */+extern long scatter_Nkept; /* Number of points kept for plot */+extern int scatter_t; /* Dimension of points */+extern lebool scatter_Over; /* = TRUE: overlapping points */+extern int scatter_x;+extern int scatter_y; /* The 2 coordinates to plot */+extern double scatter_L [scatter_MAXDIM + 1];+extern double scatter_H [scatter_MAXDIM + 1];+ /* Lower and upper bounds for coordinates+ of points to plot */++extern lebool scatter_Lacunary; /* = TRUE: lacunary case */+extern long scatter_LacI [scatter_MAXDIM + 1]; /* Lacunary indices */+extern double scatter_Width;+extern double scatter_Height; /* Physical dimensions (in cm) of plot */+extern scatter_OutputType scatter_Output; /* Kind of output */+++void scatter_PlotUnif (unif01_Gen *gen, char *F);++++void scatter_PlotUnif1 (unif01_Gen *gen, long N, int t, lebool Over,+ int Proj[2], double Lower[], double Upper[], scatter_OutputType Output,+ int Prec, lebool Lac, long LacI[], char *Name);++++void scatter_PlotUnifInterac (unif01_Gen *gen);++ +#endif+ +
+ cbits/testu/include/scomp.h view
@@ -0,0 +1,36 @@+ +/* scomp.h for ANSI C */+#ifndef SCOMP_H+#define SCOMP_H+ +#include "unif01.h"+#include "sres.h"++typedef struct {++ sres_Basic *JumpNum;+ sres_Chi2 *JumpSize;+ sres_Chi2 *LinComp;++} scomp_Res;++++scomp_Res * scomp_CreateRes (void);++++void scomp_DeleteRes (scomp_Res *res);++void scomp_LinearComp (unif01_Gen *gen, scomp_Res *res,+ long N, long n, int r, int s);++++void scomp_LempelZiv (unif01_Gen *gen, sres_Basic *res,+ long N, int k, int r, int s);++ +#endif+ +
+ cbits/testu/include/sentrop.h view
@@ -0,0 +1,61 @@+ +/* sentrop.h for ANSI C */+#ifndef SENTROP_H+#define SENTROP_H+ +#include "statcoll.h"+#include "gofw.h"+#include "unif01.h"+#include "sres.h"+++typedef struct {++ long *Count;+++ long jmin;+ long jmax;+++ sres_Basic *Bas;+++} sentrop_Res;++++sentrop_Res * sentrop_CreateRes (void);++++void sentrop_DeleteRes (sentrop_Res *res);+++void sentrop_EntropyDisc (unif01_Gen *gen, sentrop_Res *res,+ long N, long n, int r, int s, int L);++++void sentrop_EntropyDiscOver (unif01_Gen *gen, sentrop_Res *res,+ long N, long n, int r, int s, int L);++++void sentrop_EntropyDiscOver2 (unif01_Gen *gen, sentrop_Res *res,+ long N, long n, int r, int s, int L);++++void sentrop_EntropyDM (unif01_Gen *gen, sres_Basic *res,+ long N, long n, int r, long m);++++void sentrop_EntropyDMCirc (unif01_Gen *gen, sres_Basic *res,+ long N, long n, int r, long m);++ +#endif+ +
+ cbits/testu/include/sknuth.h view
@@ -0,0 +1,98 @@+ +/* sknuth.h for ANSI C */+#ifndef SKNUTH_H+#define SKNUTH_H+ +#include "gdef.h"+#include "unif01.h"+#include "sres.h"+++typedef struct {++ sres_Chi2 *Chi;+ sres_Basic *Bas;++} sknuth_Res1;++++sknuth_Res1 * sknuth_CreateRes1 (void);++++void sknuth_DeleteRes1 (sknuth_Res1 *res);++typedef struct {++ sres_Poisson *Pois;+ sres_Basic *Bas;++} sknuth_Res2;++++sknuth_Res2 * sknuth_CreateRes2 (void);++++void sknuth_DeleteRes2 (sknuth_Res2 *res);+++void sknuth_Serial (unif01_Gen *gen, sres_Chi2 *res,+ long N, long n, int r, long d, int t);++++void sknuth_SerialSparse (unif01_Gen *gen, sres_Chi2 *res,+ long N, long n, int r, long d, int t);++++void sknuth_Permutation (unif01_Gen *gen, sres_Chi2 *res,+ long N, long n, int r, int t);++++void sknuth_Gap (unif01_Gen *gen, sres_Chi2 *res,+ long N, long n, int r, double Alpha, double Beta);++++void sknuth_SimpPoker (unif01_Gen *gen, sres_Chi2 *res,+ long N, long n, int r, int d, int k);++++void sknuth_CouponCollector (unif01_Gen *gen, sres_Chi2 *res,+ long N, long n, int r, int d);++++void sknuth_Run (unif01_Gen *gen, sres_Chi2 *res,+ long N, long n, int r, lebool Up);++++void sknuth_RunIndep (unif01_Gen *gen, sres_Chi2 *res,+ long N, long n, int r, lebool Up);++++void sknuth_MaxOft (unif01_Gen *gen, sknuth_Res1 *res,+ long N, long n, int r, int d, int t);++++void sknuth_Collision (unif01_Gen *gen, sknuth_Res2 *res,+ long N, long n, int r, long d, int t);++++void sknuth_CollisionPermut (unif01_Gen *gen, sknuth_Res2 *res,+ long N, long n, int r, int t);++ +#endif+ +
+ cbits/testu/include/smarsa.h view
@@ -0,0 +1,88 @@+ +/* smarsa.h for ANSI C */+#ifndef SMARSA_H+#define SMARSA_H+ +#include "unif01.h"+#include "sres.h"+++extern double smarsa_Maxk;+++typedef struct {+ sres_Basic *Bas;+ sres_Poisson *Pois;+} smarsa_Res;++++smarsa_Res * smarsa_CreateRes (void);++++void smarsa_DeleteRes (smarsa_Res *res);+++typedef struct {+ sres_Chi2 *GCD;+ sres_Chi2 *NumIter;+} smarsa_Res2;++++smarsa_Res2 * smarsa_CreateRes2 (void);++++void smarsa_DeleteRes2 (smarsa_Res2 *res);++++void smarsa_SerialOver (unif01_Gen *gen, sres_Basic *res,+ long N, long n, int r, long d, int t);++++void smarsa_CollisionOver (unif01_Gen *gen, smarsa_Res *res,+ long N, long n, int r, long d, int t);++++void smarsa_Opso (unif01_Gen *gen, smarsa_Res *res,+ long N, int r, int p);++++void smarsa_CAT (unif01_Gen *gen, sres_Poisson *res,+ long N, long n, int r, long d, int t, long S[]);++++void smarsa_CATBits (unif01_Gen *gen, sres_Poisson *res, long N, long n,+ int r, int s, int L, unsigned long Key);++++void smarsa_BirthdaySpacings (unif01_Gen *gen, sres_Poisson *res,+ long N, long n, int r, long d, int t, int p);++++void smarsa_MatrixRank (unif01_Gen *gen, sres_Chi2 *res,+ long N, long n, int r, int s, int L, int k);++++void smarsa_Savir2 (unif01_Gen *gen, sres_Chi2 *res,+ long N, long n, int r, long m, int t);++++void smarsa_GCD (unif01_Gen *gen, smarsa_Res2 *res,+ long N, long n, int r, int s);++ +#endif+ +
+ cbits/testu/include/smultin.h view
@@ -0,0 +1,279 @@+ +/* smultin.h for ANSI C */+#ifndef SMULTIN_H+#define SMULTIN_H+ +#include "gdef.h"+#include "fmass.h"+#include "statcoll.h"+#include "gofw.h"+#include "unif01.h"+++#define smultin_MAX_DELTA 8++++#define smultin_MAXB 10+++typedef struct {++ double Maxk;+++ double SeuilHash;+++ double HashLoad;+++ double SeuilEColl;+++ double SeuilCOverDense;+ double SeuilCOverNorSup;+ double SeuilCOverNorInf;+ double SeuilCOverSparse;+++} smultin_Envir;+++extern smultin_Envir smultin_env;+++#ifdef USE_LONGLONG+ typedef ulonglong smultin_CellType;+#else+ typedef double smultin_CellType;+#endif++++typedef smultin_CellType (*smultin_GenerCellType) (unif01_Gen *, int, int,+ long);++++smultin_CellType smultin_GenerCellSerial (unif01_Gen *gen, int r, int t,+ long d);++++smultin_CellType smultin_GenerCellSerial2 (unif01_Gen *gen, int r, int t,+ long d);++++smultin_CellType smultin_GenerCellPermut (unif01_Gen *gen, int r, int t,+ long junk);++++smultin_CellType smultin_GenerCellMax (unif01_Gen *gen, int r, int t,+ long junk);++++smultin_CellType smultin_GenerCellSerialBits (unif01_Gen *gen, int r, int s,+ long L);++++typedef struct {++ int NbDelta;+ double ValDelta [smultin_MAX_DELTA];+++ smultin_GenerCellType GenerCell;+++ int bmax;+++} smultin_Param;+++smultin_Param * smultin_CreateParam (int NbDelta, double ValDelta[],+ smultin_GenerCellType GenerCell,+ int bmax);++++void smultin_DeleteParam (smultin_Param *par);+++extern smultin_Param smultin_ParamDefault;+++typedef enum {+ smultin_CollNotInit, /* Not initialized */+ smultin_CollExact, /* Exact distribution */+ smultin_CollNormal, /* Normal approximation */+ smultin_CollPoissonSparse, /* Poisson approximation: sparse case */+ smultin_CollPoissonDense /* Poisson approximation: dense case */+} smultin_CollApproxType;++++typedef struct {++ lebool Hashing;+++ smultin_CellType NbCellsTotal;+++ lebool Over;+++ smultin_CollApproxType CollApprox;+++ double Mu [smultin_MAX_DELTA];+ double Sigma [smultin_MAX_DELTA];+++ double EsEmpty;+++ long CountSize;+ long Count1Size;+ long *Count;+ long *Count1;+ smultin_CellType *Cell;+ smultin_CellType *Cell1;+++ long NbSize;+ long Nb1Size;+ smultin_CellType *Nb;+ smultin_CellType *Nb1;+++ smultin_CellType NbCells [smultin_MAXB + 1];+ double EsCells [smultin_MAXB + 1];+ smultin_CellType WbCells [smultin_MAXB + 1];+++ double NbCollisions;+++ statcoll_Collector *Collector [smultin_MAX_DELTA];+++ gofw_TestArray sVal2 [smultin_MAX_DELTA];+ gofw_TestArray pVal2 [smultin_MAX_DELTA];+++ double pCollLeft, pCollRight;+++ double pColl;+++ double pEmpty;+++ double pWb [smultin_MAXB + 1];+++ int NbDeltaOld;+++ double *TabFj[smultin_MAX_DELTA];+++ int nLimit;+++ lebool flagTab;+++} smultin_Res;+++smultin_Res * smultin_CreateRes (smultin_Param *par);++++void smultin_DeleteRes (smultin_Res *res);+++typedef double (*smultin_MNTermeType) (double, double, long);++++double smultin_MNTermeColl (double, double, long j);++++double smultin_MNTermePowDiv (double Delta, double E, long j);+++double smultin_MNTermeKhi2 (double, double E, long j);++++double smultin_MNTermeLogLikhood (double, double E, long j);++++void smultin_MultinomMuSigma (long n, double k, double theta1,+ double theta2, smultin_MNTermeType F,+ double *Mu, double *Sigma);+++void smultin_PowDivMomCorChi (double Delta, long n, double k,+ double *MuC, double *SigmaC);++++void smultin_PowDivMom (double Delta, long n, double k,+ double NbExp, double *Mu, double *Sigma);++++fmass_INFO smultin_CreateCollisions (long n, smultin_CellType k);++++void smultin_DeleteCollisions (fmass_INFO W);++++double smultin_FDistCollisions (fmass_INFO W, long c);++++double smultin_FBarCollisions (fmass_INFO W, long c);++++double smultin_CollisionsTerm (fmass_INFO W, long c);+++void smultin_Multinomial (unif01_Gen *gen, smultin_Param *par,+ smultin_Res *res, long N, long n, int r, long d, int t, lebool Sparse);++++void smultin_MultinomialOver (unif01_Gen *gen, smultin_Param *par,+ smultin_Res *res, long N, long n, int r, long d, int t, lebool Sparse);++++void smultin_MultinomialBits (unif01_Gen *gen, smultin_Param *par,+ smultin_Res *res, long N, long n, int r, int s, int L, lebool Sparse);++++void smultin_MultinomialBitsOver (unif01_Gen *gen, smultin_Param *par,+ smultin_Res *res, long N, long n, int r, int s, int L, lebool Sparse);++ +#endif+ +
+ cbits/testu/include/snpair.h view
@@ -0,0 +1,225 @@+ +/* snpair.h for ANSI C */+#ifndef SNPAIR_H+#define SNPAIR_H+ +#include "gdef.h"+#include "chrono.h"+#include "statcoll.h"+#include "unif01.h"++++#define snpair_MAXM 512++++#define snpair_MAXREC 12+++typedef struct {++ int Seuil1; /* Recursion threshold for snpair_FindClosePairs */+ int Seuil2; /* Recursion threshold for snpair_CheckBoundary */+ int Seuil3; /* L1 = 1 + (lg (n/Seuil3)) / sqrt(t) */+ int Seuil4; /* L2 = 1 + (lg (n/Seuil4)) / sqrt(t) */+++} snpair_Envir;+++extern snpair_Envir snpair_env;++++extern long snpair_MaxNumPoints;+++typedef double * snpair_PointType;++++typedef snpair_PointType * snpair_PointTableType;++++typedef struct snpair_Res snpair_Res;++typedef void (*snpair_DistanceType) (snpair_Res *res, snpair_PointType,+ snpair_PointType);++++typedef void (*snpair_VerifPairsType) (snpair_Res *res, snpair_PointType [],+ long, long, int, int);++++typedef void (*snpair_MiniProcType) (snpair_Res *res, snpair_PointType [],+ long, long, long, long, int, int);++++enum snpair_StatType {+ snpair_NP,+ snpair_NPS,+ snpair_NPPR,+ snpair_mNP,+ snpair_mNP1,+ snpair_mNP1S,+ snpair_mNP2,+ snpair_mNP2S,+ snpair_NJumps,+ snpair_BB,+ snpair_BM,+ snpair_StatType_N+};+++++struct snpair_Res {++ long n;++ lebool CleanFlag; /* If TRUE, free all memory */+ void *work;+++ snpair_PointTableType Points[1 + snpair_MAXREC];+++ int NumClose;+++ double * CloseDist;+++ snpair_DistanceType Distance;+ snpair_VerifPairsType VerifPairs;+ snpair_MiniProcType MiniProc;+++ statcoll_Collector * Yn;+ statcoll_Collector * Y;+ statcoll_Collector * U;+ statcoll_Collector * V;+ statcoll_Collector * S;+ statcoll_Collector * TheWn;+ statcoll_Collector * TheWni;+ statcoll_Collector * ThepValAD;+ statcoll_Collector * BitMax;+++ double sVal [snpair_StatType_N];+ double pVal [snpair_StatType_N];+++};++++snpair_Res * snpair_CreateRes (void);++++void snpair_DeleteRes (snpair_Res *res);+++void snpair_QuickSort (snpair_PointType A[], long l, long r, int c);++++void snpair_VerifPairs0 (snpair_Res *res, snpair_PointType A[], long r, long s,+ int np, int c);++++void snpair_VerifPairs1 (snpair_Res *res, snpair_PointType A[], long r, long s,+ int np, int c);++++void snpair_MiniProc0 (snpair_Res *res, snpair_PointType A[], long r, long s,+ long u, long v, int np, int c);++++void snpair_MiniProc1 (snpair_Res *res, snpair_PointType A[], long r, long s,+ long u, long v, int np, int c);++++void snpair_CheckBoundary (snpair_Res *res, long r, long s, long u, long v,+ int nr, int nrb, int np, int c);++++void snpair_FindClosePairs (snpair_Res *res, long r, long s, int nr,+ int np, int c);+++void snpair_DistanceCP (snpair_Res *res, snpair_PointType, snpair_PointType);++++void snpair_WriteDataCP (unif01_Gen *gen, char *TestName, long N, long n,+ int r, int t, int p, int m, lebool Torus);++++void snpair_WriteResultsCP (unif01_Gen *gen, chrono_Chrono *Timer,+ snpair_Res *res, long N, long m);++++extern lebool snpair_mNP2S_Flag;++++void snpair_ClosePairs (unif01_Gen *gen, snpair_Res *res,+ long N, long n, int r, int t, int p, int m);++++void snpair_ClosePairs1 (unif01_Gen *gen, snpair_Res *res,+ long N, long n, int r, int t, int p, int m);+++void snpair_ReTestY (long N, long n, int m, double t0, double t1);+++void snpair_DistanceCPBitM (snpair_Res *res, snpair_PointType,+ snpair_PointType);+++++void snpair_ClosePairsBitMatch (unif01_Gen *gen, snpair_Res *res,+ long N, long n, int r, int t);+++extern lebool snpair_TimeBB;++++void snpair_DistanceBB (snpair_Res *res, snpair_PointType, snpair_PointType);+++++void snpair_WriteDataBB (unif01_Gen *gen, char *TestName, long N, long n,+ int r, int t, int p, lebool Tor, int L1, int L2);++++void snpair_WriteResultsBB (unif01_Gen *gen, chrono_Chrono *Timer,+ snpair_Res *res, long N);++++void snpair_BickelBreiman (unif01_Gen *gen, snpair_Res *res, long N,+ long n, int r, int t, int p, lebool Torus);++#endif+
+ cbits/testu/include/sres.h view
@@ -0,0 +1,143 @@+ +/* sres.h for ANSI C */+#ifndef SRES_H+#define SRES_H+ +#include "gofw.h"+#include "statcoll.h"+++typedef struct {++ statcoll_Collector *sVal1, *pVal1;+++ gofw_TestArray sVal2, pVal2;+++ char *name;+++} sres_Basic;++++sres_Basic * sres_CreateBasic (void);++++void sres_DeleteBasic (sres_Basic *res);++++void sres_InitBasic (sres_Basic *res, long N, char *nam);++++void sres_GetNormalSumStat (sres_Basic *res);+++typedef struct {++ statcoll_Collector *sVal1;+++ double sVal2;+++ double pLeft, pRight, pVal2;+++ char *name;+++} sres_Disc;++++sres_Disc * sres_CreateDisc (void);++++void sres_DeleteDisc (sres_Disc *res);++++void sres_InitDisc (sres_Disc *res, long N, char *nam);+++typedef struct {++ double *NbExp;+ long *Count;+ long *Loc;+ long jmin;+ long jmax;+++ long degFree;+++ statcoll_Collector *sVal1, *pVal1;+++ gofw_TestArray sVal2, pVal2;+++ char *name;+++} sres_Chi2;++++sres_Chi2 * sres_CreateChi2 (void);++++void sres_DeleteChi2 (sres_Chi2 *res);++++void sres_InitChi2 (sres_Chi2 *res, long N, long jmax, char *nam);++++void sres_GetChi2SumStat (sres_Chi2 *res);+++typedef struct {++ double Lambda, Mu;+++ statcoll_Collector *sVal1;+++ double sVal2;+++ double pLeft, pRight, pVal2;+++ char *name;+++} sres_Poisson;++++sres_Poisson * sres_CreatePoisson (void);++++void sres_DeletePoisson (sres_Poisson *res);++++void sres_InitPoisson (sres_Poisson *res, long N, double Lambda, char *nam);++ +#endif+ +
+ cbits/testu/include/sspacings.h view
@@ -0,0 +1,73 @@+ +/* sspacings.h for ANSI C */+#ifndef SSPACINGS_H+#define SSPACINGS_H+ +#include "unif01.h"+#include "sres.h"+++typedef struct {++ sres_Basic **LogCEMu;+ sres_Basic **LogCAMu;+ sres_Basic **SquareCEMu;+ sres_Basic **SquareCAMu;+++ double *LogCESig_sVal, *LogCESig_pVal;+ double *LogCASig_sVal, *LogCASig_pVal;+ double *SquareCESig_sVal, *SquareCESig_pVal;+ double *SquareCASig_sVal, *SquareCASig_pVal;+++ int imax;+++ char *name;+++ statcoll_Collector ** Collectors;+ int smax, step;+++} sspacings_Res;++++sspacings_Res * sspacings_CreateRes (void);++++void sspacings_DeleteRes (sspacings_Res *res);+++void sspacings_SumLogsSpacings (unif01_Gen *gen, sspacings_Res *res,+ long N, long n, int r, int m);++++void sspacings_SumSquaresSpacings (unif01_Gen *gen, sspacings_Res *res,+ long N, long n, int r, int m);++++void sspacings_ScanSpacings (unif01_Gen *gen, sspacings_Res *res,+ long N, long n, int r, double d);++++void sspacings_AllSpacings (unif01_Gen *gen, sspacings_Res *res,+ long N, long n, int r, int m0, int m1, int d,+ int LgEps);++++void sspacings_AllSpacings2 (unif01_Gen *gen, sspacings_Res *res,+ long N, long n, int r, int m0, int m1, int d,+ int LgEps);++ +#endif+ +
+ cbits/testu/include/sspectral.h view
@@ -0,0 +1,50 @@+ +/* sspectral.h for ANSI C */+#ifndef SSPEC_H+#define SSPEC_H+ +#include "statcoll.h"+#include "gofw.h"+#include "unif01.h"+#include "sres.h"++typedef struct {++ sres_Basic *Bas;+++ double *Coef;+++ long jmin, jmax;+++} sspectral_Res;++++sspectral_Res * sspectral_CreateRes (void);++++void sspectral_DeleteRes (sspectral_Res *res);+++void sspectral_Fourier1 (unif01_Gen *gen, sspectral_Res *res,+ long N, int k, int r, int s);++++void sspectral_Fourier2 (unif01_Gen *gen, sspectral_Res *res,+ long N, int k, int r, int s);++++void sspectral_Fourier3 (unif01_Gen *gen, sspectral_Res *res,+ long N, int k, int r, int s);+++ +#endif+ +
+ cbits/testu/include/sstring.h view
@@ -0,0 +1,141 @@+ +/* sstring.h for ANSI C */+#ifndef SSTRING_H+#define SSTRING_H+ +#include "tables.h" +#include "unif01.h"+#include "sres.h"++++#define sstring_MAXD 8++++extern lebool sstring_Counters;++++extern lebool sstring_CorrFlag;+++typedef struct {++ sres_Chi2 *Chi;+ sres_Disc *Disc;+++} sstring_Res2;++++sstring_Res2 * sstring_CreateRes2 (void);++++void sstring_DeleteRes2 (sstring_Res2 *res);++++typedef struct {++ sres_Basic *NBits;+ sres_Chi2 *NRuns;+ long *Count0;+ long *Count1;+++} sstring_Res3;++++sstring_Res3 * sstring_CreateRes3 (void);++++void sstring_DeleteRes3 (sstring_Res3 *res);++++typedef struct {++ int L;+++ tables_StyleType Style;+++ long **Counters;+++ double **ZCounters;+++ int d;+++ long XD [sstring_MAXD + 1][2];+++ sres_Basic *Block [sstring_MAXD + 1];+++ sres_Basic *Bas; +++} sstring_Res;++++sstring_Res * sstring_CreateRes (void);++++void sstring_DeleteRes (sstring_Res *res);++++void sstring_PeriodsInStrings (unif01_Gen *gen, sres_Chi2 *res, + long N, long n, int r, int s);++++void sstring_LongestHeadRun (unif01_Gen *gen, sstring_Res2 *res,+ long N, long n, int r, int s, long L);++++void sstring_HammingWeight (unif01_Gen *gen, sres_Chi2 *res,+ long N, long n, int r, int s, long L);++++void sstring_HammingWeight2 (unif01_Gen *gen, sres_Basic *res,+ long N, long n, int r, int s, long L);++++void sstring_HammingCorr (unif01_Gen *gen, sstring_Res *res,+ long N, long n, int r, int s, int L);++++void sstring_HammingIndep (unif01_Gen *gen, sstring_Res *res,+ long N, long n, int r, int s, int L, int d);++++void sstring_Run (unif01_Gen *gen, sstring_Res3 *res,+ long N, long n, int r, int s);++++void sstring_AutoCor (unif01_Gen *gen, sres_Basic *res,+ long N, long n, int r, int s, int d);+++ +#endif+ +
+ cbits/testu/include/statcoll.h view
@@ -0,0 +1,59 @@++ +/* statcoll.h for ANSI C */++#ifndef STATCOLL_H+#define STATCOLL_H+ +++typedef struct {+ double *V;+ long Dim;+ long NObs;+ char *Desc;+} statcoll_Collector;+++statcoll_Collector * statcoll_Create (long N, const char Desc[]);++++statcoll_Collector * statcoll_Delete (statcoll_Collector *S);++++void statcoll_Init (statcoll_Collector *S, long N);++++void statcoll_SetDesc (statcoll_Collector *S, const char Desc[]);++++void statcoll_AddObs (statcoll_Collector *S, double x);++++void statcoll_Write (statcoll_Collector *S, int k, int p1, int p2, int p3);++++double statcoll_Average (statcoll_Collector *S);++++double statcoll_Variance (statcoll_Collector *S);++++double statcoll_AutoCovar (statcoll_Collector *S, int k);++++double statcoll_Covar (statcoll_Collector *S1, statcoll_Collector *S2);++ +#endif+ +
+ cbits/testu/include/svaria.h view
@@ -0,0 +1,54 @@+ +#ifndef SVARIA_H+#define SVARIA_H+ +#include "unif01.h"+#include "sres.h"++++extern lebool svaria_Timer;+++void svaria_SampleMean (unif01_Gen *gen, sres_Basic *res,+ long N, long n, int r);++++void svaria_SampleCorr (unif01_Gen *gen, sres_Basic *res,+ long N, long n, int r, int k);++++void svaria_SampleProd (unif01_Gen *gen, sres_Basic *res,+ long N, long n, int r, int t);++++void svaria_SumLogs (unif01_Gen *gen, sres_Chi2 *res,+ long N, long n, int r);++++void svaria_WeightDistrib (unif01_Gen *gen, sres_Chi2 *res, long N, long n,+ int r, long k, double alpha, double beta);++++void svaria_CollisionArgMax (unif01_Gen *gen, sres_Chi2 *res,+ long N, long n, int r, long k, long m);++++void svaria_SumCollector (unif01_Gen *gen, sres_Chi2 *res,+ long N, long n, int r, double g);++++void svaria_AppearanceSpacings (unif01_Gen *gen, sres_Basic *res,+ long N, long Q, long K, int r, int s, int L);++ +#endif+ +
+ cbits/testu/include/swalk.h view
@@ -0,0 +1,64 @@+ +/* swalk.h for ANSI C */+#ifndef SWALK_H+#define SWALK_H+ +#include "bitset.h"+#include "unif01.h"+#include "sres.h"+++typedef struct {++ long L0, L1, L;+++ sres_Chi2 **H;+ sres_Chi2 **M;+ sres_Chi2 **J;+ sres_Chi2 **R;+ sres_Chi2 **C;+++ long imax;+++ char *name;+++ void *work;+++} swalk_Res;++++swalk_Res * swalk_CreateRes (void);++++void swalk_DeleteRes (swalk_Res *res);+++void swalk_RandomWalk1 (unif01_Gen *gen, swalk_Res *res, long N, long n,+ int r, int s, long L0, long L1);++++void swalk_RandomWalk1a (unif01_Gen *gen, swalk_Res *res, long N, long n,+ int r, int s, int t, long L, bitset_BitSet C);++++void swalk_VarGeoP (unif01_Gen *gen, sres_Chi2 *res,+ long N, long n, int r, double Mu);++++void swalk_VarGeoN (unif01_Gen *gen, sres_Chi2 *res,+ long N, long n, int r, double Mu);++ +#endif+ +
+ cbits/testu/include/swrite.h view
@@ -0,0 +1,54 @@+ +/* swrite.h for ANSI C */+#ifndef SWRITE_H+#define SWRITE_H+ +#include "gdef.h"+#include "chrono.h"+#include "unif01.h"+#include "sres.h"+++extern lebool swrite_Basic; /* Prints basic results */+extern lebool swrite_Parameters; /* Prints details on parameters */+extern lebool swrite_Collectors; /* Prints statistical collectors */+extern lebool swrite_Classes; /* Prints classes for ChiSquare */+extern lebool swrite_Counters; /* Prints counters */++++extern lebool swrite_Host;+++extern char swrite_ExperimentName[];++++void swrite_SetExperimentName (char Name[]);++++void swrite_Head (unif01_Gen *gen, char *TestName, long N, long n, int r);++++void swrite_Final (unif01_Gen *gen, chrono_Chrono *Timer);++++void swrite_NormalSumTest (long N, sres_Basic *res);++++void swrite_AddStrChi (char S[], int len, long d);++++void swrite_Chi2SumTest (long N, sres_Chi2 *res);++++void swrite_Chi2SumTestb (long N, double sval, double pval, long deg);+ +#endif+
+ cbits/testu/include/tables.h view
@@ -0,0 +1,75 @@+ +/* tables.h for ANSI C */+#ifndef TABLES_H+#define TABLES_H+ +#include "gdef.h"+++typedef enum {+ tables_Plain,+ tables_Mathematica,+ tables_Matlab+ } tables_StyleType;+++long ** tables_CreateMatrixL (int M, int N);+unsigned long ** tables_CreateMatrixUL (int M, int N);+double ** tables_CreateMatrixD (int M, int N);++++void tables_DeleteMatrixL (long *** T);+void tables_DeleteMatrixUL (unsigned long *** T);+void tables_DeleteMatrixD (double *** T);++++void tables_CopyTabL (long T1[], long T2[], int n1, int n2);+void tables_CopyTabD (double T1[], double T2[], int n1, int n2);++++void tables_QuickSortL (long T[], int n1, int n2);+void tables_QuickSortD (double T[], int n1, int n2);++#ifdef USE_LONGLONG+ void tables_QuickSortLL (longlong T[], int n1, int n2);+ void tables_QuickSortULL (ulonglong T[], int n1, int n2);+#endif++++void tables_WriteTabL (long V[], int n1, int n2, int k, int p, char Desc[]);++#ifdef USE_LONGLONG+ void tables_WriteTabLL (longlong V[], int n1, int n2, int k, int p,+ char Desc[]);+ void tables_WriteTabULL (ulonglong V[], int n1, int n2, int k, int p,+ char Desc[]);+#endif++++void tables_WriteTabD (double V[], int n1, int n2, int k, int p1, int p2,+ int p3, char Desc[]);++++void tables_WriteMatrixD (double** Mat, int i1, int i2, int j1, int j2,+ int w, int p, tables_StyleType style,+ char Name[]);++++void tables_WriteMatrixL (long** Mat, int i1, int i2, int j1, int j2, int w,+ tables_StyleType style, char Name[]);++++long tables_HashPrime (long n, double load);+ ++#endif+ +
+ cbits/testu/include/tu01_sha1.h view
@@ -0,0 +1,20 @@++#ifndef TU01_SHA1_H+#define TU01_SHA1_H+#include "gdef.h"+++typedef struct+{+ uint32_t state[5];+ uint32_t count[2];+ unsigned char buffer[64];+} SHA1_CTX;+++void SHA1Init (SHA1_CTX * context);+void SHA1Update (SHA1_CTX * context, const unsigned char data[], uint32_t len);+void SHA1Final (unsigned char digest[20], SHA1_CTX * context);++#endif+
+ cbits/testu/include/uautomata.h view
@@ -0,0 +1,23 @@+ +/* uautomata.h for ANSI C */+#ifndef UAUTOMAT_H+#define UAUTOMAT_H+ +#include "unif01.h"++unif01_Gen * uautomata_CreateCA1 (int N, int S[ ], int r, int F[ ],+ int k, int ts, int cs, int rot);++++unif01_Gen * uautomata_CreateCA90mp (int m, int S[]);+++void uautomata_DeleteCA90mp (unif01_Gen *gen);++++void uautomata_DeleteGen (unif01_Gen *gen);+ +#endif+
+ cbits/testu/include/ubrent.h view
@@ -0,0 +1,54 @@+ +/* ubrent.h for ANSI C */+#ifndef UBRENT_H+#define UBRENT_H+ +#include "gdef.h"+#include "unif01.h"+++unif01_Gen* ubrent_CreateXorgen32 (int r, int s, int a, int b, int c, int d,+ lebool hasWeyl, unsigned int seed);+++unif01_Gen* ubrent_CreateXor4096s (unsigned int seed);++++#ifdef USE_LONGLONG++unif01_Gen* ubrent_CreateXorgen64 (int r, int s, int a, int b, int c, int d,+ lebool hasWeyl, ulonglong seed);++++unif01_Gen* ubrent_CreateXor4096l (ulonglong seed);++++unif01_Gen* ubrent_CreateXor4096d (ulonglong seed);+++#endif+++unif01_Gen* ubrent_CreateXor4096i (unsigned long seed);++++unif01_Gen* ubrent_CreateXor4096r (unsigned long seed);+++void ubrent_DeleteXorgen32 (unif01_Gen *);+void ubrent_DeleteXor4096s (unif01_Gen *);+void ubrent_DeleteXor4096i (unif01_Gen *);+void ubrent_DeleteXor4096r (unif01_Gen *);++#ifdef USE_LONGLONG+ void ubrent_DeleteXorgen64 (unif01_Gen *);+ void ubrent_DeleteXor4096l (unif01_Gen *);+ void ubrent_DeleteXor4096d (unif01_Gen *);+#endif+ +#endif+
+ cbits/testu/include/ucarry.h view
@@ -0,0 +1,86 @@++ +/* ucarry.h for ANSI C */++#ifndef UCARRY_H+#define UCARRY_H+ +#include "gdef.h"+#include "unif01.h"+++unif01_Gen * ucarry_CreateAWC (unsigned int r, unsigned int s,+ unsigned long c, unsigned long m,+ unsigned long S[]);++++unif01_Gen * ucarry_CreateSWB (unsigned int r, unsigned int s,+ unsigned long c, unsigned long m,+ unsigned long S[]);++++unif01_Gen * ucarry_CreateRanlux (unsigned int L, long s);++++#ifdef USE_LONGLONG+ unif01_Gen * ucarry_CreateMWC (unsigned int r, unsigned long c,+ unsigned int w, unsigned long A[],+ unsigned long S[]);+#endif++++unif01_Gen * ucarry_CreateMWCFloat (unsigned int r, unsigned long c,+ unsigned int w, unsigned long A[],+ unsigned long S[]);++++#ifdef USE_LONGLONG+ unif01_Gen * ucarry_CreateMWCfix8r4 (unsigned long c, unsigned long S[]);+#endif++++#ifdef USE_LONGLONG+ unif01_Gen * ucarry_CreateMWCfix8r8 (unsigned long c, unsigned long S[]);+#endif++++unif01_Gen * ucarry_CreateMWCfixCouture (unsigned int c,+ unsigned int S[]);++++unif01_Gen * ucarry_CreateSWC (unsigned int r, unsigned int h,+ unsigned int c, unsigned int w,+ unsigned int A[], unsigned int S[]);++++unif01_Gen * ucarry_CreateMWC1616 (unsigned int a, unsigned int b,+ unsigned int x, unsigned int y);++++void ucarry_DeleteAWC (unif01_Gen *gen);+void ucarry_DeleteSWB (unif01_Gen *gen);+void ucarry_DeleteRanlux (unif01_Gen *gen);+void ucarry_DeleteMWC (unif01_Gen *gen);+void ucarry_DeleteMWCFloat (unif01_Gen *gen);+void ucarry_DeleteMWCfixCouture (unif01_Gen *gen);+void ucarry_DeleteSWC (unif01_Gen *gen);++++void ucarry_DeleteGen (unif01_Gen *gen);+++ +#endif+ +
+ cbits/testu/include/ucrypto.h view
@@ -0,0 +1,36 @@+ +/* ucrypto.h for ANSI C */+#ifndef UCRYPTO_H+#define UCRYPTO_H+ +#include "unif01.h"+++typedef enum {+ ucrypto_OFB, /* Output Feedback mode */+ ucrypto_CTR, /* Counter mode */+ ucrypto_KTR /* Key counter mode */+ } ucrypto_Mode;++++unif01_Gen * ucrypto_CreateAES (unsigned char *Key, int klen,+ unsigned char *Seed, ucrypto_Mode mode,+ int r, int s);++++unif01_Gen * ucrypto_CreateSHA1 (unsigned char *Seed, int len,+ ucrypto_Mode mode, int r, int s);++++unif01_Gen * ucrypto_CreateISAAC (int flag, unsigned int A[256]);+++void ucrypto_DeleteAES (unif01_Gen * gen);+void ucrypto_DeleteSHA1 (unif01_Gen * gen);+void ucrypto_DeleteISAAC (unif01_Gen * gen);+ +#endif+
+ cbits/testu/include/ucubic.h view
@@ -0,0 +1,45 @@++ +/* ucubic.h for ANSI C */+#ifndef UCUBIC_H+#define UCUBIC_H+ +#include "unif01.h"+++unif01_Gen * ucubic_CreateCubic (long m, long a, long b, long c, long d,+ long s);++++unif01_Gen * ucubic_CreateCubicFloat (long m, long a, long b, long c,+ long d, long s);++++unif01_Gen * ucubic_CreateCubic1 (long m, long a, long s);++++unif01_Gen * ucubic_CreateCubic1Float (long m, long a, long s);++++unif01_Gen * ucubic_CreateCombCubic2 (long m1, long m2, long a1, long a2, + long s1, long s2);++++unif01_Gen * ucubic_CreateCubicOut (long m, long a, long c, long s);++++unif01_Gen * ucubic_CreateCubicOutFloat (long m, long a, long c, long s);+++void ucubic_DeleteGen (unif01_Gen *gen);++ +#endif+ +
+ cbits/testu/include/udeng.h view
@@ -0,0 +1,26 @@+ +/* udeng.h for ANSI C */++#ifndef UDENG_H+#define UDENG_H+ +#include "unif01.h"++++unif01_Gen * udeng_CreateDL00a (unsigned long m, unsigned long b, int k,+ unsigned long S[]);++++unif01_Gen * udeng_CreateDX02a (unsigned long m, unsigned long b, int k,+ unsigned long S[]);++++void udeng_DeleteGen (unif01_Gen * gen);++ +#endif+ +
+ cbits/testu/include/ufile.h view
@@ -0,0 +1,36 @@+ +/* ufile.h for ANSI C */+#ifndef UFILE_H+#define UFILE_H+ +#include "unif01.h"+++unif01_Gen * ufile_CreateReadText (char *fname, long nbuf);++++void ufile_InitReadText (void);++++unif01_Gen * ufile_CreateReadBin (char *fname, long nbuf);++++void ufile_InitReadBin (void);+++void ufile_DeleteReadText (unif01_Gen *);++++void ufile_DeleteReadBin (unif01_Gen *);+++void ufile_Gen2Bin (unif01_Gen *gen, char *fname, double n, int r, int s);++ +#endif+ +
+ cbits/testu/include/ugfsr.h view
@@ -0,0 +1,104 @@++ +/* ugfsr.h for ANSI C */++#ifndef UGFSR_H+#define UGFSR_H+ +#include "unif01.h"+++unif01_Gen * ugfsr_CreateGFSR3 (unsigned int k, unsigned int r,+ unsigned int l, unsigned long S[]);++++unif01_Gen * ugfsr_CreateToot73 (unsigned long S[]);++++unif01_Gen * ugfsr_CreateKirk81 (long s);++++unif01_Gen * ugfsr_CreateRipley90 (long s);++++unif01_Gen * ugfsr_CreateFushimi (int k, int r, int s);++++unif01_Gen * ugfsr_CreateFushimi90 (int s);++++unif01_Gen * ugfsr_CreateGFSR5 (unsigned int k, unsigned int r1,+ unsigned int r2, unsigned int r3,+ unsigned int l, unsigned long S[]);++++unif01_Gen * ugfsr_CreateZiff98 (unsigned long S[]);+++unif01_Gen * ugfsr_CreateTGFSR (unsigned int k, unsigned int r,+ unsigned int l, unsigned long Av,+ unsigned long S[]);++++unif01_Gen * ugfsr_CreateT800 (unsigned long S[]);++++unif01_Gen * ugfsr_CreateTGFSR2 (unsigned int k, unsigned int r,+ unsigned int l, unsigned int s,+ unsigned int t, unsigned long Av, + unsigned long Bv, unsigned long Cv, + unsigned long S[]);++++unif01_Gen * ugfsr_CreateTT400 (unsigned long S[]);++++unif01_Gen * ugfsr_CreateTT403 (unsigned long S[]);++++unif01_Gen * ugfsr_CreateTT775 (unsigned long S[]);++++unif01_Gen * ugfsr_CreateTT800 (unsigned long S[]);++++unif01_Gen * ugfsr_CreateTT800M94 (unsigned long S[]);++++unif01_Gen * ugfsr_CreateTT800M96 (unsigned long S[]);++++unif01_Gen * ugfsr_CreateMT19937_98 (unsigned long seed);++++unif01_Gen * ugfsr_CreateMT19937_02 (unsigned long seed,+ unsigned long Key[], int len);+++void ugfsr_DeleteGFSR5 (unif01_Gen * gen);++++void ugfsr_DeleteGen (unif01_Gen *gen);++ +#endif+ +
+ cbits/testu/include/ugranger.h view
@@ -0,0 +1,76 @@+ +#ifndef UGRANGER_H+#define UGRANGER_H+/* ugranger.h for ANSI C */+ +#include "gdef.h"+#include "unif01.h"+++unif01_Gen * ugranger_CreateCombLCGInvExpl (+ long m1, long a1, long c1, long s1, long m2, long a2, long c2);++++#ifdef USE_GMP+ unif01_Gen * ugranger_CreateCombBigLCGInvExpl (+ char *m1, char *a1, char *c1, char *s1, long m2, long a2, long c2);++#endif+++unif01_Gen * ugranger_CreateCombLCGCub (+ long m1, long a1, long c1, long s1, long m2, long a2, long s2);++++#ifdef USE_GMP+ unif01_Gen * ugranger_CreateCombBigLCGCub (+ char *m1, char *a1, char *c1, char *s1, long m2, long a2, long c2);+++ + unif01_Gen * ugranger_CreateCombTausBigLCG (+ unsigned int k1, unsigned int q1, unsigned int s1, unsigned int SS1,+ unsigned int k2, unsigned int q2, unsigned int s2, unsigned int SS2,+ char *m, char *a, char *c, char *SS3);++#endif+++unif01_Gen * ugranger_CreateCombTausLCG21xor (+ unsigned int k1, unsigned int q1, unsigned int s1, unsigned int SS1,+ unsigned int k2, unsigned int q2, unsigned int s2, unsigned int SS2,+ long m, long a, long c, long SS3);+ +++unif01_Gen * ugranger_CreateCombTausCub21xor (+ unsigned int k1, unsigned int q1, unsigned int s1, unsigned int SS1,+ unsigned int k2, unsigned int q2, unsigned int s2, unsigned int SS2,+ long m, long a, long SS3);++++unif01_Gen * ugranger_CreateCombTausInvExpl21xor (+ unsigned int k1, unsigned int q1, unsigned int s1, unsigned int SS1,+ unsigned int k2, unsigned int q2, unsigned int s2, unsigned int SS2,+ long m, long a, long c);+++void ugranger_DeleteCombLCGInvExpl (unif01_Gen *gen);+void ugranger_DeleteCombLCGCub (unif01_Gen *gen);+void ugranger_DeleteCombTausLCG21xor (unif01_Gen *gen);+void ugranger_DeleteCombTausCub21xor (unif01_Gen *gen);+void ugranger_DeleteCombTausInvExpl21xor (unif01_Gen *gen);++#ifdef USE_GMP+ void ugranger_DeleteCombBigLCGInvExpl (unif01_Gen *gen);+ void ugranger_DeleteCombBigLCGCub (unif01_Gen *gen);+ void ugranger_DeleteCombTausBigLCG (unif01_Gen *gen);+#endif++ +#endif+ +
+ cbits/testu/include/uinv.h view
@@ -0,0 +1,56 @@++ +/* uinv.h for ANSI C */+#ifndef UINV_H+#define UINV_H+ +#include "unif01.h"+++unif01_Gen * uinv_CreateInvImpl (long m, long a1, long a2, long z0);++++unif01_Gen * uinv_CreateInvImpl2a (int e, unsigned long a1,+ unsigned long a2, unsigned long z0);++++unif01_Gen * uinv_CreateInvImpl2b (int e, unsigned long a1,+ unsigned long a2, unsigned long z0);++++unif01_Gen * uinv_CreateInvExpl (long m, long a, long c);++++unif01_Gen * uinv_CreateInvExpl2a (int e, long a, long c);++++unif01_Gen * uinv_CreateInvExpl2b (int e, long a, long c);++++unif01_Gen * uinv_CreateInvMRG (long m, int k, long A[], long S[]);++++unif01_Gen * uinv_CreateInvMRGFloat (long m, int k, long A[], long S[]);+++void uinv_DeleteInvMRG (unif01_Gen * gen);++++void uinv_DeleteInvMRGFloat (unif01_Gen * gen);++++void uinv_DeleteGen (unif01_Gen * gen);++ +#endif+ +
+ cbits/testu/include/uknuth.h view
@@ -0,0 +1,35 @@++ +/* uknuth.h for ANSI C */++#ifndef UKNUTH_H+#define UKNUTH_H+ +#include "unif01.h"+++unif01_Gen * uknuth_CreateRan_array1 (long s, long A[100]);++++unif01_Gen * uknuth_CreateRan_array2 (long s, long A[100]);++++unif01_Gen * uknuth_CreateRanf_array1 (long s, double B[100]);++++unif01_Gen * uknuth_CreateRanf_array2 (long s, double B[100]);+++void uknuth_DeleteRan_array1 (unif01_Gen *gen);+void uknuth_DeleteRan_array2 (unif01_Gen *gen);+void uknuth_DeleteRanf_array1 (unif01_Gen *gen);+void uknuth_DeleteRanf_array2 (unif01_Gen *gen);+++ +#endif+ +
+ cbits/testu/include/ulcg.h view
@@ -0,0 +1,117 @@++ +/* ulcg.h for ANSI C */++#ifndef ULCG_H+#define ULCG_H+ +#include "gdef.h"+#include "unif01.h"+++unif01_Gen * ulcg_CreateLCG (long m, long a, long c, long s);++++unif01_Gen * ulcg_CreateLCGFloat (long m, long a, long c, long s);++++#ifdef USE_GMP+ unif01_Gen * ulcg_CreateBigLCG (char *m, char *a, char *c, char *s);++#endif+++unif01_Gen * ulcg_CreateLCGWu2 (long m, char o1, unsigned int q, char o2, + unsigned int r, long s);++++unif01_Gen * ulcg_CreateLCGPayne (long a, long c, long s);++++unif01_Gen * ulcg_CreateLCG2e31m1HD (long a, long s);++++unif01_Gen * ulcg_CreateLCG2e31 (long a, long c, long s);++++unif01_Gen * ulcg_CreateLCG2e32 (unsigned long a, unsigned long c,+ unsigned long s);++++unif01_Gen * ulcg_CreatePow2LCG (int e, long a, long c, long s);++++#ifdef USE_LONGLONG+unif01_Gen * ulcg_CreateLCG2e48L (ulonglong a, ulonglong c, ulonglong s);++++unif01_Gen * ulcg_CreatePow2LCGL (int e, ulonglong a, ulonglong c,+ ulonglong s);++#endif++++#ifdef USE_GMP+unif01_Gen * ulcg_CreateBigPow2LCG (long e, char *a, char *c, char *s);++#endif+++unif01_Gen * ulcg_CreateCombLEC2 (long m1, long m2, long a1, long a2,+ long c1, long c2, long s1, long s2);++++unif01_Gen * ulcg_CreateCombLEC2Float (long m1, long m2, long a1, long a2,+ long c1, long c2, long s1, long s2);++++unif01_Gen * ulcg_CreateCombLEC3 (long m1, long m2, long m3, long a1,+ long a2, long a3, long c1, long c2,+ long c3, long s1, long s2, long s3);++++unif01_Gen * ulcg_CreateCombWH2 (long m1, long m2, long a1, long a2,+ long c1, long c2, long s1, long s2);++++unif01_Gen * ulcg_CreateCombWH2Float (long m1, long m2, long a1, long a2,+ long c1, long c2, long s1, long s2);++++unif01_Gen * ulcg_CreateCombWH3 (long m1, long m2, long m3, long a1,+ long a2, long a3, long c1, long c2,+ long c3, long s1, long s2, long s3);++++#ifdef USE_GMP+ void ulcg_DeleteBigLCG (unif01_Gen *gen);++++ void ulcg_DeleteBigPow2LCG (unif01_Gen *gen);++#endif+++void ulcg_DeleteGen (unif01_Gen *gen);++ +#endif+ +
+ cbits/testu/include/ulec.h view
@@ -0,0 +1,140 @@++ +/* ulec.h for ANSI C */++#ifndef ULEC_H+#define ULEC_H+ +#include "gdef.h"+#include "unif01.h"+++unif01_Gen * ulec_CreateCombLec88 (long S1, long S2);++++unif01_Gen * ulec_CreateCombLec88Float (long S1, long S2);++++unif01_Gen * ulec_CreateCLCG4 (long S1, long S2, long S3, long S4);++++unif01_Gen * ulec_CreateCLCG4Float (long S1, long S2, long S3, long S4);++++unif01_Gen * ulec_CreateMRG93 (long S1, long S2, long S3, long S4, long S5);++++unif01_Gen * ulec_CreateCombMRG96 (long S11, long S12, long S13, + long S21, long S22, long S23);++++unif01_Gen * ulec_CreateCombMRG96Float (long S11, long S12, long S13,+ long S21, long S22, long S23);++++unif01_Gen * ulec_CreateCombMRG96D (long S11, long S12, long S13,+ long S21, long S22, long S23);++++unif01_Gen * ulec_CreateCombMRG96FloatD (long S11, long S12, long S13,+ long S21, long S22, long S23);++++unif01_Gen * ulec_CreateMRG32k3a (double x10, double x11, double x12,+ double x20, double x21, double x22);++++unif01_Gen * ulec_CreateMRG32k3aL (long x10, long x11, long x12,+ long x20, long x21, long x22);++++unif01_Gen * ulec_CreateMRG32k3b (double x10, double x11, double x12,+ double x20, double x21, double x22);++++unif01_Gen * ulec_CreateMRG32k5a (double x10, double x11, double x12,+ double x13, double x14, double x20,+ double x21, double x22, double x23,+ double x24);++++unif01_Gen * ulec_CreateMRG32k5b (double x10, double x11, double x12,+ double x13, double x14, double x20,+ double x21, double x22, double x23,+ double x24);++++#ifdef USE_LONGLONG+unif01_Gen * ulec_CreateMRG63k3a (longlong s10, longlong s11, longlong s12,+ longlong s20, longlong s21, longlong s22);++++unif01_Gen * ulec_CreateMRG63k3b (longlong s10, longlong s11, longlong s12,+ longlong s20, longlong s21, longlong s22);++#endif+++unif01_Gen * ulec_Createlfsr88 (unsigned int s1, unsigned int s2,+ unsigned int s3);++++unif01_Gen * ulec_Createlfsr113 (unsigned int s1, unsigned int s2,+ unsigned int s3, unsigned int s4);++++#ifdef USE_LONGLONG+unif01_Gen * ulec_Createlfsr258 (ulonglong s1, ulonglong s2, ulonglong s3,+ ulonglong s4, ulonglong s5);+#endif++++unif01_Gen * ulec_CreateCombTausLCG11 (unsigned int k, unsigned int q, + unsigned int s, unsigned S1,+ long m, long a, long c, long S2);++++unif01_Gen * ulec_CreateCombTausLCG21 (unsigned int k1, unsigned int q1,+ unsigned int s1, unsigned int Y1, + unsigned int k2, unsigned int q2,+ unsigned int s2, unsigned int Y2, + long m, long a, long c, long Y3);++++unif01_Gen * ulec_CreateMRG31k3p (long x10, long x11, long x12,+ long x20, long x21, long x22);++void ulec_DeleteCombTausLCG11 (unif01_Gen *gen);++++void ulec_DeleteCombTausLCG21 (unif01_Gen *gen);++++void ulec_DeleteGen (unif01_Gen *gen);+ + +#endif+ +
+ cbits/testu/include/umarsa.h view
@@ -0,0 +1,120 @@+ +/* umarsa.h for ANSI C */+#ifndef UMARSA_H+#define UMARSA_H+ +#include "gdef.h"+#include "unif01.h"+++unif01_Gen * umarsa_CreateMarsa90a (int y1, int y2, int y3, int z0,+ unsigned int Y0);++++unif01_Gen * umarsa_CreateRANMAR (int y1, int y2, int y3, int z0);+++#ifdef USE_LONGLONG+ unif01_Gen * umarsa_CreateMother0 (unsigned long x1, unsigned long x2,+ unsigned long x3, unsigned long x4, unsigned long c);+#endif++++unif01_Gen * umarsa_CreateCombo (unsigned int x1, unsigned int x2,+ unsigned int y1, unsigned int c);++++unif01_Gen * umarsa_CreateECG1 (unsigned int x1, unsigned int x2,+ unsigned int x3);++++unif01_Gen * umarsa_CreateECG2 (unsigned int x1, unsigned int x2,+ unsigned int x3);++++unif01_Gen * umarsa_CreateECG3 (unsigned int x1, unsigned int x2,+ unsigned int x3);++++unif01_Gen * umarsa_CreateECG4 (unsigned int x1, unsigned int x2,+ unsigned int x3);++++unif01_Gen * umarsa_CreateMWC97R (unsigned int x0, unsigned int y0);++++unif01_Gen * umarsa_CreateULTRA (unsigned int s1, unsigned int s2,+ unsigned int s3, unsigned int s4);++++unif01_Gen * umarsa_CreateSupDup73 (unsigned int x0, unsigned int y0);++++unif01_Gen * umarsa_CreateSupDup96Add (unsigned int x0, unsigned int y0,+ unsigned int c);++++unif01_Gen * umarsa_CreateSupDup96Xor (unsigned int x0, unsigned int y0,+ unsigned int c);++++#ifdef USE_LONGLONG+unif01_Gen * umarsa_CreateSupDup64Add (ulonglong x0, ulonglong y0,+ ulonglong a, ulonglong c,+ int s1, int s2, int s3);+#endif++ ++#ifdef USE_LONGLONG+unif01_Gen * umarsa_CreateSupDup64Xor (ulonglong x0, ulonglong y0,+ ulonglong a, ulonglong c,+ int s1, int s2, int s3);+#endif++++unif01_Gen * umarsa_CreateKISS93 (unsigned int x0, unsigned int y0,+ unsigned int z0);++ ++unif01_Gen * umarsa_CreateKISS96 (unsigned int x0, unsigned int y0,+ unsigned int z1, unsigned int z2);++++unif01_Gen * umarsa_CreateKISS99 (unsigned int x0, unsigned int y0,+ unsigned int z1, unsigned int z2);++++unif01_Gen * umarsa_Create4LFIB99 (unsigned int T[256]);++++unif01_Gen * umarsa_Create3SHR99 (unsigned int y0);++++unif01_Gen * umarsa_CreateSWB99 (unsigned int T[256], int b);+++void umarsa_DeleteGen (unif01_Gen *gen);++ +#endif+ +
+ cbits/testu/include/umrg.h view
@@ -0,0 +1,59 @@++ +/* umrg.h for ANSI C */+#ifndef UMRG_H+#define UMRG_H+ +#include "gdef.h"+#include "unif01.h"++unif01_Gen * umrg_CreateMRG (long m, int k, long A[], long S[]);++++unif01_Gen * umrg_CreateMRGFloat (long m, int k, long A[], long S[]);++++#ifdef USE_GMP+ unif01_Gen * umrg_CreateBigMRG (char *m, int k, char *A[], char *S[]);++#endif+++unif01_Gen * umrg_CreateLagFibFloat (int k, int r, char Op, int Lux,+ unsigned long S[]);++++unif01_Gen * umrg_CreateLagFib (int t, int k, int r, char Op, int Lux,+ unsigned long S[]);+++unif01_Gen * umrg_CreateC2MRG (long m1, long m2, int k, long A1[],+ long A2[], long S1[], long S2[]);++++#ifdef USE_GMP+ unif01_Gen * umrg_CreateBigC2MRG (char *m1, char *m2, int k, char *A1[],+ char *A2[], char *S1[], char *S2[]);++#endif+++void umrg_DeleteMRG (unif01_Gen * gen);+void umrg_DeleteMRGFloat (unif01_Gen * gen);+void umrg_DeleteLagFib (unif01_Gen * gen);+void umrg_DeleteLagFibFloat (unif01_Gen * gen);+void umrg_DeleteC2MRG (unif01_Gen * gen);++#ifdef USE_GMP+ void umrg_DeleteBigMRG (unif01_Gen * gen);+ void umrg_DeleteBigC2MRG (unif01_Gen * gen);+#endif++ +#endif+ +
+ cbits/testu/include/unif01.h view
@@ -0,0 +1,195 @@+ +/* unif01.h for ANSI C */+#ifndef UNIF01_H+#define UNIF01_H+ +#include "gdef.h"+++typedef struct {+ void *state;+ void *param;+ char *name;+ double (*GetU01) (void *param, void *state);+ unsigned long (*GetBits) (void *param, void *state);+ void (*Write) (void *state);+} unif01_Gen;+++#define unif01_MASK32 0xffffffffUL++++#define unif01_NORM32 4294967296.0+#define unif01_INV32 2.328306436538696289e-10++++extern lebool unif01_WrLongStateFlag;++++double unif01_StripD (unif01_Gen *gen, int r);++++long unif01_StripL (unif01_Gen *gen, int r, long d);++++unsigned long unif01_StripB (unif01_Gen *gen, int r, int s);++++void unif01_WriteNameGen (unif01_Gen *gen);++++void unif01_WriteState (unif01_Gen *gen);++++void unif01_WrLongStateDef (void);++++unif01_Gen * unif01_CreateDummyGen (void);++++void unif01_DeleteDummyGen (unif01_Gen *gen);++++void unif01_DeleteGen (unif01_Gen *gen); ++++unif01_Gen * unif01_CreateDoubleGen (unif01_Gen *gen, int s);++++unif01_Gen * unif01_CreateDoubleGen2 (unif01_Gen *gen, double h);++++unif01_Gen * unif01_CreateLacGen (unif01_Gen *gen, int k, long I[]);++++unif01_Gen * unif01_CreateLuxGen (unif01_Gen *gen, int k, int L);++++unif01_Gen * unif01_CreateBiasGen (unif01_Gen *gen, double a, double p);++++unif01_Gen * unif01_CreateTruncGen (unif01_Gen *gen, int s);++++unif01_Gen * unif01_CreateBitBlockGen (unif01_Gen *gen, int r, int s,+ int w);++++void unif01_DeleteDoubleGen (unif01_Gen *gen);+void unif01_DeleteLacGen (unif01_Gen *gen);+void unif01_DeleteLuxGen (unif01_Gen *gen);+void unif01_DeleteBiasGen (unif01_Gen *gen);+void unif01_DeleteTruncGen (unif01_Gen *gen);+void unif01_DeleteBitBlockGen (unif01_Gen *gen);+++typedef struct {+ unif01_Gen *gen1;+ unif01_Gen *gen2;+} unif01_Comb2_Param;++++unif01_Gen * unif01_CreateCombAdd2 (unif01_Gen *gen1, unif01_Gen *gen2,+ char *name);++++unif01_Gen * unif01_CreateCombAdd3 (unif01_Gen *gen1, unif01_Gen *gen2,+ unif01_Gen *gen3, char *name);++++unif01_Gen * unif01_CreateCombXor2 (unif01_Gen *gen1, unif01_Gen *gen2,+ char *name);++++unif01_Gen * unif01_CreateCombXor3 (unif01_Gen *gen1, unif01_Gen *gen2,+ unif01_Gen *gen3, char *name);++++void unif01_DeleteCombGen (unif01_Gen *gen);+++unif01_Gen * unif01_CreateParallelGen (int k, unif01_Gen *gen[], int L);++++void unif01_DeleteParallelGen (unif01_Gen *gen);++++unif01_Gen *unif01_CreateExternGen01 (char *name, double (*gen01)(void));++++unif01_Gen *unif01_CreateExternGenBits (void (*genB)(const unsigned int,+ unsigned int*));++++unif01_Gen *unif01_CreateExternGenBitsL (char *name,+ unsigned long (*genB)(void));++++void unif01_DeleteExternGen01 (unif01_Gen * gen);+void unif01_DeleteExternGenBits (unif01_Gen * gen);+void unif01_DeleteExternGenBitsL (unif01_Gen * gen);+++typedef struct {+ unif01_Gen *gen;+ long n;+ double time;+ double mean;+ lebool fU01;+ } unif01_TimerRec;++++void unif01_TimerGen (unif01_Gen *gen, unif01_TimerRec *timer, long n,+ lebool fU01);++++void unif01_TimerSumGen (unif01_Gen *gen, unif01_TimerRec *timer, long n,+ lebool fU01);++++void unif01_WriteTimerRec (unif01_TimerRec *timer);++++void unif01_TimerGenWr (unif01_Gen *gen, long n, lebool fU01);++++void unif01_TimerSumGenWr (unif01_Gen *gen, long n, lebool fU01);++ +#endif+ +
+ cbits/testu/include/unumrec.h view
@@ -0,0 +1,28 @@++ +/* unumrec.h for ANSI C */++#ifndef UNUMREC_H+#define UNUMREC_H+ +#include "unif01.h"+++unif01_Gen * unumrec_CreateRan0 (long s);++++unif01_Gen * unumrec_CreateRan1 (long s);++++unif01_Gen * unumrec_CreateRan2 (long s);+++void unumrec_DeleteGen (unif01_Gen *gen);+++ +#endif+ +
+ cbits/testu/include/uquad.h view
@@ -0,0 +1,23 @@++ +/* uquad.h for ANSI C */+#ifndef UQUAD_H+#define UQUAD_H+ +#include "unif01.h"+++unif01_Gen * uquad_CreateQuadratic (long m, long a, long b, long c, long s);++++unif01_Gen * uquad_CreateQuadratic2 (int e, unsigned long a,+ unsigned long b, unsigned long c, unsigned long s);+++void uquad_DeleteGen (unif01_Gen *gen);++ +#endif+ +
+ cbits/testu/include/usoft.h view
@@ -0,0 +1,95 @@++ +/* usoft.h for ANSI C */++#ifndef USOFT_H+#define USOFT_H+ +#include "gdef.h"+#include "unif01.h"+++unif01_Gen * usoft_CreateSPlus (long S1, long S2);++++#ifdef HAVE_RANDOM+ unif01_Gen * usoft_CreateUnixRandom (unsigned int s);+#endif++++#ifdef USE_LONGLONG+ unif01_Gen * usoft_CreateJava48 (ulonglong s, int jflag);+#endif+++unif01_Gen * usoft_CreateExcel97 (double r);++++unif01_Gen * usoft_CreateExcel2003 (int x0, int y0, int z0);++++unif01_Gen * usoft_CreateVisualBasic (unsigned long s);++++#if defined(USE_GMP) && defined(USE_LONGLONG)+ unif01_Gen * usoft_CreateMaple_9 (longlong s);+#endif++++#ifdef USE_LONGLONG+ unif01_Gen * usoft_CreateMATLAB (int i, unsigned int j, int bf,+ double Z[]);+#endif++++#ifdef HAVE_MATHEMATICA+ unif01_Gen * usoft_CreateMathematicaReal (int argc, char * argv[],+ long s);+#endif++++#ifdef HAVE_MATHEMATICA+ unif01_Gen * usoft_CreateMathematicaInteger (int argc, char * argv[],+ long s);+#endif+++#ifdef USE_LONGLONG+ void usoft_DeleteMATLAB (unif01_Gen *gen);+#endif++++#ifdef HAVE_MATHEMATICA+ void usoft_DeleteMathematicaReal (unif01_Gen *);+ void usoft_DeleteMathematicaInteger (unif01_Gen *);++#endif+++#ifdef HAVE_RANDOM+ void usoft_DeleteUnixRandom (unif01_Gen *);++#endif+++#if defined(USE_GMP) && defined(USE_LONGLONG)+ void usoft_DeleteMaple_9 (unif01_Gen *gen);++#endif+++void usoft_DeleteGen (unif01_Gen *gen);++ +#endif+ +
+ cbits/testu/include/utaus.h view
@@ -0,0 +1,56 @@++ +/* utaus.h for ANSI C */++#ifndef UTAUS_H+#define UTAUS_H+ +#include "gdef.h"+#include "unif01.h"+++unif01_Gen * utaus_CreateTaus (unsigned int k, unsigned int q,+ unsigned int s, unsigned int Y);++++unif01_Gen * utaus_CreateTausJ (unsigned int k, unsigned int q,+ unsigned int s, unsigned int j,+ unsigned int Y);++++#ifdef USE_LONGLONG+ unif01_Gen * utaus_CreateLongTaus (unsigned int k, unsigned int q,+ unsigned int s, ulonglong Y1);++#endif+++unif01_Gen * utaus_CreateCombTaus2 (+ unsigned int k1, unsigned int k2, unsigned int q1, unsigned int q2,+ unsigned int s1, unsigned int s2, unsigned int Y1, unsigned int Y2);++++unif01_Gen * utaus_CreateCombTaus3 (+ unsigned int k1, unsigned int k2, unsigned int k3,+ unsigned int q1, unsigned int q2, unsigned int q3,+ unsigned int s1, unsigned int s2, unsigned int s3,+ unsigned int Y1, unsigned int Y2, unsigned int Y3);++++unif01_Gen * utaus_CreateCombTaus3T (+ unsigned int k1, unsigned int k2, unsigned int k3,+ unsigned int q1, unsigned int q2, unsigned int q3,+ unsigned int s1, unsigned int s2, unsigned int s3,+ unsigned int Y1, unsigned int Y2, unsigned int Y3);+++void utaus_DeleteGen (unif01_Gen *gen);++ +#endif+ +
+ cbits/testu/include/utezuka.h view
@@ -0,0 +1,30 @@++ +/* utezuka.h for ANSI C */++#ifndef UTEZUKA_H+#define UTEZUKA_H+ +#include "unif01.h"+++unif01_Gen * utezuka_CreateTezLec91 (unsigned int Y1, unsigned int Y2);++++unif01_Gen * utezuka_CreateTez95 (unsigned int Y1, unsigned int Y2,+ unsigned int Y3);++++unif01_Gen * utezuka_CreateTezMRG95 (unsigned int Y1[5],+ unsigned int Y2[7]);+++void utezuka_DeleteGen (unif01_Gen *gen);+++ +#endif+ +
+ cbits/testu/include/util.h view
@@ -0,0 +1,79 @@+ +/* util.h for ANSI C */+#ifndef UTIL_H+#define UTIL_H+ +#include "gdef.h"+#include <stdio.h>+#include <stdlib.h>++ +#define util_Error(S) do { \+ printf ("\n\n******************************************\n"); \+ printf ("ERROR in file %s on line %d\n\n", __FILE__, __LINE__); \+ printf ("%s\n******************************************\n\n", S); \+ exit (EXIT_FAILURE); \+ } while (0)+ ++ +#define util_Assert(Cond,S) if (!(Cond)) util_Error(S)+ ++ +#define util_Warning(Cond,S) do { \+ if (Cond) { \+ printf ("********* WARNING "); \+ printf ("in file %s on line %d\n", __FILE__, __LINE__); \+ printf ("********* %s\n", S); } \+ } while (0)+ ++ +#define util_Max(x,y) (((x) > (y)) ? (x) : (y))+ ++ +#define util_Min(x,y) (((x) < (y)) ? (x) : (y))+ +++FILE * util_Fopen (const char *name, const char *mode);++++int util_Fclose (FILE *stream);++++int util_GetLine (FILE *file, char *Line, char c);++++void util_ReadBool (char S[], lebool *x);++++void util_WriteBool (lebool x, int d);++++void * util_Malloc (size_t size);++++void * util_Calloc (size_t dim, size_t size);++++void * util_Realloc (void *ptr, size_t size);++++void * util_Free (void *p);+++ +#endif+ +
+ cbits/testu/include/utouzin.h view
@@ -0,0 +1,56 @@+ +/* utouzin.h for ANSI C */+#ifndef UTOUZIN_H+#define UTOUZIN_H+ +#include "unif01.h"+++unif01_Gen * utouzin_CreateMRG00a (long s1, long s2, long s3, long s4,+ long s5);++++unif01_Gen * utouzin_CreateMRG00b (long s1, long s2, long s3, long s4,+ long s5, long s6);++++unif01_Gen * utouzin_CreateMRG00c (long s1, long s2, long s3, long s4,+ long s5, long s6, long s7);++++unif01_Gen * utouzin_CreateMRG00d (long s1, long s2, long s3, long s4,+ long s5, long s6, long s7, long s8);+++++unif01_Gen * utouzin_CreateMRG00e (long s10, long s11, long s12, + long s20, long s21, long s22);+++++unif01_Gen * utouzin_CreateMRG00f (long s10, long s11, long s12, + long s20, long s21, long s22);++++unif01_Gen * utouzin_CreateMRG00g (long s10, long s11, long s12, + long s20, long s21, long s22,+ long s30, long s31, long s32);++++unif01_Gen * utouzin_CreateMRG00h (long s10, long s11, long s12, long s13,+ long s20, long s21, long s22, long s23);++++void utouzin_DeleteGen (unif01_Gen * gen);+ +#endif+ +
+ cbits/testu/include/uvaria.h view
@@ -0,0 +1,43 @@++ +/* uvaria.h for ANSI C */++#ifndef UVARIA_H+#define UVARIA_H+ +#include "unif01.h"+++unif01_Gen * uvaria_CreateACORN (int k, double S[]);++++unif01_Gen * uvaria_CreateCSD (long v, long s);++++unif01_Gen * uvaria_CreateRanrotB (unsigned int seed);++++unif01_Gen * uvaria_CreateRey97 (double a1, double a2, double b2, long n0);++++unif01_Gen * uvaria_CreateTindo (long b, long Delta, int s, int k);+++void uvaria_DeleteACORN (unif01_Gen *gen);++++void uvaria_DeleteRanrotB (unif01_Gen *gen);++++void uvaria_DeleteGen (unif01_Gen *gen);++ +#endif+ +
+ cbits/testu/include/uweyl.h view
@@ -0,0 +1,25 @@++ +#ifndef UWEYL_H+#define UWEYL_H+/* uweyl.h for ANSI C */+ +#include "unif01.h"+++unif01_Gen * uweyl_CreateWeyl (double alpha, long n0);+++unif01_Gen * uweyl_CreateNWeyl (double alpha, long n0);++++unif01_Gen * uweyl_CreateSNWeyl (long m, double alpha, long n0);+++void uweyl_DeleteGen (unif01_Gen *gen);++ +#endif+ +
+ cbits/testu/include/uwu.h view
@@ -0,0 +1,28 @@+ +/* uwu.h for ANSI C */++#ifndef UWU_H+#define UWU_H+ +#include "gdef.h"+#include "unif01.h"+++#ifdef USE_LONGLONG+ unif01_Gen * uwu_CreateLCGWu61a (longlong s);++++ unif01_Gen * uwu_CreateLCGWu61b (longlong s);++#endif++++void uwu_DeleteGen (unif01_Gen *gen);+++ +#endif+ +
+ cbits/testu/include/uxorshift.h view
@@ -0,0 +1,49 @@++ +/* uxorshift.h for ANSI C */+#ifndef UXORSHIFT_H+#define UXORSHIFT_H+ +#include "gdef.h"+#include "unif01.h"+++unif01_Gen* uxorshift_CreateXorshift32 (int a, int b, int c, unsigned int x);++++#ifdef USE_LONGLONG+ unif01_Gen* uxorshift_CreateXorshift64 (int a, int b, int c, ulonglong x);+#endif++++unif01_Gen * uxorshift_CreateXorshiftC (int a, int b, int c, int r,+ unsigned int X[]);++++unif01_Gen * uxorshift_CreateXorshiftD (int r, int a[], unsigned int X[]);++++unif01_Gen* uxorshift_CreateXorshift7 (unsigned int S[8]);++++unif01_Gen* uxorshift_CreateXorshift13 (unsigned int S[8]);+++void uxorshift_DeleteXorshiftC (unif01_Gen * gen);++++void uxorshift_DeleteXorshiftD (unif01_Gen * gen);++++void uxorshift_DeleteGen (unif01_Gen * gen);+ +#endif+ +
+ cbits/testu/include/vectorsF2.h view
@@ -0,0 +1,335 @@+ +#ifndef VECTORSF2_H+#define VECTORSF2_H+ +#include "gdef.h"+++#define vectorsF2_WL 32+++typedef struct{ + int n;+ unsigned long *vect;+} BitVect;++++void AllocBV ( BitVect *A,+ int l + );++++void FreeBV ( BitVect *A + );++++void BVCanonic ( BitVect *B, + int t+ );++++void AllOnes ( BitVect *B+ );++++void Mask ( BitVect *B,+ int t+ );+void InvMask ( BitVect *B,+ int t+ );++++lebool BVisZero ( BitVect *A+ );++++int ValBitBV ( BitVect *A, + int noBit+ ); ++++void PutBitBV ( BitVect *A,+ int noBit, + int valBit+ ); ++++void PutBVToZero ( BitVect *A+ );++++void CopyBV ( BitVect *A, + BitVect *B+ );+ +++void CopyBVPart ( BitVect *A,+ BitVect *B,+ int l+ );++++lebool CompareBV ( BitVect *A, + BitVect *B+ ); ++++void XORBV ( BitVect *A, + BitVect *B, + BitVect *C+ );++++void XOR2BV ( BitVect *A, + BitVect *B, + BitVect *C, + BitVect *D+ );++++void ANDBV ( BitVect *A, + BitVect *B, + BitVect *C+ );++++void ANDBVSelf ( BitVect *A, + BitVect *B+ );++++void ANDBVMask ( BitVect *A,+ BitVect *B,+ int t+ );++++void ANDBVInvMask ( BitVect *A,+ BitVect *B,+ int t+ );++++void XORBVSelf ( BitVect *A, + BitVect *B+ );++++void BVLShift ( BitVect *R, + BitVect *A, + int n + ); ++++void BVRShift ( BitVect *R, + BitVect *A, + int n + );++++void BVLShiftSelf ( BitVect *R, + int n + );++++void BVLS1Self ( BitVect *R + );++++void BVRShiftSelf ( BitVect *R, + int n + );++++void InverseBV ( BitVect *A+ );++++void DispBitVect ( BitVect *A, + int l,+ int mathematica+ );++++void RandVect ( BitVect *v+ );++++lebool VerifBitsCommuns ( BitVect *ds1, + BitVect *ds2 + );++++typedef struct{+ BitVect **lignes;+ int nblignes;+ int t;+ int l;+} Matrix;++++void AllocMat ( Matrix* m,+ int nblines,+ int l,+ int t+ );++++void FreeMat ( Matrix *m+ );++++void CopyMat ( Matrix *m, + Matrix *ms, + int nl, + int t + );++++void CopyNTupleMat ( Matrix *m, + Matrix *ms, + int nl,+ int *colonnes, + int t + );++++lebool Diag ( Matrix *m, + int kg, + int t, + int l, + int *gr + );++++int GaussianElimination ( Matrix *m, + int nblignes,+ int l,+ int t+ );++++int CompleteElimination ( Matrix *m, + int nblignes,+ int l,+ int t+ );++++int SpecialGaussianElimination ( Matrix *m, + int nblignes, + int l, + int t, + int *indices+ );++++void MultMatrixByBV ( BitVect *A,+ Matrix *m, + BitVect *B+ );++++void TransposeMatrices ( Matrix *T, + Matrix *M, + int nblines, + int t, + int l+ );++++void ExchangeVect ( Matrix *m, + int i, + int j + );++++void XorVect ( Matrix *m, + int r, + int s, + int min, + int max+ );++++void DispMat ( Matrix *m, + int t, + int l,+ int nblines,+ lebool mathematica+ );+ +++lebool InverseMatrix ( Matrix *MInv, + Matrix *M+ );++++void MultMatrixByMatrix ( Matrix *A, + Matrix *B,+ Matrix *C+ );++++void MatrixTwoPow ( Matrix *A, + Matrix *B,+ unsigned int e+ );+++#ifdef USE_LONGLONG+ void MatrixPow (Matrix * A, Matrix * B, longlong e);+#else+ void MatrixPow (Matrix * A, Matrix * B, long e);+#endif++ +#endif+ +
+ cbits/testu/include/wdist.h view
@@ -0,0 +1,29 @@+ +/* wdist.h for ANSI C */+#ifndef WDIST_H+#define WDIST_H+ +#include "fmass.h"+++typedef double (*wdist_CFUNC) (double [], double);++++typedef double (*wdist_DFUNC) (fmass_INFO, long);+++double wdist_Normal (double Par[], double x);++++double wdist_ChiSquare (double Par[], double x);++++double wdist_Unif (double Par[], double x);++ +#endif+ +
+ cbits/testu/src/fftc.c view
@@ -0,0 +1,222 @@+/*+CC=================================================================CC+CC CC+CC Subroutine RSRFFT(X,M): CC+CC A real-valued, in-place, split-radix FFT program CC+CC Decimation-in-time, cos/sin in second loop CC+CC and computed recursively CC+CC Output in order: CC+CC [ Re(0),Re(1),....,Re(N/2),Im(N/2-1),...Im(1)] CC+CC CC+CC Input/output CC+CC X Array of input/output (length >= N) CC+CC M Transform length is N=2**M CC+CC CC+CC Calls: CC+CC RSTAGE,RBITREV CC+CC CC+CC Author: CC+CC H.V. Sorensen, University of Pennsylvania, Oct. 1985 CC+CC Arpa address: hvs@ee.upenn.edu CC+CC Modified: CC+CC F. Bonzanigo, ETH-Zurich, Sep. 1986 CC+CC H.V. Sorensen, University of Pennsylvania, Mar. 1987 CC+CC H.V. Sorensen, University of Pennsylvania, Oct. 1987 CC+CC CC+CC Reference: CC+CC Sorensen, Jones, Heideman, Burrus :"Real-valued fast CC+CC Fourier transform algorithms", IEEE Tran. ASSP, CC+CC Vol. ASSP-35, No. 6, pp. 849-864, June 1987 CC+CC CC+CC This program may be used and distributed freely as CC+CC as long as this header is included CC+CC CC+CC=================================================================CC+*/+#include <math.h>++void rstage (int n, int n2, int n4, double* x1, double* x2, double* x3, double* x4);+void rbitrev (double* x, int m);++void rsrfft (double *x, int m)+{+ int n, is, id, i0, n2, n4, k;+ double t1;+ x--;+ n = 1 << m;+/*C-------Digit reverse counter---------------------------------------C*/+ rbitrev (x, m);+/*C-----Length two butterflies----------------------------------------C*/+ is = 1;+ id = 4;+ do {+ for (i0 = is; i0 <= n; i0 += id) {+ t1 = x[i0];+ x[i0] = t1 + x[i0 + 1];+ x[i0 + 1] = t1 - x[i0 + 1];+ }+ is = 2 * id - 1;+ id = 4 * id;+ } while (is < n);+/*C-------L shaped butterflies----------------------------------------C*/+ n2 = 2;+ for (k = 2; k <= m; k++) {+ n2 = n2 * 2;+ n4 = n2 / 4;+ rstage (n, n2, n4, &x[0], &x[n4], &x[2 * n4], &x[3 * n4]);+ }+ return;+}++/*+C===================================================================C+C Subroutine RSTAGE - the work-horse of the RFFT C+C Computes a stage of a real-valued split-radix length N C+C transform. C+C Author C+C H.V. Sorensen, University of Pennsylvania, Mar. 1987 C+C===================================================================C+*/+void rstage (int n, int n2, int n4, double* x1, double* x2, double* x3, double* x4)+{+ int n8, is, id, i1, i2, j, jn, i;+ double t1, t2, e, t3, t4, t5;+ double ss1, sd1, ss3, sd3;+ double cc1, cd1, cc3, cd3;+ n8 = n2 / 8;+ is = 0;+ id = n2 * 2;++ do {+ for (i1 = is + 1; i1 <= n; i1 += id) {+ t1 = x4[i1] + x3[i1];+ x4[i1] = x4[i1] - x3[i1];+ x3[i1] = x1[i1] - t1;+ x1[i1] = x1[i1] + t1;+ }+ is = 2 * id - n2;+ id = 4 * id;+ } while (is < n);+ /*C*/ if (n4 - 1 <= 0)+ return;++ is = 0;+ id = n2 * 2;+ do {+ for (i2 = is + 1 + n8; i2 <= n; i2 += id) {+ t1 = (x3[i2] + x4[i2]) * .7071067811865475;+ t2 = (x3[i2] - x4[i2]) * .7071067811865475;+ x4[i2] = x2[i2] - t1;+ x3[i2] = -x2[i2] - t1;+ x2[i2] = x1[i2] - t2;+ x1[i2] = x1[i2] + t2;+ }+ is = 2 * id - n2;+ id = 4 * id;+ } while (is < n);+ /*C*/ if (n8 - 1 <= 0)+ return;++ e = 2 * 3.14159265358979323 / n2;+ ss1 = sin (e);+ sd1 = ss1;+ sd3 = 3 * sd1 - 4 * (sd1 * sd1 * sd1);+ ss3 = sd3;+ cc1 = cos (e);+ cd1 = cc1;+ cd3 = 4 * (cd1 * cd1 * cd1) - 3. * cd1;+ cc3 = cd3;++ for (j = 2; j <= n8; j++) {+ is = 0;+ id = 2 * n2;+ jn = n4 - 2 * j + 2;+ do {+ for (i1 = is + j; i1 <= n; i1 += id) {+ i2 = i1 + jn;+ t1 = x3[i1] * cc1 + x3[i2] * ss1;+ t2 = x3[i2] * cc1 - x3[i1] * ss1;+ t3 = x4[i1] * cc3 + x4[i2] * ss3;+ t4 = x4[i2] * cc3 - x4[i1] * ss3;+ t5 = t1 + t3;+ t3 = t1 - t3;+ t1 = t2 + t4;+ t4 = t2 - t4;+ x3[i1] = t1 - x2[i2];+ x4[i2] = t1 + x2[i2];+ x3[i2] = -x2[i1] - t3;+ x4[i1] = x2[i1] - t3;+ x2[i2] = x1[i1] - t5;+ x1[i1] = x1[i1] + t5;+ x2[i1] = x1[i2] + t4;+ x1[i2] = x1[i2] - t4;+ }+ is = 2 * id - n2;+ id = 4 * id;+ } while (is < n);+ /*C*/ t1 = cc1 * cd1 - ss1 * sd1;+ ss1 = cc1 * sd1 + ss1 * cd1;+ cc1 = t1;+ t3 = cc3 * cd3 - ss3 * sd3;+ ss3 = cc3 * sd3 + ss3 * cd3;+ cc3 = t3;+ }+ /*C*/ return;+}+++/*+CC=================================================================CC+CC CC+CC Subroutine RBITREV(X,M): CC+CC Bitreverses the array X of length 2**M. It generates a CC+CC table ITAB (minimum length is SQRT(2**M) if M is even CC+CC or SQRT(2*2**M) if M is odd). ITAB need only be generated CC+CC once for a given transform length. CC+CC CC+CC Author: CC+CC H.V. Sorensen, University of Pennsylvania, Aug. 1987 CC+CC Arpa address: hvs@ee.upenn.edu CC+CC CC+CC This program may be used and distributed freely as long CC+CC as this header is included. CC+CC CC+CC=================================================================CC+*/+void rbitrev (double* x, int m)+{+ int itab[66000];+ int m2, nbit, imax, lbss, i, j, k, l, j0;+ double t1;+/*C-------Initialization of ITAB array--------------------------------C*/+ m2 = m / 2;+ nbit = 1 << m2;+ if (2 * m2 != m)+ m2 = m2 + 1;+ itab[1] = 0;+ itab[2] = 1;+ imax = 1;++ for (lbss = 2; lbss <= m2; lbss++) {+ imax = 2 * imax;+ for (i = 1; i <= imax; i++) {+ itab[i] = 2 * itab[i];+ itab[i + imax] = 1 + itab[i];+ }+ }++/*C-------The actual bitreversal--------------------------------------C*/+ for (k = 2; k <= nbit; k++) {+ j0 = nbit * itab[k] + 1;+ i = k;+ j = j0;+ for (l = 2; l <= itab[k] + 1; l++) {+ t1 = x[i];+ x[i] = x[j];+ x[j] = t1;+ i = i + nbit;+ j = j0 + itab[l];+ }+ }+ return;+}
htestu.cabal view
@@ -1,8 +1,5 @@--- Initial htestu.cabal generated by cabal init. For further--- documentation, see http://haskell.org/cabal/users-guide/- name: htestu-version: 0.1.1.1+version: 0.1.1.2 synopsis: A library for testing correctness of pseudo random number generators in Haskell. description: HTestU is a library for testing correctness of presudo random number generators (PRNGs) written in Haskell.@@ -43,10 +40,10 @@ hs-source-dirs: src build-tools: gcc, hsc2hs default-language: Haskell2010- include-dirs: cbits/testu/include- includes: addstr.h ftab.h sspectral.h uknuth.h bbattery.h fvaria.h sstring.h ulcg.h bitset.h fwalk.h ulec.h chrono.h gdef.h umarsa.h config.h gdefconf.h statcoll.h umrg.h fbar.h gofs.h svaria.h unif01.h fcho.h gofw.h swalk.h unumrec.h fcong.h mystr.h swrite.h uquad.h fdist.h num.h tables.h usoft.h ffam.h num2.h tu01_sha1.h utaus.h ffsr.h rijndael-alg-fst.h uautomata.h utezuka.h finv.h scatter.h ubrent.h util.h fknuth.h scomp.h ucarry.h utouzin.h fmarsa.h sentrop.h ucrypto.h uvaria.h fmass.h sknuth.h ucubic.h uweyl.h fmultin.h smarsa.h udeng.h uwu.h fnpair.h smultin.h ufile.h uxorshift.h fres.h snpair.h ugfsr.h vectorsF2.h fspectral.h sres.h ugranger.h wdist.h fstring.h sspacings.h uinv.h+ include-dirs: cbits/testu/include cbits/testu/src+ includes:+ install-includes: addstr.h ftab.h sspectral.h uknuth.h bbattery.h fvaria.h sstring.h ulcg.h bitset.h fwalk.h ulec.h chrono.h gdef.h umarsa.h config.h gdefconf.h statcoll.h umrg.h fbar.h gofs.h svaria.h unif01.h fcho.h gofw.h swalk.h unumrec.h fcong.h mystr.h swrite.h uquad.h fdist.h num.h tables.h usoft.h ffam.h num2.h tu01_sha1.h utaus.h ffsr.h rijndael-alg-fst.h uautomata.h utezuka.h finv.h scatter.h ubrent.h util.h fknuth.h scomp.h ucarry.h utouzin.h fmarsa.h sentrop.h ucrypto.h uvaria.h fmass.h sknuth.h ucubic.h uweyl.h fmultin.h smarsa.h udeng.h uwu.h fnpair.h smultin.h ufile.h uxorshift.h fres.h snpair.h ugfsr.h vectorsF2.h fspectral.h sres.h ugranger.h wdist.h fstring.h sspacings.h uinv.h fftc.c c-sources: cbits/testu/src/util.c cbits/testu/src/chrono.c cbits/testu/src/bitset.c cbits/testu/src/num.c cbits/testu/src/num2.c cbits/testu/src/mystr.c cbits/testu/src/tables.c cbits/testu/src/statcoll.c cbits/testu/src/gofs.c cbits/testu/src/gofw.c cbits/testu/src/gdef.c cbits/testu/src/vectorsF2.c cbits/testu/src/swrite.c cbits/testu/src/wdist.c cbits/testu/src/smultin.c cbits/testu/src/svaria.c cbits/testu/src/swalk.c cbits/testu/src/sstring.c cbits/testu/src/sspectral.c cbits/testu/src/sres.c cbits/testu/src/snpair.c cbits/testu/src/smarsa.c cbits/testu/src/sknuth.c cbits/testu/src/scomp.c cbits/testu/src/ftab.c cbits/testu/src/fres.c cbits/testu/src/fmass.c cbits/testu/src/fdist.c cbits/testu/src/fcho.c cbits/testu/src/fbar.c cbits/testu/src/fmarsa.c cbits/testu/src/ufile.c cbits/testu/src/unif01.c cbits/testu/src/bbattery.c- ghc-options: -O2 executable runTestu if flag(testKnownRNGs)@@ -67,3 +64,4 @@ main-is: Dummy.hs ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N build-depends: base+ default-language: Haskell2010