RNG not initialized properly
In the advligorts RNG, an initialization function noise_ran
is defined, but never called by the generated code. As a result, all of the operations in noise_int64
involving the state variables noise_v
and noise_w
have no effect. Those variables get initialized to zero and never change thereafter.
The origin of this RNG appears to be Numerical Recipes, which describes it as a combination of four generators:
Ran = [A1_l_(C3) + A3_r_] ∧ B1
Without calling the initialization function, we are just getting the A1_l_(C3) part. The discussion in Numerical Recipes suggests this can still result in a pretty strong RNG, but not as strong as it was intended to be.
Also, the time-based noise_seed
is never used, so the sequence produced is the same every time the code starts up.