This algorithm implements the original universal random number generator as proposed by Marsaglia & Zaman in report FSU-SCRI-87-50 and coded in FORTRAN77 by Fred James as the RANMAR generator, part of the MATHLIB HEP library.
Building Blocks and Tools JavaScript Library.