We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When a float is dumped and becomes float again via json::parse, looses precision
json jjj; jjj["f"] = 11.123456789; float f = json::parse(jjj.dump())["f"]; std::cout << f << std::endl;
expected: 11.12345678.. getting: 11.1235
Apple LLVM version 9.0.0 (clang-900.0.39.2) Target: x86_64-apple-darwin16.7.0
Is there any way to increase precision?
The text was updated successfully, but these errors were encountered:
Yes, increase your output precision:
std::cout.precision(12); std::cout << f << std::endl;
Sorry, something went wrong.
No branches or pull requests
When a float is dumped and becomes float again via json::parse, looses precision
expected: 11.12345678..
getting: 11.1235
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Is there any way to increase precision?
The text was updated successfully, but these errors were encountered: