Detect underflow
Diagnostic action to take if the software detects parameter underflow
Model Configuration Pane: Diagnostics / Data Validity
Description
The Detect underflow parameter specifies the diagnostic action to take if the software detects a parameter underflow. Parameter underflow occurs when the data type of a parameter does not have enough precision to represent the ideal value of the parameter because the ideal value is too small. When parameter underflow occurs, casting the ideal nonzero value to the parameter data type causes the parameter value to become zero.
Parameter underflow can occur for any data type, including floating-point, fixed-point,
and integer data types. For example, the ideal value 1e-46
quantizes to
zero for the single
data type, half
data type, all
integer data types, and most commonly used fixed-point data types.
When parameter underflow occurs, the absolute quantization error is small relative to the precision of the data type, but the relative quantization error is 100%. Depending on how your algorithm uses the parameter value, the effect of parameter underflow can be significant. For example, the effect of a 100% relative quantization error due to parameter underflow can be significant if the parameter is used directly in multiplication or division.
Settings
none
(default) | warning
| error
error
The software issues an error and terminates the simulation if the software detects a parameter underflow.
warning
The software issues a warning if the software detects a parameter underflow.
none
The software does not issue a diagnostic if the software detects a parameter underflow.
Recommended Settings
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | No impact |
Safety precaution | error |
Programmatic Use
Parameter:
ParameterUnderflowMsg |
Value:
"none" | "warning" |
"error" |
Default:
"none" |
Version History
Introduced in R2006a