SWCU195A December 2024 – May 2025 CC2744R7-Q1 , CC2745P10-Q1 , CC2745R10-Q1 , CC2745R7-Q1 , CC2755R10
Data is represented as two consecutive 32-bit floating point numbers using IEEE 754 format. In order to represent a complex number, one 32-bit floating point value is used to represent the imaginary part, and another 32-bit floating point value is used to represent the real part of the complex number. Thus 64 bits are used to represent an entire complex number value. Complex numbers can be stored in either Cartesian or polar representation as shown in the table below.
In Cartesian representation a complex number is stored as two real numbers, with bits 63:32 being the imaginary part and bits 31:0 the real part.
In polar representation, a complex number is stored as two real numbers, where bits 63:32 are the phase (theta) and bits 31:0 the magnitude (r). In both representations, a 64 bit number can be used to indicate a real number simply by making the upper 32-bits (imaginary part) all zero.
Bits 63:32 |
Bits 31:0 |
|
|---|---|---|
Cartesian |
imag(x) |
real(x) |
Polar |
theta(x) |
r(x) |
The APU will not automatically handle number representation conversions. One must make sure that the proper conversions are employed before operating on complex numbers stored using different representations. In other words, adding two numbers where one number is stored in Cartesian format and the other number is in Polar format, produces wrong results.