Skip to content
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

fix: minimize the precision loss when dumping double to string #712

Merged

Conversation

junekhan
Copy link
Contributor

This PR fixes #711

include/crow/json.h Outdated Show resolved Hide resolved
include/crow/json.h Outdated Show resolved Hide resolved
include/crow/json.h Outdated Show resolved Hide resolved
include/crow/json.h Outdated Show resolved Hide resolved
Copy link
Member

@gittiver gittiver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments

@gittiver gittiver linked an issue Jan 21, 2024 that may be closed by this pull request
include/crow/json.h Outdated Show resolved Hide resolved
include/crow/json.h Outdated Show resolved Hide resolved
@gittiver
Copy link
Member

a unit test on the template tests fails - it expect exact values not something with epsilon.
Needs to be adressed before merging the PR.

Copy link
Member

@gittiver gittiver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unittest template_tests fails.

gittiver

This comment was marked as duplicate.

@junekhan
Copy link
Contributor Author

junekhan commented Jan 24, 2024

a unit test on the template tests fails - it expect exact values not something with epsilon. Needs to be adressed before merging the PR.

Yes, I've made a patch for that, and the scope becomes much bigger. Please have a careful check to help me ensure the changes. BTW, some of the unit tests cannot run properly on my machine, so I have to resort to this github action. Thanks.

@gittiver gittiver merged commit 973d5fa into CrowCpp:master Jan 29, 2024
6 checks passed
gittiver added a commit that referenced this pull request Feb 21, 2024
* master:
  fix: call after_handlers for legitimate requests without body part
  Handle _CROW_ILL or _CROW_ICD being NOTFOUND
  small explanations in the example on using CORS middleware in Crow v1.0
  Use const std::string& as argument to route() (#684)
  fix: minimize the precision loss when dumping double to string (#712)
  package format changed to zip, version set to >1.1.0 (first release)
  Fix #754 (#755)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dumping double value to string can cause a precision loss The Decimal Digit Problem of Double Type in wvalue
2 participants