summaryrefslogtreecommitdiffstats
path: root/src/pdfs.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:25:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:25:49 +0000
commit15c210fff53f4ce7057339a77f93ca955ee5cd46 (patch)
tree856918348b7a9cf74565389191206fb18f11c6d8 /src/pdfs.c
parentAdding debian version 2.1.9+dfsg-1. (diff)
downloadiperf-15c210fff53f4ce7057339a77f93ca955ee5cd46.tar.xz
iperf-15c210fff53f4ce7057339a77f93ca955ee5cd46.zip
Merging upstream version 2.2.0+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/pdfs.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pdfs.c b/src/pdfs.c
index a1e0382..8110c8f 100644
--- a/src/pdfs.c
+++ b/src/pdfs.c
@@ -63,13 +63,16 @@
#define TRUE 1
float box_muller(void) {
float x1, x2, w, y1;
+#if 0
static float y2;
static int generate = FALSE;
/* Each iteration produces two values, if one exists use the value from previous call */
generate = !generate;
if (!generate) {
y1 = y2;
- } else {
+ } else
+#endif
+ {
int loopcontrol=100;
do {
x1 = 2.0 * (float)rand()/(float)(RAND_MAX) - 1.0;
@@ -82,7 +85,9 @@ float box_muller(void) {
} else {
w = sqrt( (-2.0 * logf( w ) ) / w );
y1 = x1 * w;
+#if 0
y2 = x2 * w;
+#endif
}
}
return(y1);