diff options
| author | Tyge Løvset <[email protected]> | 2023-03-28 19:29:05 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-03-28 19:29:05 +0200 |
| commit | 59d74d181e44dd05a8570b42fc6284745e225664 (patch) | |
| tree | b693ec9f5ef0d529fd2e6edbe3b53cf0f1eb8c2d /misc/examples/prime.c | |
| parent | 26cd0a73422cdbcd4998170e179fa0f3ce48e9a5 (diff) | |
| download | STC-modified-59d74d181e44dd05a8570b42fc6284745e225664.tar.gz STC-modified-59d74d181e44dd05a8570b42fc6284745e225664.zip | |
Example changes. Added crand.h possible replacement for crandom.h
Diffstat (limited to 'misc/examples/prime.c')
| -rw-r--r-- | misc/examples/prime.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/misc/examples/prime.c b/misc/examples/prime.c index 9ffb2f53..34d64f10 100644 --- a/misc/examples/prime.c +++ b/misc/examples/prime.c @@ -42,9 +42,8 @@ int main(void) puts("\n"); puts("Show the last 50 primes using a temporary crange generator:"); - crange R = crange_make(n - 1, 0, -2); - c_forfilter (i, crange, R, - cbits_test(&primes, *i.ref>>1) && + c_forfilter (i, crange, crange_object(n - 1, 0, -2), + cbits_test(&primes, *i.ref/2) && c_flt_take(i, 50) ){ printf("%lld ", *i.ref); |
