Algorithm Implementation/Pseudorandom Numbers/Wichmann-Hill (1982) PRNG

Visual Basic
This algorithm has behavior that is broadly similar to that of the built-in VBA Rnd function, and this is perhaps not surprising since it was the basis of the Excel Rand function for quite some time. A short summary is given here:
 * The Randomize function is used to set the working variables located at module level.  In turn, these variables are used at every stage to calculate RndX outputs and to re-calculate their own values, ready for the next RndX call.
 * RandomizeX sets variables using an input from the system timer when it is called without a parameter.  When given a parameter, the output stream of characters generated will be distinct and repeatable for that parameter.   This latter state applies when no parameter for RndX is given, or if given, provided that it is a positive number.
 * The most common configuration, and most useful, calls RandomizeX before RndX, both without parameters.  However, if RandomizeX is not included in the code, the work variable defaults that are used by RndX at startup lead to a corresponding default output stream of characters.  This same stream is repeated whenever RndX is run without first calling RandomizeX.
 * Adding positive parameters for RndX will not seed the generation process.  Apart from the starup defaults for RndX, all seeding depends directly or indirectly on having RandomizeX in the code.
 * Refer to the drop box below for a complete tabulation of the parameter settings and their outcomes.