This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\newcount\cnta | |
\newcount\cntb | |
\newcount\cntc | |
\newcount\cntd | |
\newcount\maxrand | |
\maxrand "10000000 | |
% \the\maxrand |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\newcount\cnta | |
\newcount\cntb | |
%\newcount\cntc | |
%\newcount\cntd | |
\newcount\maxrand | |
\maxrand "10000000 | |
% \the\maxrand |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env/py | |
"""This is a quick Pythonification of the Pascal code in pdftex.web | |
I know I should use a Python generator rather than variables with | |
global scope... | |
Anyway, brief testing showed it does match exactly with actual | |
\pdfuniformedeviate/\pdfsetrandomseed, and that's what I wanted | |
in case I attempt some statistics on this PRNG. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env/py | |
"""This is a quick Pythonification of the Pascal code in pdftex.web | |
I know I should use a Python generator rather than variables with | |
global scope... | |
Anyway, brief testing showed it does match exactly with actual | |
\pdfuniformedeviate/\pdfsetrandomseed, and that's what I wanted | |
in case I attempt some statistics on this PRNG. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
\usepackage{bigintcalc,xintcore} | |
\begin{document} | |
Bonjour | |
\pdfresettimer | |
\romannumeral\xintreplicate{1000}{\edef\x{\xintiiPow{2}{30}}}% | |
\the\pdfelapsedtime\par |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
\newenvironment{foo}{}{} | |
\begin{document} | |
\begin{foo} | |
\noindent\begin{minipage}{\linewidth} | |
bar! | |
\end{minipage} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
\usepackage{mwe} | |
\begin{document} | |
% or anything filling the line with less than inter-word space shrinkability | |
\noindent\rule{\linewidth}{1pt} % <-- we deliberately leave a space token here | |
\begin{figure}[htbp] | |
\centering | |
% only by way of example, close to real life examples |
NewerOlder