Hi guys,
Does anyone know of a C function that will generate gaussian noise?
Thanks in advance
Hi guys,
Does anyone know of a C function that will generate gaussian noise?
Thanks in advance
>> Does anyone know of a C function that will generate gaussian noise?
Yes.
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Generating Gaussian Random Numbers, Taygeta Scientific Inc.
To change the standard deviation multiply by what you want it to be, and to change the mean add a new mean, I'd imagine.