Main Content

32-bit integer to single precision float conversion

Description

Select the diagnostic action to take if Simulink® software detects a 32-bit integer value was converted to a floating-point value.

Category: Diagnostics

Settings

Default: warning

none

Simulink software takes no action.

warning

Simulink software displays a warning.

Tip

Converting a 32-bit integer value to a floating-point value can result in a loss of precision. See Working with Data Types for more information.

Limitations

  • The software only detects parameter conversions and not signal conversions.

  • The software only detects conversions during code generation and not simulation.

Command-Line Information

Parameter: Int32ToFloatConvMsg
Value: 'none' | 'warning'
Default: 'warning'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionwarning

Related Topics