projects
/
physik
/
nlsop.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
new TODO
[physik/nlsop.git]
/
random.c
diff --git
a/random.c
b/random.c
index
6694317
..
6690531
100644
(file)
--- a/
random.c
+++ b/
random.c
@@
-10,6
+10,7
@@
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
+#include <math.h>
#include "random.h"
#include "random.h"
@@
-63,7
+64,7
@@
u32 get_rand(u32 max)
}
c_ptr=b_ptr;
}
}
c_ptr=b_ptr;
}
-
+
return((u32)(*(c_ptr++)*(max*1.0/((long long unsigned int)URAND_MAX+1))));
}
return((u32)(*(c_ptr++)*(max*1.0/((long long unsigned int)URAND_MAX+1))));
}