From 07906baa42470bad14d2c40f57967691f6118969 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Thu, 1 Nov 2018 12:33:37 -0400 Subject: revamped and simplied fracture code with c++ --- lib/rand.c | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 lib/rand.c (limited to 'lib/rand.c') diff --git a/lib/rand.c b/lib/rand.c deleted file mode 100644 index 8ba2b2b..0000000 --- a/lib/rand.c +++ /dev/null @@ -1,15 +0,0 @@ - -#include "fracture.h" - -long double rand_dist_pow(const gsl_rng *r, double beta) { - long double x = 0; - - // underflow means that for very small beta x is sometimes identically zero, - // which causes problems - while (x == 0.0) { - long double y = logl(gsl_rng_uniform_pos(r)) / beta; - x = expl(y); - } - - return x; -} -- cgit v1.2.3-70-g09d2