Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
6981 Discussions

Difference between VSL_RNG_METHOD_UNIFORM_STD_ACCURATE and VSL_RNG_METHOD_UNIFORM_STD

mcroci
Beginner
1,499 Views

When calling vdRngUniform what is the difference in the algorithm between VSL_RNG_METHOD_UNIFORM_STD_ACCURATE and VSL_RNG_METHOD_UNIFORM_STD? I could not find this information anywhere. I am particularly interested to know how the symmetry of the distribution and its bounds are affected if the less accurate method is used, but knowing what the algorithm is would be a good start). 

Labels (1)
0 Kudos
5 Replies
GouthamK_Intel
Moderator
1,457 Views

Hi,

Thanks for reaching out to us!

Please refer to the below link for information related to generating random numbers with different types of distribution and Modes of random number generation.

https://software.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-c/top/statistical-functions/random-number-generators/distribution-generators.html

However, we are escalating this thread to the Subject Matter Expert who will guide you further.

Have a Good day!


Thanks & Regards

Goutham


Gennady_F_Intel
Moderator
1,449 Views

Hi, Could You please check the Accurate and Fast modes of RNG description following the link:

https://software.intel.com/content/www/us/en/develop/documentation/onemkl-vsnotes/top/vector-statistics-structure/accurate-and-fast-modes-of-random-number-generation.html.

In particular: "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 the definitional domain for some particular values of distribution parameters. This is not acceptable in applications for which accuracy of calculations is critical...."


mcroci
Beginner
1,443 Views

Thanks for your help! The description says:

"Fast mode provides high performance of generation and also guarantees that generated random numbers belong to the definitional domain except for some specific values of distribution parameters."

This gives an idea, but which parameters are safe to use with fast mode and which are not in terms of respecting the bounds? Would a and b (the bounds) being exactly representable in finite precision be sufficient or is the situation more complicated than this?

0 Kudos
Gennady_F_Intel
Moderator
1,420 Views

the safety "of using the fast method depends not only on the parameters a and b, but also on

• implementation

• the type of generator used

• rounding modes



0 Kudos
Gennady_F_Intel
Moderator
1,338 Views

The issue is closing and we will no longer respond to this thread. If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.



0 Kudos
Reply