IQMathLibrary
1.0
|
Functions to multiply two IQ numbers, returning the product in IQ format. The result is rounded and saturated, so if the product is greater than the minimum or maximum values for the given IQ format, the return value is saturated to the minimum or maximum value for the given IQ format (as appropriate).
#include <stdint.h>
#include "../support/support.h"
Functions | |
__STATIC_INLINE int_fast32_t | __IQNrsmpy (int_fast32_t iqNInput1, int_fast32_t iqNInput2, const int8_t q_value) |
Multiplies two IQN numbers, with rounding and saturation. More... | |
int32_t | _IQ31rsmpy (int32_t a, int32_t b) |
Multiplies two IQ31 numbers, with rounding and saturation. More... | |
int32_t | _IQ30rsmpy (int32_t a, int32_t b) |
Multiplies two IQ30 numbers, with rounding and saturation. More... | |
int32_t | _IQ29rsmpy (int32_t a, int32_t b) |
Multiplies two IQ29 numbers, with rounding and saturation. More... | |
int32_t | _IQ28rsmpy (int32_t a, int32_t b) |
Multiplies two IQ28 numbers, with rounding and saturation. More... | |
int32_t | _IQ27rsmpy (int32_t a, int32_t b) |
Multiplies two IQ27 numbers, with rounding and saturation. More... | |
int32_t | _IQ26rsmpy (int32_t a, int32_t b) |
Multiplies two IQ26 numbers, with rounding and saturation. More... | |
int32_t | _IQ25rsmpy (int32_t a, int32_t b) |
Multiplies two IQ25 numbers, with rounding and saturation. More... | |
int32_t | _IQ24rsmpy (int32_t a, int32_t b) |
Multiplies two IQ24 numbers, with rounding and saturation. More... | |
int32_t | _IQ23rsmpy (int32_t a, int32_t b) |
Multiplies two IQ23 numbers, with rounding and saturation. More... | |
int32_t | _IQ22rsmpy (int32_t a, int32_t b) |
Multiplies two IQ22 numbers, with rounding and saturation. More... | |
int32_t | _IQ21rsmpy (int32_t a, int32_t b) |
Multiplies two IQ21 numbers, with rounding and saturation. More... | |
int32_t | _IQ20rsmpy (int32_t a, int32_t b) |
Multiplies two IQ20 numbers, with rounding and saturation. More... | |
int32_t | _IQ19rsmpy (int32_t a, int32_t b) |
Multiplies two IQ19 numbers, with rounding and saturation. More... | |
int32_t | _IQ18rsmpy (int32_t a, int32_t b) |
Multiplies two IQ18 numbers, with rounding and saturation. More... | |
int32_t | _IQ17rsmpy (int32_t a, int32_t b) |
Multiplies two IQ17 numbers, with rounding and saturation. More... | |
int32_t | _IQ16rsmpy (int32_t a, int32_t b) |
Multiplies two IQ16 numbers, with rounding and saturation. More... | |
int32_t | _IQ15rsmpy (int32_t a, int32_t b) |
Multiplies two IQ15 numbers, with rounding and saturation. More... | |
int32_t | _IQ14rsmpy (int32_t a, int32_t b) |
Multiplies two IQ14 numbers, with rounding and saturation. More... | |
int32_t | _IQ13rsmpy (int32_t a, int32_t b) |
Multiplies two IQ13 numbers, with rounding and saturation. More... | |
int32_t | _IQ12rsmpy (int32_t a, int32_t b) |
Multiplies two IQ12 numbers, with rounding and saturation. More... | |
int32_t | _IQ11rsmpy (int32_t a, int32_t b) |
Multiplies two IQ11 numbers, with rounding and saturation. More... | |
int32_t | _IQ10rsmpy (int32_t a, int32_t b) |
Multiplies two IQ10 numbers, with rounding and saturation. More... | |
int32_t | _IQ9rsmpy (int32_t a, int32_t b) |
Multiplies two IQ9 numbers, with rounding and saturation. More... | |
int32_t | _IQ8rsmpy (int32_t a, int32_t b) |
Multiplies two IQ8 numbers, with rounding and saturation. More... | |
int32_t | _IQ7rsmpy (int32_t a, int32_t b) |
Multiplies two IQ7 numbers, with rounding and saturation. More... | |
int32_t | _IQ6rsmpy (int32_t a, int32_t b) |
Multiplies two IQ6 numbers, with rounding and saturation. More... | |
int32_t | _IQ5rsmpy (int32_t a, int32_t b) |
Multiplies two IQ5 numbers, with rounding and saturation. More... | |
int32_t | _IQ4rsmpy (int32_t a, int32_t b) |
Multiplies two IQ4 numbers, with rounding and saturation. More... | |
int32_t | _IQ3rsmpy (int32_t a, int32_t b) |
Multiplies two IQ3 numbers, with rounding and saturation. More... | |
int32_t | _IQ2rsmpy (int32_t a, int32_t b) |
Multiplies two IQ2 numbers, with rounding and saturation. More... | |
int32_t | _IQ1rsmpy (int32_t a, int32_t b) |
Multiplies two IQ1 numbers, with rounding and saturation. More... | |
__STATIC_INLINE int_fast32_t __IQNrsmpy | ( | int_fast32_t | iqNInput1, |
int_fast32_t | iqNInput2, | ||
const int8_t | q_value | ||
) |
Multiplies two IQN numbers, with rounding and saturation.
iqNInput1 | IQN type value input to be multiplied. |
iqNInput2 | IQN type value input to be multiplied. |
q_value | IQ format for result. |
Referenced by _IQ10rsmpy(), _IQ11rsmpy(), _IQ12rsmpy(), _IQ13rsmpy(), _IQ14rsmpy(), _IQ15rsmpy(), _IQ16rsmpy(), _IQ17rsmpy(), _IQ18rsmpy(), _IQ19rsmpy(), _IQ1rsmpy(), _IQ20rsmpy(), _IQ21rsmpy(), _IQ22rsmpy(), _IQ23rsmpy(), _IQ24rsmpy(), _IQ25rsmpy(), _IQ26rsmpy(), _IQ27rsmpy(), _IQ28rsmpy(), _IQ29rsmpy(), _IQ2rsmpy(), _IQ30rsmpy(), _IQ31rsmpy(), _IQ3rsmpy(), _IQ4rsmpy(), _IQ5rsmpy(), _IQ6rsmpy(), _IQ7rsmpy(), _IQ8rsmpy(), and _IQ9rsmpy().
int32_t _IQ31rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ31 numbers, with rounding and saturation.
a | IQ31 type value input to be multiplied. |
b | IQ31 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ30rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ30 numbers, with rounding and saturation.
a | IQ30 type value input to be multiplied. |
b | IQ30 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ29rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ29 numbers, with rounding and saturation.
a | IQ29 type value input to be multiplied. |
b | IQ29 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ28rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ28 numbers, with rounding and saturation.
a | IQ28 type value input to be multiplied. |
b | IQ28 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ27rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ27 numbers, with rounding and saturation.
a | IQ27 type value input to be multiplied. |
b | IQ27 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ26rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ26 numbers, with rounding and saturation.
a | IQ26 type value input to be multiplied. |
b | IQ26 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ25rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ25 numbers, with rounding and saturation.
a | IQ25 type value input to be multiplied. |
b | IQ25 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ24rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ24 numbers, with rounding and saturation.
a | IQ24 type value input to be multiplied. |
b | IQ24 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ23rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ23 numbers, with rounding and saturation.
a | IQ23 type value input to be multiplied. |
b | IQ23 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ22rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ22 numbers, with rounding and saturation.
a | IQ22 type value input to be multiplied. |
b | IQ22 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ21rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ21 numbers, with rounding and saturation.
a | IQ21 type value input to be multiplied. |
b | IQ21 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ20rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ20 numbers, with rounding and saturation.
a | IQ20 type value input to be multiplied. |
b | IQ20 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ19rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ19 numbers, with rounding and saturation.
a | IQ19 type value input to be multiplied. |
b | IQ19 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ18rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ18 numbers, with rounding and saturation.
a | IQ18 type value input to be multiplied. |
b | IQ18 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ17rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ17 numbers, with rounding and saturation.
a | IQ17 type value input to be multiplied. |
b | IQ17 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ16rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ16 numbers, with rounding and saturation.
a | IQ16 type value input to be multiplied. |
b | IQ16 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ15rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ15 numbers, with rounding and saturation.
a | IQ15 type value input to be multiplied. |
b | IQ15 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ14rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ14 numbers, with rounding and saturation.
a | IQ14 type value input to be multiplied. |
b | IQ14 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ13rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ13 numbers, with rounding and saturation.
a | IQ13 type value input to be multiplied. |
b | IQ13 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ12rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ12 numbers, with rounding and saturation.
a | IQ12 type value input to be multiplied. |
b | IQ12 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ11rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ11 numbers, with rounding and saturation.
a | IQ11 type value input to be multiplied. |
b | IQ11 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ10rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ10 numbers, with rounding and saturation.
a | IQ10 type value input to be multiplied. |
b | IQ10 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ9rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ9 numbers, with rounding and saturation.
a | IQ9 type value input to be multiplied. |
b | IQ9 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ8rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ8 numbers, with rounding and saturation.
a | IQ8 type value input to be multiplied. |
b | IQ8 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ7rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ7 numbers, with rounding and saturation.
a | IQ7 type value input to be multiplied. |
b | IQ7 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ6rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ6 numbers, with rounding and saturation.
a | IQ6 type value input to be multiplied. |
b | IQ6 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ5rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ5 numbers, with rounding and saturation.
a | IQ5 type value input to be multiplied. |
b | IQ5 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ4rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ4 numbers, with rounding and saturation.
a | IQ4 type value input to be multiplied. |
b | IQ4 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ3rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ3 numbers, with rounding and saturation.
a | IQ3 type value input to be multiplied. |
b | IQ3 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ2rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ2 numbers, with rounding and saturation.
a | IQ2 type value input to be multiplied. |
b | IQ2 type value input to be multiplied. |
References __IQNrsmpy().
int32_t _IQ1rsmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiplies two IQ1 numbers, with rounding and saturation.
a | IQ1 type value input to be multiplied. |
b | IQ1 type value input to be multiplied. |
References __IQNrsmpy().