LibRan  0.1
Pseudo-random number distribution generator
Macros | Functions
turand.c File Reference

basic urand test program More...

#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include "libran.h"
#include "config.h"
Include dependency graph for turand.c:

Go to the source code of this file.

Macros

#define PTEST(a, b)
 
#define NTEST(a, b)
 
#define ABS(a)   ((a) < 0 ? -(a) : (a))
 
#define MAXSMP   1000000
 

Functions

int main ()
 

Detailed Description

basic urand test program

Run a series of tests on the urand routines. This is more for development and not part of the test suite. Just do "make turand" to create the executable - "turand" . Run with "./turand" .

Definition in file turand.c.

Macro Definition Documentation

◆ NTEST

#define NTEST (   a,
 
)
Value:
if ((a) != (b)) printf("OK "); \
else printf("FAIL"); \
printf(" : " #a "\n");

Definition at line 16 of file turand.c.

◆ PTEST

#define PTEST (   a,
 
)
Value:
if ((a) == (b)) printf("OK "); \
else printf("FAIL"); \
printf(" : " #a "\n");

Definition at line 11 of file turand.c.