IQMathLibrary  1.0
Functions
_IQNrsmpy.c File Reference

Detailed Description

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"
Include dependency graph for _IQNrsmpy.c:

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...
 

Function Documentation

§ __IQNrsmpy()

__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.

Parameters
iqNInput1IQN type value input to be multiplied.
iqNInput2IQN type value input to be multiplied.
q_valueIQ format for result.
Returns
IQN type result of the multiplication.

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().

§ _IQ31rsmpy()

int32_t _IQ31rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ31 numbers, with rounding and saturation.

Parameters
aIQ31 type value input to be multiplied.
bIQ31 type value input to be multiplied.
Returns
IQ31 type result of the multiplication.

References __IQNrsmpy().

§ _IQ30rsmpy()

int32_t _IQ30rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ30 numbers, with rounding and saturation.

Parameters
aIQ30 type value input to be multiplied.
bIQ30 type value input to be multiplied.
Returns
IQ30 type result of the multiplication.

References __IQNrsmpy().

§ _IQ29rsmpy()

int32_t _IQ29rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ29 numbers, with rounding and saturation.

Parameters
aIQ29 type value input to be multiplied.
bIQ29 type value input to be multiplied.
Returns
IQ29 type result of the multiplication.

References __IQNrsmpy().

§ _IQ28rsmpy()

int32_t _IQ28rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ28 numbers, with rounding and saturation.

Parameters
aIQ28 type value input to be multiplied.
bIQ28 type value input to be multiplied.
Returns
IQ28 type result of the multiplication.

References __IQNrsmpy().

§ _IQ27rsmpy()

int32_t _IQ27rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ27 numbers, with rounding and saturation.

Parameters
aIQ27 type value input to be multiplied.
bIQ27 type value input to be multiplied.
Returns
IQ27 type result of the multiplication.

References __IQNrsmpy().

§ _IQ26rsmpy()

int32_t _IQ26rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ26 numbers, with rounding and saturation.

Parameters
aIQ26 type value input to be multiplied.
bIQ26 type value input to be multiplied.
Returns
IQ26 type result of the multiplication.

References __IQNrsmpy().

§ _IQ25rsmpy()

int32_t _IQ25rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ25 numbers, with rounding and saturation.

Parameters
aIQ25 type value input to be multiplied.
bIQ25 type value input to be multiplied.
Returns
IQ25 type result of the multiplication.

References __IQNrsmpy().

§ _IQ24rsmpy()

int32_t _IQ24rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ24 numbers, with rounding and saturation.

Parameters
aIQ24 type value input to be multiplied.
bIQ24 type value input to be multiplied.
Returns
IQ24 type result of the multiplication.

References __IQNrsmpy().

§ _IQ23rsmpy()

int32_t _IQ23rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ23 numbers, with rounding and saturation.

Parameters
aIQ23 type value input to be multiplied.
bIQ23 type value input to be multiplied.
Returns
IQ23 type result of the multiplication.

References __IQNrsmpy().

§ _IQ22rsmpy()

int32_t _IQ22rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ22 numbers, with rounding and saturation.

Parameters
aIQ22 type value input to be multiplied.
bIQ22 type value input to be multiplied.
Returns
IQ22 type result of the multiplication.

References __IQNrsmpy().

§ _IQ21rsmpy()

int32_t _IQ21rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ21 numbers, with rounding and saturation.

Parameters
aIQ21 type value input to be multiplied.
bIQ21 type value input to be multiplied.
Returns
IQ21 type result of the multiplication.

References __IQNrsmpy().

§ _IQ20rsmpy()

int32_t _IQ20rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ20 numbers, with rounding and saturation.

Parameters
aIQ20 type value input to be multiplied.
bIQ20 type value input to be multiplied.
Returns
IQ20 type result of the multiplication.

References __IQNrsmpy().

§ _IQ19rsmpy()

int32_t _IQ19rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ19 numbers, with rounding and saturation.

Parameters
aIQ19 type value input to be multiplied.
bIQ19 type value input to be multiplied.
Returns
IQ19 type result of the multiplication.

References __IQNrsmpy().

§ _IQ18rsmpy()

int32_t _IQ18rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ18 numbers, with rounding and saturation.

Parameters
aIQ18 type value input to be multiplied.
bIQ18 type value input to be multiplied.
Returns
IQ18 type result of the multiplication.

References __IQNrsmpy().

§ _IQ17rsmpy()

int32_t _IQ17rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ17 numbers, with rounding and saturation.

Parameters
aIQ17 type value input to be multiplied.
bIQ17 type value input to be multiplied.
Returns
IQ17 type result of the multiplication.

