Absolute tolerance (-cov-relbound-abs-tol)
Specify absolute tolerance for relational boundary coverage
Since R2023b
Description
Specify a number as the value of absolute tolerance of a floating-point relational
operation. Polyspace®
Test™ uses this value for calculating the relational boundary coverage metric
involving floating-point or fixed-point noninteger types. See Relational Boundary
Coverage.
Set Option
Set the option using one of these methods:
Polyspace Platform user interface (desktop products only): In your project configuration, on the Testing & Profiling tab, select the Code Coverage node and then enter a value for this option. See
Dependenciesfor other options you must enable first.Command line: Use the option
-cov-relbound-abs-tolto specify a number. Polyspace Test accepts both decimal or scientific format. See Command-Line Information.
Why Use This Option
When calculating the relational boundary coverage of floating-point or fixed-point relational operations, Polyspace Test uses this formula to calculate the tolerance of relational boundaries:
tolerance = max(absTol, relTol* max(|lhs|,|rhs|))
absTol in this formula.Polyspace
Test uses the default value 1e-5 for absTol
if you do not specify a value.
Use this option to control the tolerance. For instance, if you are developing an application that requires more precision, you can specify a smaller absolute tolerance for the relational boundaries.
Dependencies
Specify this option only if you enable the option Enable relational boundary coverage (-cov-relbound).
Command-Line Information
The command-line workflow for setting this option depends on your workflow.
If you build your source and tests using a Polyspace Platform Project — Once you set this option in the project using the Polyspace Platform user interface, you cannot override or modify this option using the
polyspace-testcommand.If you build your sources and xUnit tests using your own toolchain — Specify this option to the
polyspace-code-profilercommand.
Parameter:-cov-relbound-abs-tol |
Default:0.01 |
Example:
polyspace-code-profiler -instrument -instrum-dir |
Example:
polyspace-code-profiler -instrument -instrum-dir |
Version History
Introduced in R2023b