Skip to content

Commit 1ce30fd

Browse files
authored
Merge pull request #516 from gordicaleksa/update_random_doc
Add clarification on Box-Muller
2 parents 2525849 + ae9c957 commit 1ce30fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llmc/rand.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ void uniform_(float* data, unsigned int numel, float from, float to, mt19937_sta
163163
}
164164
}
165165

166-
// BoxMuller transform
167-
166+
// Box-Muller transform: maps uniform random numbers to Gaussian distributed numbers
167+
// https://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform
168168
void normal_fill_16(float* data, float mean, float std, mt19937_state* state) {
169169
#define EPSILONE 1e-12
170170
for (unsigned int t = 0; t < 8; t++) {

0 commit comments

Comments
 (0)