5.3.52 _Q16mac Function
This function multiplies the two 32-bit inputs, x
and
y
, and accumulates the product with prod
. The
function takes care of saturating the result in case of underflow or overflow.
Include
<libq.h>
Prototype
_Q16 _Q16mac(_Q16 x, _Q16 y, _Q16
prod);
Arguments
x |
a fixed-point number in Q16 format. The value of this argument ranges from 0 to 2147483647. |
y |
a fixed-point number in Q16 format. The value of this argument ranges from 0 to 2147483647. |
prod |
a fixed-point number in Q16 format. The value of this argument ranges from 0 to 2147483647. |
Return Value
This function returns the multiplied and accumulated value
prod
in Q16 format. The value ranges from 0 to 2147483647.