mirror of
https://github.com/karpathy/llm.c.git
synced 2026-07-28 20:35:09 -04:00
Merge pull request #516 from gordicaleksa/update_random_doc
Add clarification on Box-Muller
This commit is contained in:
commit
1ce30fdc4a
1 changed files with 2 additions and 2 deletions
|
|
@ -163,8 +163,8 @@ void uniform_(float* data, unsigned int numel, float from, float to, mt19937_sta
|
|||
}
|
||||
}
|
||||
|
||||
// Box<EFBFBD>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++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue