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 reading arrays containing subnormal floating point values #1545

Merged
merged 1 commit into from
Jul 18, 2023

Conversation

speth
Copy link
Member

@speth speth commented Jul 17, 2023

Changes proposed in this pull request

Use our fpValue function for converting strings to double for array inputs (of any dimensionality). We were already using this function for single floating point values, mainly because it provides better error messages for badly-formatted values. It turns out that it is also more robust for handling subnormal floating point values than whatever yaml-cpp does.

If applicable, fill in the issue number this pull request is fixing

Closes #1530

If applicable, provide an example illustrating new features this pull request is introducing

Checklist

  • The pull request includes a clear description of this code change
  • Commit messages have short titles and reference relevant issues
  • Build passes (scons build & scons test) and unit tests address code coverage
  • Style & formatting of contributed code follows contributing guidelines
  • The pull request is ready for review

@speth speth added the Input Input parsing and conversion (for example, ck2yaml) label Jul 17, 2023
@codecov
Copy link

codecov bot commented Jul 18, 2023

Codecov Report

Merging #1545 (22ad8f5) into main (25e8e5c) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1545      +/-   ##
==========================================
- Coverage   70.47%   70.46%   -0.02%     
==========================================
  Files         376      379       +3     
  Lines       59081    59091      +10     
  Branches    21222    21228       +6     
==========================================
- Hits        41640    41637       -3     
- Misses      14360    14374      +14     
+ Partials     3081     3080       -1     
Impacted Files Coverage Δ
src/base/AnyMap.cpp 83.41% <100.00%> (+0.15%) ⬆️

... and 15 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@ischoegl ischoegl left a comment

Choose a reason for hiding this comment

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

Thanks for the fix, @speth!

@ischoegl ischoegl merged commit a8a1c83 into Cantera:main Jul 18, 2023
35 of 42 checks passed
@speth speth deleted the fix-1530-subnormal branch July 18, 2023 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Input Input parsing and conversion (for example, ck2yaml)
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Conversion from YAML input fails
2 participants