Closed syheliel closed 5 months ago
For me the random number seed is always the same, so I get always the same answer.
The test works fine, but we need to ensure the random seed is initialized using the system clock at the beginning of the program. That's a separate issue.
The test itself is good. If it ever fails, we can relax the 5% deviation to a higher number. Thanks!
While playing with this code, I discovered two bugs:
The second one is just a bug in LPython. The first one however is a bug in the random seed initialization. We need to fix it.
Fix issue #2542 . test the distribution of random. The error rate is lower than 0.1% (tested locally 1000 times without fail)