BlueQuartzSoftware / BlueQuartzSoftware/simplnx
ENH: Revisit Subnormal Value Handling
- Dominant language
- C++
- Stars
- 17
- Forks
- 13
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 10
Description
### Is there an existing plan for this?
- [x] I have searched the existing discussions, release notes, and documentation.
### Description of the Feature, Filter, or Functionality?
Windows implicitly handles subnormal values with the `std::sto` string conversions without erring out. Mac and Linux also convert it but return an error. When it was discussed as a group, we opted to kick the can down the road and just allow different functionality for the time being, hence the opening of this issue. Eventually, we should either block them on windows or add additional validation when an error is thrown on non-windows systems. Either option will bring more cost to runtime string conversion on at least one OS.
Notes/References:
- [Wikipedia Subnormal Values](https://en.wikipedia.org/wiki/Subnormal_number)
- Subnormal values are special because of the higher margin of error that is introduced when using them
- Regardless of the OS the `std::sto` functions can convert them, the converted value is valid in this case even if an error is thrown
- There are already C-defined macros for bounds checking to determine if a value is subnormal
### Version
7.0.x (DREAM3DNX beta)
### What section did you foresee your suggestion falling in? [Further details may be required during triage process]
Infrastructure
### High Level Steps To Implement
1. Review `StringInterpretationUtilities.hpp` (This is where the conversions occur)
2. Review `ConditionalSetvalueTest.cpp` (Running the else case of the Windows specific macro will cause failure on Windows but pass on the other two OS)
### Anything else?
_No response_
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Contributor guide
Assessment
This issue has not been assessed yet.