From 67357f3ce55120bd52bf941ed664ba6d52dbf19d Mon Sep 17 00:00:00 2001 From: hackbard Date: Wed, 25 Feb 2004 11:40:57 +0000 Subject: [PATCH] added random stuff --- Makefile | 5 ++++- check_rand.c | 17 +++++++++++++++++ general.c | 30 ++++++++++++++++++++++++++++++ general.h | 4 +++- 4 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 check_rand.c diff --git a/Makefile b/Makefile index 3993f5a..5503811 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ CFLAGS = -O3 -Wall LIBS = -L/usr/lib -lm API = g_plot.o general.o -OBJS = newton zentral homogen integral-1_2 integral-2_2 polynom_interpolation kettenbruchentwicklung bessel_1 bessel_2 +OBJS = newton zentral homogen integral-1_2 integral-2_2 polynom_interpolation kettenbruchentwicklung bessel_1 bessel_2 check_rand all: $(OBJS) @@ -36,6 +36,9 @@ bessel_1: $(API) bessel_2: $(API) $(CC) $(CFLAGS) -o $@ $(API) $(LIBS) bessel_2.c +check_rand: $(API) + $(CC) $(CFLAGS) -o $@ $(API) $(LIBS) check_rand.c + clean: rm $(API) $(OBJS) diff --git a/check_rand.c b/check_rand.c new file mode 100644 index 0000000..a99d8ea --- /dev/null +++ b/check_rand.c @@ -0,0 +1,17 @@ +#include +#include +#include "general.h" +#include "g_plot.h" + +#define STEPS 1000000 + +int main(int argc,char **argv) { + int i; + + my_srand(time(NULL)); + + for(i=0;i