From ae9c95727369eb1cb4ea4a526f7ced840149642f Mon Sep 17 00:00:00 2001 From: Aleksa Gordic Date: Sun, 2 Jun 2024 15:04:45 +0200 Subject: [PATCH] Add clarification on Box-Muller --- llmc/rand.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llmc/rand.h b/llmc/rand.h index ba13de9..60ed393 100644 --- a/llmc/rand.h +++ b/llmc/rand.h @@ -163,8 +163,8 @@ void uniform_(float* data, unsigned int numel, float from, float to, mt19937_sta } } -// Box�Muller transform - +// Box-Muller transform: maps uniform random numbers to Gaussian distributed numbers +// https://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform void normal_fill_16(float* data, float mean, float std, mt19937_state* state) { #define EPSILONE 1e-12 for (unsigned int t = 0; t < 8; t++) {