{{ message }}
fixed #13606/#13607 - consistently print (precise) float as such in ValueFlow debug output#7274
Merged
firewave merged 3 commits intoFeb 13, 2025
Merged
Conversation
Collaborator
Author
|
Okay. This appears to be a bit of a mess. #include <iostream>
#include <string>
void print(double d)
{
std::cout << std::to_string(d) << std::endl;
printf("%f\n", d);
std::cout << d << std::endl;
printf("%e\n", d);
printf("%g\n", d);
}
int main()
{
double d = 0.0000001;
print(d);
d = 1 / 0.5;
std::cout << std::endl;
print(d);
}https://godbolt.org/z/PK7MrYqbP
|
Sorry, something went wrong.
1d3c4fa to
9c3c9af
Compare
February 1, 2025 19:22
This comment was marked as outdated.
This comment was marked as outdated.
9c3c9af to
81252fe
Compare
February 4, 2025 13:49
This comment was marked as resolved.
This comment was marked as resolved.
ca7d387 to
1ee82af
Compare
February 6, 2025 01:47
Collaborator
Author
|
We should probably also add some unit tests testing this. |
Sorry, something went wrong.
789622e to
4e4997c
Compare
February 6, 2025 02:15
danmar
approved these changes
Feb 13, 2025
4e4997c to
5727559
Compare
February 13, 2025 15:01
5727559 to
f12a872
Compare
February 13, 2025 15:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.
No description provided.