You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if this is intentional or not, so I'm not sure if this should be documented or fixed. I believe this function creates a bias to smaller numbers, because it has a 1/9 chance to pick lengths from 1 to 9 inclusively, then it generates a random number from 0 to 10^(randomly picked size). So there's a 1/9 chance it'll pick a length of 1, then a 1/10 chance it'll pick a 0, leading to a 1/90 chance to pick 0 in a range that goes from 0 to 10^9.
I'm not sure if this is intentional or not, so I'm not sure if this should be documented or fixed. I believe this function creates a bias to smaller numbers, because it has a 1/9 chance to pick lengths from 1 to 9 inclusively, then it generates a random number from 0 to 10^(randomly picked size). So there's a 1/9 chance it'll pick a length of 1, then a 1/10 chance it'll pick a 0, leading to a 1/90 chance to pick 0 in a range that goes from 0 to 10^9.
java-faker/src/main/java/com/github/javafaker/Number.java
Line 68 in a8b8ff0
The text was updated successfully, but these errors were encountered: