1.4.4.31 libq_q15_DivisionWithSaturation_q15_q15 Function
Fractional division with saturation.
Description
Function libq_q15_DivisionWithSaturation_q15_q15():
Performs fractional division with saturation. There are three restrictions that the calling code must satisfy.
Both the numerator and denominator must be positive.
In order to obtain a non-saturated result, the numerator must be LESS than or equal to the denominator.
The denominator must not equal zero.
If num equals den, then the result equals MAXINT16.
This function relates to the ETSI div_s function.
Parameters
q15 num 16-bit fractional numerator
q15 den 16-bit fractional denumerator
Returns
q15 result - ratio a/b in 16-bit fractional format
C
q15 libq_q15_DivisionWithSaturation_q15_q15 (q15, q15);