-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unrealistic result of StdNormalGen. #15
Comments
Hi, @kilasuelika , thank you for your interest in my package. |
I have upload a RepEigenRand.zip to my fork. It contains all necessary files to run. I'm using G++ 10.2 with cxx_std_20 on Ubuntu 20.04. I tested on my single core server and home computer. Results are the same. These two computers have same Ubuntu OS version and toolchain. |
@kilasuelika, Sorry for late reply. |
I have a similar problem. Specifically, when I use the AVX2 instruction set to generate random numbers uniformly distributed between -1 and 1, a large number of 1 and -1 appear. Here is my code:
And here is the output
This phenomenon only occurs when generating non-[0, 1) uniformly distributed random numbers,and for standard uniform distributions, random number generation is right. For generating random numbers conforming to a gaussian distribution has a similar situation . I guess this problem is related to the SIMD instructions. I am using AMD 7950X, and here is my cmake file:
|
My code:
-6.42001
8.3635
-6.50135
1.90169
2.42386e-38
2.94601e-38
2.49921e-38
-0
0
-0
0
0.783801
0.534232
1.48888
0.844737
4.74061
7.18897
-0
-5.66121
1.59769e-38
2.74603e-38
0.594965
2.17096e-38
-1.74388
-0
-0
3.80259
6.58371e-39
0.81791
0.762132
1.40474e-38
-0
-2.30039
-0
-12.4106
1.05125
8.62637e-39
0.706428
4.00838e-38
The text was updated successfully, but these errors were encountered: