Main Content

Detect precision loss


Select the diagnostic action to take when Simulink® detects parameter precision loss.

Category: Diagnostics


Default: warning


Simulink software takes no action.


Simulink software displays a warning.


Simulink software terminates the simulation and displays an error message.


  • Precision loss occurs when Simulink software encounters a parameter whose data type does not have enough precision to represent the parameter's value exactly. As a result, the modeled value differs from the ideal value.

  • Parameter precision loss differs from parameter overflow, which occurs when the range of the parameter's data type, i.e., that maximum value that it can represent, is smaller than the ideal value of the parameter.

  • Both parameter overflow and precision loss are quantization errors, and the distinction between them can be a fine one. The Detect Parameter overflow diagnostic reports all parameter quantization errors greater than one bit. For very small parameter quantization errors, precision loss will be reported rather than an overflow when



    • Max is the maximum value representable by the parameter data type.

    • Min is the minimum value representable by the parameter data type.

    • Slope is the slope of the parameter data type (slope = 1 for integers).

    • Videal is the full-precision, ideal value of the parameter.

Command-Line Information

Parameter: ParameterPrecisionLossMsg
Value: 'none' | 'warning' | 'error'
Default: 'warning'

Recommended Settings

DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionerror

Related Topics