summaryrefslogtreecommitdiffhomepage
path: root/misc/examples/gauss2.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-12-23 23:55:10 +0100
committerTyge Løvset <[email protected]>2022-12-23 23:55:10 +0100
commitd623c6c85071b9af5d607bb5d9aceceaea05220a (patch)
treef20fc3714f86e1553d1103bed6dc8efefcbd9d6b /misc/examples/gauss2.c
parent5f57d597cd27aef55adbcb3b452973b0c6e33667 (diff)
downloadSTC-modified-d623c6c85071b9af5d607bb5d9aceceaea05220a.tar.gz
STC-modified-d623c6c85071b9af5d607bb5d9aceceaea05220a.zip
Experimental uppercase macros.
Diffstat (limited to 'misc/examples/gauss2.c')
-rw-r--r--misc/examples/gauss2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/misc/examples/gauss2.c b/misc/examples/gauss2.c
index 2e07c5a5..c2ed2e00 100644
--- a/misc/examples/gauss2.c
+++ b/misc/examples/gauss2.c
@@ -23,16 +23,16 @@ int main()
stc64_normalf_t dist = stc64_normalf_new(Mean, StdDev);
// Create and init histogram map with defered destruct
- c_auto (csmap_int, mhist)
+ c_AUTO (csmap_int, mhist)
{
- c_forrange (N) {
+ c_FORRANGE (N) {
int index = (int) round( stc64_normalf(&rng, &dist) );
csmap_int_insert(&mhist, index, 0).ref->second += 1;
}
// Print the gaussian bar chart
- c_auto (cstr, bar)
- c_forpair (index, count, csmap_int, mhist) {
+ c_AUTO (cstr, bar)
+ c_FORPAIR (index, count, csmap_int, mhist) {
size_t n = (size_t) (*_.count * StdDev * Scale * 2.5 / (float)N);
if (n > 0) {
cstr_resize(&bar, n, '*');