Notes for Intel® oneAPI Math Kernel Library Vector Statistics

ID 772987
Date 12/04/2020
Public
Document Table of Contents

Template Test

Test Purpose

The test evaluates the conformity of the generator output with the template sequence of random numbers. The test forms the specified output integer sequence x1, x2, ..., xk, xk+1, ... from the recurrence specifying initial conditions. The parameters of the recurrences are selected such that the output sequences possess "good" properties (good multidimensional uniformity, large period, etc.). If the test computes any member of sequence xk incorrectly, that results in incorrect computing of the other members xk+1, ... of the sequence. Moreover, if xk differs from the correct (template) sequence in one bit, the subsequent members of sequence may differ significantly from the template sequence. The quality of the obtained sequence is probably much worse than the quality of the template sequence. That is why all VS BRNGs undergo thorough tests for template sequences conformity.

The test also checks the BRNGs with the random output numbers u1, u2, ..., uk, uk+1, ..., uniformly distributed over the (a, b) interval for the template output conformity.

Obviously, the output sequences are different for real arithmetic of single and double precision. For the integer output every number should coincide bitwisely with the template number. For the real output numbers, such coincidence is not necessary. The upper bits of the mantissa of the real output determine the quality of the output sequence; the lower bits do not influence randomness. For example, the coincidence of the upper binary digits of the mantissa is sufficient for most applications. (See the chapter Spectral Test in [Knuth81]).

This test is also used to validate VS basic quasi-random number generators.

Final Result Interpretation

The final result is the number of the sequence members that do not coincide with the template members. The value should be equal to 0.

For real sequences the test assumes that the sequence member coincides with the template member, if at least 8 upper binary digits of the mantissa coincide.

Tested Generators

Function Name Application
vsRngUniform
applicable
vdRngUniform
applicable
viRngUniform
not applicable
viRngUniformBits
applicable