-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
setprecision support #2362
Comments
It's not really a bug - the library has no option to change the output of floating-point numbers. If you use |
sorry,i show this code ,just want to say
it should print but the output is i think
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hello! This topic has been closed due to inactivity, but it would be a very useful feature in my opinion as well. |
We also need this. It would be very useful. |
What is the issue you have?
i try to run the follow code
Please describe the steps to reproduce the issue.
run the code
Can you provide a small but working code example?
yes ,see the sample
What is the expected behavior?
it should print
precision=2 fix :1.11, json: {"data1":7.00, etc... ,"data2":1.00}
And what is the actual behavior instead?
but the output is
precision=2 fix :1.11, json: {"data1":7.0000000001, etc... ,"data2":0.9999999999}
i try to test
setw
andsetfill
, it works; but doesn't work forsetprecision
Which compiler and operating system are you using?
Which version of the library did you use?
develop
branchThe text was updated successfully, but these errors were encountered: