diff options
| author | Tyge Løvset <[email protected]> | 2023-02-08 16:16:49 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-02-08 17:18:24 +0100 |
| commit | c4441f5fc665194fbd7a894a67a64a08c3beac42 (patch) | |
| tree | 82f231b6e8fcb75625166f98aa785baaa265a3d6 /misc/examples/random.c | |
| parent | 673dd5319a488d4b702b94dd9aeda4e497ae4fbc (diff) | |
| download | STC-modified-c4441f5fc665194fbd7a894a67a64a08c3beac42.tar.gz STC-modified-c4441f5fc665194fbd7a894a67a64a08c3beac42.zip | |
Changed to use lowercase flow-control macros in examples (uppercase will still be supported). Improved many examples to use c_make() to init containers.
Diffstat (limited to 'misc/examples/random.c')
| -rw-r--r-- | misc/examples/random.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/misc/examples/random.c b/misc/examples/random.c index fc4576dd..e27279a0 100644 --- a/misc/examples/random.c +++ b/misc/examples/random.c @@ -14,7 +14,7 @@ int main() printf("Compare speed of full and unbiased ranged random numbers...\n"); sum = 0; before = clock(); - c_FORRANGE (N) { + c_forrange (N) { sum += (uint32_t)stc64_rand(&rng); } diff = clock() - before; @@ -25,7 +25,7 @@ int main() rng = stc64_new(seed); sum = 0; before = clock(); - c_FORRANGE (N) { + c_forrange (N) { sum += stc64_uniform(&rng, &dist1); // unbiased } diff = clock() - before; @@ -35,7 +35,7 @@ int main() sum = 0; rng = stc64_new(seed); before = clock(); - c_FORRANGE (N) { + c_forrange (N) { sum += (int64_t)(stc64_rand(&rng) % (range + 1)); // biased } diff = clock() - before; |
