Check comparison of floating point types in Simulink
Guideline: jc_0800: Comparing floating-point types in Simulink®
Checks if equivalence comparison is done on floating-point numbers.
This check applies to the following blocks:
Compare To Zero
Compare To Constant
This check requires a Simulink Check™ license.
This check does not include sub-checks because the MAB modeling guideline provides only one sub ID.
For reference, the MAB guideline sub ID(s) that are recommended for use by the NA-MAAB and JMAAB modeling standards organizations are:
NA-MAAB — a
JMAAB — a
Results and Recommended Actions
|One or more instances of equivalence comparison for floating-point numbers is observed.
|Make sure to avoid the use of equivalence comparisons for floating-point numbers.
Capabilities and Limitations
Does not run on library models.
Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to
Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to
Allows exclusions of blocks and charts.