Consider inf/nan when validating float ranges.#3
Open
kape1395 wants to merge 1 commit intobacnet-ex:masterfrom
Open
Consider inf/nan when validating float ranges.#3kape1395 wants to merge 1 commit intobacnet-ex:masterfrom
kape1395 wants to merge 1 commit intobacnet-ex:masterfrom
Conversation
|
Thanks for the PR! I have never seen so far NaN/Inf+/Inf- for REAL properties in the wild so far, but I haven't worked with every possible BACnet device yet. :) The BACnet specification simply refers to IEEE single and double precision floating points, so non-numbers are definitely possible for all REAL properties (such as the value itself). There's no explicit statement against it. So that case would need to be handled aswell. For me the following are missing for the new function:
Once you tackle these points, I'll check it out locally and if everything is OK, I will merge it. Once again, thanks for your work and the time you put into using and improving this project. |
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.
In some cases, the min/max boundaries for floats are
:infnand:inf. These cases have to be considered.Not sure if such validation conforms to the standard.
Also, I don't know if the value itself can be inf/infn/nan. In such a case, the validation has to be adjusted further.