Use floating-point multiplication to handle net slope corrections
Description
The Fixed-Point Designer™ software uses floating-point multiplication to perform net slope correction for floating-point to fixed-point casts.
Category: Math and Data Types
Settings
Default: Off
On
Use floating-point multiplication to perform net slope correction for floating-point to fixed-point casts.
Off
Use division to perform net slope correction for floating-point to fixed-point casts.
Tips
This optimization affects both simulation and code generation.
When converting from floating point to fixed point, if the net slope is not a power of two, slope correction using division improves precision. For some processors, use of multiplication improves code efficiency.
Dependencies
This parameter requires a Fixed-Point Designer license.
Command-Line Information
Parameter:
UseFloatMulNetSlope |
Value:
'on' | 'off' |
Default:
'off' |
Recommended Settings
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | On (when target hardware supports efficient multiplication)
Off (otherwise) |
Safety precaution | No recommendation |
Related Topics
- Floating-Point Multiplication to Handle a Net Slope Correction (Simulink Coder)
- Model Configuration Parameters: Code Generation Optimization (Simulink Coder)