Treat INF as std::numeric_limits<double>::infinity() in Double#1738
Merged
Treat INF as std::numeric_limits<double>::infinity() in Double#1738
INF as std::numeric_limits<double>::infinity() in Double#1738Conversation
Checklist for reviewers ☑️All references to "You" in the following text refer to the code reviewer.
|
Failure optional scenariosNote This is an experimental check and does not block merging the pull-request. scenario failed: execution_time_test <failure type="SimulationFailure" message="CustomCommandAction typed "exitFailure" was triggered by the named Conditions {"update time checker", "avoid startup"}: {"update time checker": Is the /simulation/interpreter/execution_time/update (= 0.014538999999999999840349929059) is greaterThan 0.005?}, {"avoid startup": Is the simulation time (= 10.150000000000009237055564881302) is greaterThan 1.000000000000000000000000000000?}" /> |
|
yamacir-kit
approved these changes
Dec 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Abstract
Previously,
INFis parsed asstd::numeric_limits<double>::max()inopenscenario_interpreter::Double.But in this pull-request, I treat
INFasstd::numeric_limits<double>::infinity().Background
In some use cases, I want to check if the value parsed by
openscenario_interpreter::Doubleis inifinity usingstd::isinf.Details
a bug fix to read
-INFas positive infinityDue to a mistake in the regular expression, there was a bug where
-INFwas interpreted as positive infinity.This bug was discovered while adding unit tests, and the tests warranted a fix.
References
Regression Test: OK
Destructive Changes
The parsed result of
INFin scenarios are changed.From a comparative perspective, there is no difference.
Known Limitations
None