Main Content

Remove code that protects against division arithmetic exceptions

Control generation of protective code for division arithmetic exceptions

Model Configuration Pane: Code Generation / Optimization

Description

The Remove code that protects against division arithmetic exceptions parameter specifies whether to remove code that guards against division by zero and INT_MIN/-1 operations for integers and fixed-point data.

Settings

off (default) | on
On

Does not generate code that guards against division by zero and INT_MIN/-1 operations for integers and fixed-point data. To retain bit-true agreement between simulation results and results from generated code, check that your model does not produce division by zero or INT_MIN/-1 operations, where the quotient cannot be represented in the data type.

Off

Generates code that guards against division by zero and INT_MIN/-1 operations for integers and fixed-point data.

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyOn (execution, ROM)
Safety precautionOff

Programmatic Use

Parameter: NoFixptDivByZeroProtection
Type: character vector
Value: 'on' | 'off'
Default: 'off'

Version History

Introduced in R2006a