summaryrefslogtreecommitdiffhomepage
path: root/examples/random.c
AgeCommit message (Collapse)Author
2022-12-20Restructured folders: examples, benchmarks, tests into misc folder.Tyge Lovset
2022-10-21Renamed size_t formatting macro c_zu to c_ZU (for replacing %zu on mingw64).Tyge Løvset
2022-10-21Fixed wrong formatting of 64bit values various places.Tyge Løvset
Finialized cbox/carc issues.
2022-10-19Reverted back to c_forrrange from c_forloop. Still available but deprecated.Tyge Løvset
2022-10-14Replaced PRIuMAX with new c_zu macro in examples. "%zu" is not supported by ↵Tyge Løvset
mingw64 and PRIuMAX is not a replacement for "zu".
2022-09-26DEPRECATED: c_forrange(): replaced with c_forloop(). This uses 'long long' ↵Tyge Løvset
as iter type, i.e. "%lld" printf format. crange_from() renamed to crange_make(). More docs.
2022-06-01Reverted to default static linkage of non-templated symbols (cstr, csview, ↵Tyge Løvset
..), as it gives smaller executables and is convenient for small applications. (no need to define i_implement when functions is used in one translaton unit only).
2022-06-01Converted all files with DOS line endings to LINUX.Tyge Løvset
2022-05-30Done refactoring:Tyge Løvset
- Non-templated types (cstr, csview, cbits, crandom) have no longer default static linking. Now i_header is defined, i.e. files are as headers only. ==> Define `i_implement` before file inclusion. Still possible to do static linkage by defining `i_static` before inclusion or global STC_STATIC. - Templated containers still have static linkage by default. - Renamed csview_substr(), csview_slice() to csview_substr_ex(), csview_slice_ex(). Added simpler inlined csview_substr(), csview_slice().
2022-04-18crandom.h: Renamed *_init(..) functions to *_new(..). Old names are kept but ↵Tyge Løvset
deprecated.
2022-03-04Updated printf formatting to portable code. This was also to use ↵Tyge Løvset
http://winlibs.com gcc+clang with ucrt runtime-libs without warnings.
2021-11-26Bugfix of c_atomic_decrement() asm version in csptr.h. Some cleanupTyge Løvset
2021-11-25Updated int params constness. Updated random.c example.Tyge Løvset
2021-09-19Remove warnings.Tyge Løvset
2021-05-15Renamed newly introduced internal c_cast() to c_make() for c++ ↵Tyge Løvset
compatability. Added usage.
2021-02-24More docs and some file renames.Tyge Løvset
2021-01-21Reverted namings: crand to crandom, and copt to coption.Tyge Løvset
2020-12-28Reverted crand.h API back to rename crand_* to stc64_*, and crand_next() -> ↵Tyge Løvset
stc64_rand().
2020-12-16Renamed crandom to crand, including renaming of relevant files.Tyge Løvset
2020-12-16Reverted back API to easier naming scheme of crandom.h types and methods.Tyge Løvset
Highly optimized generation of unbiased uniform bounded random numbers. Only 33% overhead.
2020-12-15Minors on crandom and example.Tyge Løvset
2020-12-14Reworked the crandom.h module. Changed API (sorry!), made uniform distr. ↵Tyge Løvset
unbiased. Removed 32-bit pcg32 PRNG.
2020-11-26Removed stc/cfmt.h, as _Generic requires C11. I have made it a gist: ↵Tyge Løvset
https://gist.github.com/tylov/bcc956a4779f1d14204e66a14f17beb9 All examples are reverted to use printf() instead of c_print().
2020-10-26Updates examples using cfmt.h c_print().Tyge Løvset
2020-10-17Internal renaming of STC_IMP to STC_DEF. Removed cstr_INIT. Use cstr_init().Tyge Løvset
2020-09-20Added c_foreach (i,N) and c_foreach (N), and updated README.mdTyge Løvset
2020-09-18Minor, using a few c_forrange ().Tyge Løvset
2020-09-18Changed <container>_ini macro constant to <container>_INIT, and ↵Tyge Løvset
<container>_destroy() to <container>_del.
2020-09-13reverted back to separate random engine and distribution parameters.Tyge Løvset
2020-09-03Changed constant <container>_init to <container>_ini to avoid conflict with ↵Tyge Løvset
<container>_init() method. Reverted name cprique back to cpqueue.
2020-08-30Renamed cstr_destr to cstr_mdestroy(). Added a few more examples.Tyge Løvset