From: hackbard Date: Wed, 25 Feb 2004 11:40:57 +0000 (+0000) Subject: added random stuff X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67357f3ce55120bd52bf941ed664ba6d52dbf19d;p=physik%2Fcomputational_physics.git added random stuff --- 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