The Ziggurat method
In this article I document my journey down the Gaussian random numbers rabbit hole.
In this article I document my journey down the Gaussian random numbers rabbit hole.
We've already hand-rolled our own RNG in a previous
article, to improve on what the C standard
library rand() gives us.
We also talked about how floats work.
In this article, I want to combine the two. I want to find out how we can generate random floating-point numbers between 0 and 1, and improve our rng.c library.
In this article I want to explore floating-point numbers (floats). Floats are a bit more complicated than integers. It's quite easy to convert a bunch of bits to an (unsigned) integer, but for floats this is not trivial.
rand()In this article I will try to convince you to stop using rand() in your C projects,
and write a better alternative from scratch.
I was generating some random numbers the other day. And I really felt the urge to visualize them. Just to get an intuition, like, what's the shape of the distribution? Is it noisy or smooth?
When in Python, I would usually bust out pip install matplotlib for this kind of tech.
But what are the options when you're in C?
Rumor has it that all Makefiles in use today were written in a time when dinosaurs roamed the earth. Nobody actually writes new Makefiles anymore, right?