embblk.divide.cordicDivide
CORDIC-based fixed-point divide with bit-exact results to Real Divide HDL Optimized and Complex Divide HDL Optimized blocks
Since R2026a
Syntax
Description
divides y = embblk.divide.cordicDivide(num,den,OutputType)num by den with the output data type
specified by OutputType using a CORDIC-based algorithm.
[___] = embblk.divide.cordicDivide(
performs the CORDIC-based division operation using the maximum shift value specified by
num,den,OutputType,maximumShiftValue)maximumShiftValue.
Note
The fixed.cordicDivide function also performs CORDIC-based fixed-point
division, but the output is not bit-exact with the Real Divide HDL
Optimized and Complex Divide HDL
Optimized blocks. The fixed.cordicDivide function uses
larger data types than the embblk.Divide.cordicDivide function,
which provides more accurate results but requires additional hardware resources and
computation time.
Examples
Input Arguments
Output Arguments
Tips
The behaviors of the Real Divide HDL Optimized and Complex Divide HDL Optimized blocks are equivalent to
[y,dbz] = embblk.divide.cordicDivide(num,den,OutputType,maximumShiftValue)
num and den are real or complex values,
respectively. If the input data type is fixed point with binary-point scaling, the function
and blocks produce bit-exact results. If the input data type is floating point, the function
and block outputs can have small numerical differences.Algorithms
References
[1] Volder, Jack E. “The CORDIC Trigonometric Computing Technique.” IRE Transactions on Electronic Computers EC-8, no. 3 (Sept. 1959): 330–334.
[2] Andraka, Ray. “A Survey of CORDIC Algorithm for FPGA Based Computers.” In Proceedings of the 1998 ACM/SIGDA Sixth International Symposium on Field Programmable Gate Arrays, 191–200. https://dl.acm.org/doi/10.1145/275107.275139.
[3] Walther, J.S. “A Unified Algorithm for Elementary Functions.” In Proceedings of the May 18-20, 1971 Spring Joint Computer Conference, 379–386. https://dl.acm.org/doi/10.1145/1478786.1478840.
[4] Schelin, Charles W. “Calculator Function Approximation.” The American Mathematical Monthly, no. 5 (May 1983): 317–325. https://doi.org/10.2307/2975781.
Extended Capabilities
Version History
Introduced in R2026a