References __IQNrsmpy().

§ _IQ16rsmpy()

int32_t _IQ16rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ16 numbers, with rounding and saturation.

Parameters
aIQ16 type value input to be multiplied.
bIQ16 type value input to be multiplied.
Returns
IQ16 type result of the multiplication.

References __IQNrsmpy().

§ _IQ15rsmpy()

int32_t _IQ15rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ15 numbers, with rounding and saturation.

Parameters
aIQ15 type value input to be multiplied.
bIQ15 type value input to be multiplied.
Returns
IQ15 type result of the multiplication.

References __IQNrsmpy().

§ _IQ14rsmpy()

int32_t _IQ14rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ14 numbers, with rounding and saturation.

Parameters
aIQ14 type value input to be multiplied.
bIQ14 type value input to be multiplied.
Returns
IQ14 type result of the multiplication.

References __IQNrsmpy().

§ _IQ13rsmpy()

int32_t _IQ13rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ13 numbers, with rounding and saturation.

Parameters
aIQ13 type value input to be multiplied.
bIQ13 type value input to be multiplied.
Returns
IQ13 type result of the multiplication.

References __IQNrsmpy().

§ _IQ12rsmpy()

int32_t _IQ12rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ12 numbers, with rounding and saturation.

Parameters
aIQ12 type value input to be multiplied.
bIQ12 type value input to be multiplied.
Returns
IQ12 type result of the multiplication.

References __IQNrsmpy().

§ _IQ11rsmpy()

int32_t _IQ11rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ11 numbers, with rounding and saturation.

Parameters
aIQ11 type value input to be multiplied.
bIQ11 type value input to be multiplied.
Returns
IQ11 type result of the multiplication.

References __IQNrsmpy().

§ _IQ10rsmpy()

int32_t _IQ10rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ10 numbers, with rounding and saturation.

Parameters
aIQ10 type value input to be multiplied.
bIQ10 type value input to be multiplied.
Returns
IQ10 type result of the multiplication.

References __IQNrsmpy().

§ _IQ9rsmpy()

int32_t _IQ9rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ9 numbers, with rounding and saturation.

Parameters
aIQ9 type value input to be multiplied.
bIQ9 type value input to be multiplied.
Returns
IQ9 type result of the multiplication.

References __IQNrsmpy().

§ _IQ8rsmpy()

int32_t _IQ8rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ8 numbers, with rounding and saturation.

Parameters
aIQ8 type value input to be multiplied.
bIQ8 type value input to be multiplied.
Returns
IQ8 type result of the multiplication.

References __IQNrsmpy().

§ _IQ7rsmpy()

int32_t _IQ7rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ7 numbers, with rounding and saturation.

Parameters
aIQ7 type value input to be multiplied.
bIQ7 type value input to be multiplied.
Returns
IQ7 type result of the multiplication.

References __IQNrsmpy().

§ _IQ6rsmpy()

int32_t _IQ6rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ6 numbers, with rounding and saturation.

Parameters
aIQ6 type value input to be multiplied.
bIQ6 type value input to be multiplied.
Returns
IQ6 type result of the multiplication.

References __IQNrsmpy().

§ _IQ5rsmpy()

int32_t _IQ5rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ5 numbers, with rounding and saturation.

Parameters
aIQ5 type value input to be multiplied.
bIQ5 type value input to be multiplied.
Returns
IQ5 type result of the multiplication.

References __IQNrsmpy().

§ _IQ4rsmpy()

int32_t _IQ4rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ4 numbers, with rounding and saturation.

Parameters
aIQ4 type value input to be multiplied.
bIQ4 type value input to be multiplied.
Returns
IQ4 type result of the multiplication.

References __IQNrsmpy().

§ _IQ3rsmpy()

int32_t _IQ3rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ3 numbers, with rounding and saturation.

Parameters
aIQ3 type value input to be multiplied.
bIQ3 type value input to be multiplied.
Returns
IQ3 type result of the multiplication.

References __IQNrsmpy().

§ _IQ2rsmpy()

int32_t _IQ2rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ2 numbers, with rounding and saturation.

Parameters
aIQ2 type value input to be multiplied.
bIQ2 type value input to be multiplied.
Returns
IQ2 type result of the multiplication.

References __IQNrsmpy().

§ _IQ1rsmpy()

int32_t _IQ1rsmpy ( int32_t  a,
int32_t  b 
)

Multiplies two IQ1 numbers, with rounding and saturation.

Parameters
aIQ1 type value input to be multiplied.
bIQ1 type value input to be multiplied.
Returns
IQ1 type result of the multiplication.

References __IQNrsmpy().

© Copyright 1995-2023, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale