-
-
Notifications
You must be signed in to change notification settings - Fork 909
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
datatype.float does not return a float with given precision #345
Comments
This behavior might be intentional:
|
After further investigation, I think you're right @ST-DDT - it looks like it's a feature, not a bug. The
Are you 100% sure about the faker.seed(42)
faker.datatype.number(1000) // 374
faker.seed(42)
faker.datatype.float(1000) // 37000 |
I meant |
It resembles precision if represented with
Correct me if I'm wrong, but this has little in common to precision as typically the mathematical precision is represented as integer, and refers to the number of significant decimal digits. |
Yes, you are right. We have to put more thoughts into this. |
Describe the bug
The code indicates that float can take a number that will be used as precision value.
But it returns always a integer number when using
typoef options === 'number'
Reproduction
Additional Info
I found this bug while rewriting the datatype tests in #344
The text was updated successfully, but these errors were encountered: