rinex: allow for numerical error in version comparison - #909
rinex: allow for numerical error in version comparison#909ourairquality wants to merge 1 commit into
Conversation
|
The AI review suggests a simpler/cleaner solution would be adding a single line to readrnxh() to fix the problem upstream
|
|
Don't think that's a good solution. It's not intuitive to the reader that a float version is rounded down to the lest significant digit. Do all compilers emit code that rounds an integer multiplied by 100 to the same rounded value, and emit code that compares them to that same accuracy?? A 'snap to' integer solution would be good - the reader can understand that easily. Tried to set it up for this by using 4 decimal places in all the comparisons - so that a follow up might use an integer version scaled by 1000. |
|
OK, here's a compromise proposal, functionally equivalent to the original, but avoids comparison to imaginary versions. |
Related to #896 , allow for some floating point error when comparing the versions, and use a 4 decimal place number consistently.