M.E. O'Neill

Results 33 comments of M.E. O'Neill

Thanks, this is useful, although it #330 omits a rather key detail. The trick is to not only make sure `__Z88DK_R2L_CALLING_CONVENTION` is defined when including `stdarg.h` but also to declare...

An alternative to editing the code is to use right-to-left arg-passing globally. This works, allowing the above code to be run with: ``` ubuntu@ubuntu:~/spectrum$ z88dk.zcc +cpm vargs.c -set-r2l-by-default -D__Z88DK_R2L_CALLING_CONVENTION -O3...

Also, although the classic lib's `stdarg.h` has @aralbrec's `__Z88DK_R2L_CALLING_CONVENTION` fix, the version in newlib does not. Currently you can kludge around it with code like: ``` #define __SDCC #undef __SCCZ80...

You can also make PCG go backwards using `advance`. I just wanted to check that you were aware of this…

This happens because on Windows, pcg64 needs to use a helper library to do 128-bit math, and not enough of the functions in that library are `constexpr` functions. If you...

The sign-compare one is easy to fix (and I've done so). The implicit conversion one probably ought to be fixed by making _all_ implicit conversions explicit. That's a bigger patch...

I could merge this, but pcg_extras.hpp includes iostream anyway, so it doesn't save us anything to bring in the forward declarations. Do you see some big win in making this...

That's basically what `pcg32x2` does, although perhaps it could do it a good deal better.

(Specifically, it would be much better if the two PRNGs tied together used different multiplicative constants, but that would push things further away from being maximally simple.)

You can also check out [pcg-c](/imneme/pcg-c) for more options.