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

Difference between VSL_RNG_METHOD_UNIFORM_STD_ACCURATE and VSL_RNG_METHOD_UNIFORM_STD

mcroci
Beginner
633 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
591 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/...

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
583 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-statist....

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
577 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?

Gennady_F_Intel
Moderator
554 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



Gennady_F_Intel
Moderator
472 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.



Reply