diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:25:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:25:49 +0000 |
commit | 15c210fff53f4ce7057339a77f93ca955ee5cd46 (patch) | |
tree | 856918348b7a9cf74565389191206fb18f11c6d8 /src/pdfs.c | |
parent | Adding debian version 2.1.9+dfsg-1. (diff) | |
download | iperf-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.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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); |