[XeTeX] Random number primitives

David Carlisle d.p.carlisle at gmail.com
Sun Nov 13 15:51:52 CET 2016


On 13 November 2016 at 13:58, Apostolos Syropoulos
<asyropoulos at yahoo.com> wrote:
>
>
> Thank you very much for your prompt response. I would say that
> this feature makes the typesetting engine more independent and
> this is definitely a good thing. Also, I think it should be
> implemented using the drand48 function as Neelson has already
> suggested.
>
>
> A.S.
>

the statistical properties of drand48 are almost certainly better but
metafont/pdftex/luatex all use the code from mf.web (or for example as
C in luatex sources arithemtic.w)

@ And now let's complete our collection of numeric utility routines
by considering random number generation.
\MF\ generates pseudo-random numbers with the additive scheme recommended
in Section 3.6 of {\sl The Art of Computer Programming};
...
@ Finally, a normal deviate with mean zero and unit standard deviation
can readily be obtained with the ratio method (Algorithm 3.4.1R in
{\sl The Art of Computer Programming\/}).


A major aim of the original request was to bring the functionality of
the xetex engine into line with pdftex and luatex to help in
developing cross engine macro code. So there are arguments for using
the same code here unless the existing code is really broken and
luatex/metafont/pdftex should all change.

David


More information about the XeTeX mailing list