-
-
Notifications
You must be signed in to change notification settings - Fork 944
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
feat!: high precision random number generator #2357
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## next #2357 +/- ##
==========================================
- Coverage 99.57% 99.57% -0.01%
==========================================
Files 2846 2815 -31
Lines 249892 249870 -22
Branches 1055 1066 +11
==========================================
- Hits 248830 248804 -26
- Misses 1062 1066 +4
|
Probably also worth checking if genrandRes53CC is significantly slower, or if there are any other downsides to using it. |
It's twice as slow. |
I think this should be probably considered a breaking change given it causes nearly every snapshot to change. That would also allow for beta testing of the change before 9.0 in case the slower algorithm causes performance problems. |
The breaking of the snapshots is caused by |
I'm not that deep into math, but for some reason using two values from the seed increases the variance of the values. |
Nevermind, I found the error, currently the first and the last element aren't evenly distributed for number.int() |
Team Decision We will change mersenne to 53 bit precision to reduce the duplicates and create a separate PR for the float issues. |
a4b4203
3 approving reviews. Enabling auto merge. |
Fixes #2355
To Fix
faker.number.int()
andfaker.number.float()