IQMathLibrary
1.0
|
Functions to multiply two IQ numbers, returning the product in IQ format. The result is rounded but not saturated, so if the product is greater than the minimum or maximum values for the given IQ format, the return value wraps around and produces inaccurate results.
#include <stdint.h>
#include "../support/support.h"
Functions | |
__STATIC_INLINE int_fast32_t | __IQNrmpy (int_fast32_t iqNInput1, int_fast32_t iqNInput2, const int8_t q_value) |
Multiply two values of IQN type, with rounding. More... | |
int32_t | _IQ31rmpy (int32_t a, int32_t b) |
Multiply two values of IQ31 type, with rounding. More... | |
int32_t | _IQ30rmpy (int32_t a, int32_t b) |
Multiply two values of IQ30 type, with rounding. More... | |
int32_t | _IQ29rmpy (int32_t a, int32_t b) |
Multiply two values of IQ29 type, with rounding. More... | |
int32_t | _IQ28rmpy (int32_t a, int32_t b) |
Multiply two values of IQ28 type, with rounding. More... | |
int32_t | _IQ27rmpy (int32_t a, int32_t b) |
Multiply two values of IQ27 type, with rounding. More... | |
int32_t | _IQ26rmpy (int32_t a, int32_t b) |
Multiply two values of IQ26 type, with rounding. More... | |
int32_t | _IQ25rmpy (int32_t a, int32_t b) |
Multiply two values of IQ25 type, with rounding. More... | |
int32_t | _IQ24rmpy (int32_t a, int32_t b) |
Multiply two values of IQ24 type, with rounding. More... | |
int32_t | _IQ23rmpy (int32_t a, int32_t b) |
Multiply two values of IQ23 type, with rounding. More... | |
int32_t | _IQ22rmpy (int32_t a, int32_t b) |
Multiply two values of IQ22 type, with rounding. More... | |
int32_t | _IQ21rmpy (int32_t a, int32_t b) |
Multiply two values of IQ21 type, with rounding. More... | |
int32_t | _IQ20rmpy (int32_t a, int32_t b) |
Multiply two values of IQ20 type, with rounding. More... | |
int32_t | _IQ19rmpy (int32_t a, int32_t b) |
Multiply two values of IQ19 type, with rounding. More... | |
int32_t | _IQ18rmpy (int32_t a, int32_t b) |
Multiply two values of IQ18 type, with rounding. More... | |
int32_t | _IQ17rmpy (int32_t a, int32_t b) |
Multiply two values of IQ17 type, with rounding. More... | |
int32_t | _IQ16rmpy (int32_t a, int32_t b) |
Multiply two values of IQ16 type, with rounding. More... | |
int32_t | _IQ15rmpy (int32_t a, int32_t b) |
Multiply two values of IQ15 type, with rounding. More... | |
int32_t | _IQ14rmpy (int32_t a, int32_t b) |
Multiply two values of IQ14 type, with rounding. More... | |
int32_t | _IQ13rmpy (int32_t a, int32_t b) |
Multiply two values of IQ13 type, with rounding. More... | |
int32_t | _IQ12rmpy (int32_t a, int32_t b) |
Multiply two values of IQ12 type, with rounding. More... | |
int32_t | _IQ11rmpy (int32_t a, int32_t b) |
Multiply two values of IQ11 type, with rounding. More... | |
int32_t | _IQ10rmpy (int32_t a, int32_t b) |
Multiply two values of IQ10 type, with rounding. More... | |
int32_t | _IQ9rmpy (int32_t a, int32_t b) |
Multiply two values of IQ9 type, with rounding. More... | |
int32_t | _IQ8rmpy (int32_t a, int32_t b) |
Multiply two values of IQ8 type, with rounding. More... | |
int32_t | _IQ7rmpy (int32_t a, int32_t b) |
Multiply two values of IQ7 type, with rounding. More... | |
int32_t | _IQ6rmpy (int32_t a, int32_t b) |
Multiply two values of IQ6 type, with rounding. More... | |
int32_t | _IQ5rmpy (int32_t a, int32_t b) |
Multiply two values of IQ5 type, with rounding. More... | |
int32_t | _IQ4rmpy (int32_t a, int32_t b) |
Multiply two values of IQ4 type, with rounding. More... | |
int32_t | _IQ3rmpy (int32_t a, int32_t b) |
Multiply two values of IQ3 type, with rounding. More... | |
int32_t | _IQ2rmpy (int32_t a, int32_t b) |
Multiply two values of IQ2 type, with rounding. More... | |
int32_t | _IQ1rmpy (int32_t a, int32_t b) |
Multiply two values of IQ1 type, with rounding. More... | |
__STATIC_INLINE int_fast32_t __IQNrmpy | ( | int_fast32_t | iqNInput1, |
int_fast32_t | iqNInput2, | ||
const int8_t | q_value | ||
) |
Multiply two values of IQN type, with rounding.
iqNInput1 | IQN type value input to be multiplied. |
iqNInput2 | IQN type value input to be multiplied. |
q_value | IQ format for result. |
Referenced by _IQ10rmpy(), _IQ11rmpy(), _IQ12rmpy(), _IQ13rmpy(), _IQ14rmpy(), _IQ15rmpy(), _IQ16rmpy(), _IQ17rmpy(), _IQ18rmpy(), _IQ19rmpy(), _IQ1rmpy(), _IQ20rmpy(), _IQ21rmpy(), _IQ22rmpy(), _IQ23rmpy(), _IQ24rmpy(), _IQ25rmpy(), _IQ26rmpy(), _IQ27rmpy(), _IQ28rmpy(), _IQ29rmpy(), _IQ2rmpy(), _IQ30rmpy(), _IQ31rmpy(), _IQ3rmpy(), _IQ4rmpy(), _IQ5rmpy(), _IQ6rmpy(), _IQ7rmpy(), _IQ8rmpy(), and _IQ9rmpy().
int32_t _IQ31rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ31 type, with rounding.
a | IQ31 type value input to be multiplied. |
b | IQ31 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ30rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ30 type, with rounding.
a | IQ30 type value input to be multiplied. |
b | IQ30 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ29rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ29 type, with rounding.
a | IQ29 type value input to be multiplied. |
b | IQ29 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ28rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ28 type, with rounding.
a | IQ28 type value input to be multiplied. |
b | IQ28 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ27rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ27 type, with rounding.
a | IQ27 type value input to be multiplied. |
b | IQ27 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ26rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ26 type, with rounding.
a | IQ26 type value input to be multiplied. |
b | IQ26 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ25rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ25 type, with rounding.
a | IQ25 type value input to be multiplied. |
b | IQ25 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ24rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ24 type, with rounding.
a | IQ24 type value input to be multiplied. |
b | IQ24 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ23rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ23 type, with rounding.
a | IQ23 type value input to be multiplied. |
b | IQ23 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ22rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ22 type, with rounding.
a | IQ22 type value input to be multiplied. |
b | IQ22 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ21rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ21 type, with rounding.
a | IQ21 type value input to be multiplied. |
b | IQ21 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ20rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ20 type, with rounding.
a | IQ20 type value input to be multiplied. |
b | IQ20 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ19rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ19 type, with rounding.
a | IQ19 type value input to be multiplied. |
b | IQ19 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ18rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ18 type, with rounding.
a | IQ18 type value input to be multiplied. |
b | IQ18 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ17rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ17 type, with rounding.
a | IQ17 type value input to be multiplied. |
b | IQ17 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ16rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ16 type, with rounding.
a | IQ16 type value input to be multiplied. |
b | IQ16 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ15rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ15 type, with rounding.
a | IQ15 type value input to be multiplied. |
b | IQ15 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ14rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ14 type, with rounding.
a | IQ14 type value input to be multiplied. |
b | IQ14 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ13rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ13 type, with rounding.
a | IQ13 type value input to be multiplied. |
b | IQ13 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ12rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ12 type, with rounding.
a | IQ12 type value input to be multiplied. |
b | IQ12 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ11rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ11 type, with rounding.
a | IQ11 type value input to be multiplied. |
b | IQ11 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ10rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ10 type, with rounding.
a | IQ10 type value input to be multiplied. |
b | IQ10 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ9rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ9 type, with rounding.
a | IQ9 type value input to be multiplied. |
b | IQ9 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ8rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ8 type, with rounding.
a | IQ8 type value input to be multiplied. |
b | IQ8 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ7rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ7 type, with rounding.
a | IQ7 type value input to be multiplied. |
b | IQ7 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ6rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ6 type, with rounding.
a | IQ6 type value input to be multiplied. |
b | IQ6 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ5rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ5 type, with rounding.
a | IQ5 type value input to be multiplied. |
b | IQ5 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ4rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ4 type, with rounding.
a | IQ4 type value input to be multiplied. |
b | IQ4 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ3rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ3 type, with rounding.
a | IQ3 type value input to be multiplied. |
b | IQ3 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ2rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ2 type, with rounding.
a | IQ2 type value input to be multiplied. |
b | IQ2 type value input to be multiplied. |
References __IQNrmpy().
int32_t _IQ1rmpy | ( | int32_t | a, |
int32_t | b | ||
) |
Multiply two values of IQ1 type, with rounding.
a | IQ1 type value input to be multiplied. |
b | IQ1 type value input to be multiplied. |
References __IQNrmpy().