

\subsection{\bf A Practical Congruential}
\subsection{\bf Pseudorandom Number Generator}

\begin{slide}
\begin{itemize}
\item In my group, we have used in the past
\begin{eqnarray*}
m & = & 2^{31} \\
a & = & 1103515245 \\
c & = & 12345
\end{eqnarray*}

\item with C code which is essentially

\item newran = [a * oldran + c]\& MASK, 

\item where MASK has lower 31 bits = 1.  All higher bits = 0.  

\item We get a floating point number between 0 and 1 by:
\begin{center}
floatran = newran/2147483648.0
\end{center}

\item This is very simple to code, especially in C which allows you to
use machine capabilities effectively.
\end{itemize}
\end{slide}

