Developer Reference

Contents

Accurate and Fast Modes of Random Number Generation

Using the distribution generators in the application, you can expect the obtained random numbers to belong to definitional domain of the corresponding distribution irrespective of its parameters. For example, random numbers
xi
obtained as output of the relevant generator that are uniformly distributed on [
a, b
) are assumed to satisfy the following condition:
xi
∈[
a, b
) for all indices
i
and for all values of
a
and
b
. However, because of the specificity of floating-point calculations and rounding modes, some continuous distribution generators may produce random numbers lying beyond definitional domain for some particular values of distribution parameters. This is not acceptable in applications for which accuracy of calculations is critical.
To resolve this issue, VS defines two modes of random number generation: accurate and fast. A generation mode is initialized during the call of the distribution generator by specifying value of the method parameter. For example, an accurate generation of single precision floating-point numbers from the distribution uniform on [
a, b
) interval in C looks as follows:
... status=vsRngUniform(VSL_METHOD_SUNIFORM_STD_ACCURATE, stream, n, r, a, b); ...
So, if a Monte Carlo application uses several distribution generators, each of them can be called in the preferable mode. When used in the accurate mode, the generators produce random numbers that belong to definitional domain for all parameter values of the distribution. The table below lists the generators that support the accurate mode of calculations:
Type of Distribution
Data Types
Uniform
s,d
Exponential
s,d
Weibull
s,d
Raleigh
s,d
Lognormal
s,d
Gamma
s,d
Beta
s,d
The distribution generators used in the fast mode produce numbers beyond the definitional domain in relatively rare cases. The application should set the accurate mode if all generated random numbers are expected to belong to the definitional domain irrespective of distribution parameter values. Use of the accurate mode may result in a slight performance degradation for random number generation.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804