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

Address issue #233: Resolve floating-point JParameter stringification round-trip problems #251

Merged
merged 9 commits into from
Oct 9, 2023

Conversation

AyanRoy16
Copy link
Collaborator

Handling the precision for float and double when stringified. New specialization for float and double has been added.
[X] New test cases added.
[X] Existing test cases passed

@AyanRoy16 AyanRoy16 requested a review from nathanwbrei October 9, 2023 14:26
- The specializations of Stringify for float and double were not actually specializations. Rather they were a separate base template.
- The specializations weren't getting called by the test cases
- The specializations contained a bug where the stringstream was not cleared before new data was piped in
- The cleanest exact representation of a floating point type T comes from setprecision(std::numerics_limits<T>::max_digits10), not from setprecision(30).
These contain a logic error resulting in lots of spurious "loses equality after stringification" warnings.
We don't want fuzzy floating-point equality here anyhow -- we want all parameter values to be bit-for-bit exact.
See Issue #233 for discussion.
@nathanwbrei nathanwbrei changed the title Ayan roy16 issue #233 Address issue #233: Resolve floating-point JParameter stringification round-trip problems Oct 9, 2023
@nathanwbrei nathanwbrei merged commit d11801b into master Oct 9, 2023
3 checks passed
@nathanwbrei nathanwbrei deleted the AyanRoy16_issue_#233 branch October 9, 2023 19:25
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.

2 participants