Use floating-point multiplication to handle net slope corrections
Net slope correction computation for floating-point to fixed-point casts
Model Configuration Pane: Math and Data Types
Description
The Use floating-point multiplication to handle net slope corrections parameter specifies whether the Fixed-Point Designer™ software uses floating-point multiplication to perform net slope correction for floating-point to fixed-point casts.
Dependencies
This parameter requires a Fixed-Point Designer license.
Settings
off
(default) | on
- 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.
Recommended Settings
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | On (when target hardware supports efficient multiplication) Off (otherwise) |
Safety precaution | No recommendation |
Programmatic Use
Parameter: UseFloatMulNetSlope |
Value: 'on' | 'off' |
Default: 'off' |
Version History
Introduced in R2011b
See Also
Topics
- Floating-Point Multiplication to Handle a Net Slope Correction (Simulink Coder)
- Model Configuration Parameters: Code Generation Optimization (Simulink Coder)