Main Content

Detect precision loss

Diagnostic action to take when fixed-point constant precision loss occurs

Model Configuration Pane: Diagnostics / Type Conversion

Description

The Detect precision loss parameter specifies the diagnostic action to take when a fixed-point constant precision loss occurs during simulation.

Dependencies

This parameter requires a Fixed-Point Designer™ license.

Settings

none (default) | warning | error
none

Simulink® software takes no action.

warning

Simulink software displays a warning.

error

Simulink software terminates the simulation and displays an error message.

Tips

  • This diagnostic applies only to fixed-point constants (net slope and net bias).

  • Precision loss occurs when Simulink software converts a fixed-point constant to a data type which does not have enough precision to represent the exact value of the constant. As a result, the quantized value differs from the ideal value.

  • Fixed-point constant precision loss differs from fixed-point constant overflow. Overflow occurs when the range of the parameter's data type, that is, the maximum value that it can represent, is smaller than the ideal value of the parameter.

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Programmatic Use

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

Version History

Introduced in R2010b