Skip to content

Instantly share code, notes, and snippets.

@jfbu
Created May 3, 2018 07:55
Show Gist options
  • Save jfbu/1d1a4fb58fd712d46729055e2edc70a9 to your computer and use it in GitHub Desktop.
Save jfbu/1d1a4fb58fd712d46729055e2edc70a9 to your computer and use it in GitHub Desktop.
\newwrite\out
\newcount\cnt
\def\test #1#2#3{% #1 = seed, #2 = N, #3 = reps
\immediate\openout\out=randomints_tex_#1.txt
\pdfsetrandomseed #1
\cnt0
\loop
\advance\cnt 1
\immediate\write\out{\pdfuniformdeviate #2 }
\ifnum\cnt<#3
\repeat
\immediate\closeout\out
}
\test {12345}{1000}{1000}
\test {12346}{1000}{1000}
\bye
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment