IQMathLibrary
1.0
|
Functions to multiply two IQ numbers in different IQ formats, returning the product in a third IQ format. The result is neither rounded nor saturated, so if the product is greater than the minimum or maximum values for the given output IQ format, the return value will wrap around and produce inaccurate results.
#include <stdint.h>
#include "../support/support.h"
#include "_IQNtables.h"
Functions | |
__STATIC_INLINE int_fast32_t | __IQNmpyIQX (int_fast32_t a, int n1, int_fast32_t b, int n2, int8_t q_value) |
Multiply two IQ numbers in different IQ formats, returning the product in a third IQ format. More... | |
int32_t | _IQ30mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ30 format. More... | |
int32_t | _IQ29mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ29 format. More... | |
int32_t | _IQ28mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ28 format. More... | |
int32_t | _IQ27mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ27 format. More... | |
int32_t | _IQ26mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ26 format. More... | |
int32_t | _IQ25mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ25 format. More... | |
int32_t | _IQ24mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ24 format. More... | |
int32_t | _IQ23mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ23 format. More... | |
int32_t | _IQ22mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ22 format. More... | |
int32_t | _IQ21mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ21 format. More... | |
int32_t | _IQ20mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ20 format. More... | |
int32_t | _IQ19mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ19 format. More... | |
int32_t | _IQ18mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ18 format. More... | |
int32_t | _IQ17mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ17 format. More... | |
int32_t | _IQ16mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ16 format. More... | |
int32_t | _IQ15mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ15 format. More... | |
int32_t | _IQ14mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ14 format. More... | |
int32_t | _IQ13mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ13 format. More... | |
int32_t | _IQ12mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ12 format. More... | |
int32_t | _IQ11mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ11 format. More... | |
int32_t | _IQ10mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ10 format. More... | |
int32_t | _IQ9mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ9 format. More... | |
int32_t | _IQ8mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ8 format. More... | |
int32_t | _IQ7mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ7 format. More... | |
int32_t | _IQ6mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ6 format. More... | |
int32_t | _IQ5mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ5 format. More... | |
int32_t | _IQ4mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ4 format. More... | |
int32_t | _IQ3mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ3 format. More... | |
int32_t | _IQ2mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ2 format. More... | |
int32_t | _IQ1mpyIQX (int32_t a, int n1, int32_t b, int n2) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ1 format. More... | |
__STATIC_INLINE int_fast32_t __IQNmpyIQX | ( | int_fast32_t | a, |
int | n1, | ||
int_fast32_t | b, | ||
int | n2, | ||
int8_t | q_value | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in a third IQ format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
q_value | IQ format for result. |
Referenced by _IQ10mpyIQX(), _IQ11mpyIQX(), _IQ12mpyIQX(), _IQ13mpyIQX(), _IQ14mpyIQX(), _IQ15mpyIQX(), _IQ16mpyIQX(), _IQ17mpyIQX(), _IQ18mpyIQX(), _IQ19mpyIQX(), _IQ1mpyIQX(), _IQ20mpyIQX(), _IQ21mpyIQX(), _IQ22mpyIQX(), _IQ23mpyIQX(), _IQ24mpyIQX(), _IQ25mpyIQX(), _IQ26mpyIQX(), _IQ27mpyIQX(), _IQ28mpyIQX(), _IQ29mpyIQX(), _IQ2mpyIQX(), _IQ30mpyIQX(), _IQ3mpyIQX(), _IQ4mpyIQX(), _IQ5mpyIQX(), _IQ6mpyIQX(), _IQ7mpyIQX(), _IQ8mpyIQX(), and _IQ9mpyIQX().
int32_t _IQ30mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ30 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().
int32_t _IQ29mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ29 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().
int32_t _IQ28mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ28 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().
int32_t _IQ27mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ27 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().
int32_t _IQ26mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ26 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().
int32_t _IQ25mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ25 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().
int32_t _IQ24mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ24 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().
int32_t _IQ23mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ23 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().
int32_t _IQ22mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ22 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().
int32_t _IQ21mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ21 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().
int32_t _IQ20mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ20 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().
int32_t _IQ19mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ19 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().
int32_t _IQ18mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ18 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().
int32_t _IQ17mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ17 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().
int32_t _IQ16mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ16 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().
int32_t _IQ15mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ15 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().
int32_t _IQ14mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ14 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().
int32_t _IQ13mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ13 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().
int32_t _IQ12mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ12 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().
int32_t _IQ11mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ11 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().
int32_t _IQ10mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ10 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().
int32_t _IQ9mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ9 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().
int32_t _IQ8mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ8 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().
int32_t _IQ7mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ7 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().
int32_t _IQ6mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ6 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().
int32_t _IQ5mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ5 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().
int32_t _IQ4mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ4 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().
int32_t _IQ3mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ3 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().
int32_t _IQ2mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ2 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().
int32_t _IQ1mpyIQX | ( | int32_t | a, |
int | n1, | ||
int32_t | b, | ||
int | n2 | ||
) |
Multiply two IQ numbers in different IQ formats, returning the product in IQ1 format.
a | IQN1 type value input to be multiplied. |
n1 | IQ format for first value. |
b | IQN2 type value input to be multiplied. |
n2 | IQ format for second value. |
References __IQNmpyIQX().