IQMathLibrary
1.0
|
Library of IQMath operations.
#include <limits.h>
#include <stdlib.h>
#include <stdint.h>
Go to the source code of this file.
Macros | |
#define | GLOBAL_IQ 24 |
The IQ format to be used when the IQ format is not explicitly specified (such as _IQcos instead of _IQ16cos). This value must be between 1 and 30, inclusive. | |
#define | _IQmpy2(A) ((A) << 1) |
Multiplies an IQ value by 2. More... | |
#define | _IQmpy4(A) ((A) << 2) |
Multiplies an IQ value by 4. More... | |
#define | _IQmpy8(A) ((A) << 3) |
Multiplies an IQ value by 8. More... | |
#define | _IQmpy16(A) ((A) << 4) |
Multiplies an IQ value by 16. More... | |
#define | _IQmpy32(A) ((A) << 5) |
Multiplies an IQ value by 32. More... | |
#define | _IQmpy64(A) ((A) << 6) |
Multiplies an IQ value by 64. More... | |
#define | _IQdiv2(A) ((A) >> 1) |
Divides an IQ value by 2. More... | |
#define | _IQdiv4(A) ((A) >> 2) |
Divides an IQ value by 4. More... | |
#define | _IQdiv8(A) ((A) >> 3) |
Divides an IQ value by 8. More... | |
#define | _IQdiv16(A) ((A) >> 4) |
Divides an IQ value by 16. More... | |
#define | _IQdiv32(A) ((A) >> 5) |
Divides an IQ value by 32. More... | |
#define | _IQdiv64(A) ((A) >> 6) |
Divides an IQ value by 64. More... | |
#define | _IQ30(A) ((_iq30)((A) * ((_iq30)1 << 30))) |
Converts a value into an IQ30 number. More... | |
#define | _IQ29(A) ((_iq29)((A) * ((_iq29)1 << 29))) |
Converts a value into an IQ29 number. More... | |
#define | _IQ28(A) ((_iq28)((A) * ((_iq28)1 << 28))) |
Converts a value into an IQ28 number. More... | |
#define | _IQ27(A) ((_iq27)((A) * ((_iq27)1 << 27))) |
Converts a value into an IQ27 number. More... | |
#define | _IQ26(A) ((_iq26)((A) * ((_iq26)1 << 26))) |
Converts a value into an IQ26 number. More... | |
#define | _IQ25(A) ((_iq25)((A) * ((_iq25)1 << 25))) |
Converts a value into an IQ25 number. More... | |
#define | _IQ24(A) ((_iq24)((A) * ((_iq24)1 << 24))) |
Converts a value into an IQ24 number. More... | |
#define | _IQ23(A) ((_iq23)((A) * ((_iq23)1 << 23))) |
Converts a value into an IQ23 number. More... | |
#define | _IQ22(A) ((_iq22)((A) * ((_iq22)1 << 22))) |
Converts a value into an IQ22 number. More... | |
#define | _IQ21(A) ((_iq21)((A) * ((_iq21)1 << 21))) |
Converts a value into an IQ21 number. More... | |
#define | _IQ20(A) ((_iq20)((A) * ((_iq20)1 << 20))) |
Converts a value into an IQ20 number. More... | |
#define | _IQ19(A) ((_iq19)((A) * ((_iq19)1 << 19))) |
Converts a value into an IQ19 number. More... | |
#define | _IQ18(A) ((_iq18)((A) * ((_iq18)1 << 18))) |
Converts a value into an IQ18 number. More... | |
#define | _IQ17(A) ((_iq17)((A) * ((_iq17)1 << 17))) |
Converts a value into an IQ17 number. More... | |
#define | _IQ16(A) ((_iq16)((A) * ((_iq16)1 << 16))) |
Converts a value into an IQ16 number. More... | |
#define | _IQ15(A) ((_iq15)((A) * ((_iq15)1 << 15))) |
Converts a value into an IQ15 number. More... | |
#define | _IQ14(A) ((_iq14)((A) * ((_iq14)1 << 14))) |
Converts a value into an IQ14 number. More... | |
#define | _IQ13(A) ((_iq13)((A) * ((_iq13)1 << 13))) |
Converts a value into an IQ13 number. More... | |
#define | _IQ12(A) ((_iq12)((A) * ((_iq12)1 << 12))) |
Converts a value into an IQ12 number. More... | |
#define | _IQ11(A) ((_iq11)((A) * ((_iq11)1 << 11))) |
Converts a value into an IQ11 number. More... | |
#define | _IQ10(A) ((_iq10)((A) * ((_iq10)1 << 10))) |
Converts a value into an IQ10 number. More... | |
#define | _IQ9(A) ((_iq9)((A) * ((_iq9)1 << 9))) |
Converts a value into an IQ9 number. More... | |
#define | _IQ8(A) ((_iq8)((A) * ((_iq8)1 << 8))) |
Converts a value into an IQ8 number. More... | |
#define | _IQ7(A) ((_iq7)((A) * ((_iq7)1 << 7))) |
Converts a value into an IQ7 number. More... | |
#define | _IQ6(A) ((_iq6)((A) * ((_iq6)1 << 6))) |
Converts a value into an IQ6 number. More... | |
#define | _IQ5(A) ((_iq5)((A) * ((_iq5)1 << 5))) |
Converts a value into an IQ5 number. More... | |
#define | _IQ4(A) ((_iq4)((A) * ((_iq4)1 << 4))) |
Converts a value into an IQ4 number. More... | |
#define | _IQ3(A) ((_iq3)((A) * ((_iq3)1 << 3))) |
Converts a value into an IQ3 number. More... | |
#define | _IQ2(A) ((_iq2)((A) * ((_iq2)1 << 2))) |
Converts a value into an IQ2 number. More... | |
#define | _IQ1(A) ((_iq1)((A) * ((_iq1)1 << 1))) |
Converts a value into an IQ1 number. More... | |
#define | _IQ(A) _IQ24(A) |
Converts a value into an the global IQ format. More... | |
#define | _IQtoF(A) _IQ24toF(A) |
Convert a global IQ format number to a floating point value. More... | |
#define | _IQsat(A, Pos, Neg) |
Saturates an IQ number in a given range. More... | |
#define | _IQmpy(A, B) _IQ24mpy(A, B) |
Multiplies two global IQ format numbers. More... | |
#define | _IQrmpy(A, B) _IQ24rmpy(A, B) |
Multiplies two global IQ format numbers, with rounding. More... | |
#define | _IQrsmpy(A, B) _IQ24rsmpy(A, B) |
Multiplies two global IQ format numbers, with rounding and saturation. More... | |
#define | _IQdiv(A, B) _IQ24div(A, B) |
Divides two global IQ format numbers. More... | |
#define | _IQsin(A) _IQ24sin(A) |
Computes the sine of a global IQ format input, in radians. More... | |
#define | _IQsinPU(A) _IQ24sinPU(A) |
Computes the sine of a global IQ format input. More... | |
#define | _IQasin(A) _IQ24asin(A) |
Computes the inverse sine of a global IQ format input. More... | |
#define | _IQcos(A) _IQ24cos(A) |
Computes the cosine of a global IQ format input, in radians. More... | |
#define | _IQcosPU(A) _IQ24cosPU(A) |
Computes the cossine of a global IQ format input. More... | |
#define | _IQ29acos(A) (_IQ29(1.570796327) - _IQ29asin(A)) |
Computes the inverse cosine of an IQ29 type input. More... | |
#define | _IQ28acos(A) (_IQ28(1.570796327) - _IQ28asin(A)) |
Computes the inverse cosine of an IQ28 type input. More... | |
#define | _IQ27acos(A) (_IQ27(1.570796327) - _IQ27asin(A)) |
Computes the inverse cosine of an IQ27 type input. More... | |
#define | _IQ26acos(A) (_IQ26(1.570796327) - _IQ26asin(A)) |
Computes the inverse cosine of an IQ26 type input. More... | |
#define | _IQ25acos(A) (_IQ25(1.570796327) - _IQ25asin(A)) |
Computes the inverse cosine of an IQ25 type input. More... | |
#define | _IQ24acos(A) (_IQ24(1.570796327) - _IQ24asin(A)) |
Computes the inverse cosine of an IQ24 type input. More... | |
#define | _IQ23acos(A) (_IQ23(1.570796327) - _IQ23asin(A)) |
Computes the inverse cosine of an IQ23 type input. More... | |
#define | _IQ22acos(A) (_IQ22(1.570796327) - _IQ22asin(A)) |
Computes the inverse cosine of an IQ22 type input. More... | |
#define | _IQ21acos(A) (_IQ21(1.570796327) - _IQ21asin(A)) |
Computes the inverse cosine of an IQ21 type input. More... | |
#define | _IQ20acos(A) (_IQ20(1.570796327) - _IQ20asin(A)) |
Computes the inverse cosine of an IQ20 type input. More... | |
#define | _IQ19acos(A) (_IQ19(1.570796327) - _IQ19asin(A)) |
Computes the inverse cosine of an IQ19 type input. More... | |
#define | _IQ18acos(A) (_IQ18(1.570796327) - _IQ18asin(A)) |
Computes the inverse cosine of an IQ18 type input. More... | |
#define | _IQ17acos(A) (_IQ17(1.570796327) - _IQ17asin(A)) |
Computes the inverse cosine of an IQ17 type input. More... | |
#define | _IQ16acos(A) (_IQ16(1.570796327) - _IQ16asin(A)) |
Computes the inverse cosine of an IQ16 type input. More... | |
#define | _IQ15acos(A) (_IQ15(1.570796327) - _IQ15asin(A)) |
Computes the inverse cosine of an IQ15 type input. More... | |
#define | _IQ14acos(A) (_IQ14(1.570796327) - _IQ14asin(A)) |
Computes the inverse cosine of an IQ14 type input. More... | |
#define | _IQ13acos(A) (_IQ13(1.570796327) - _IQ13asin(A)) |
Computes the inverse cosine of an IQ13 type input. More... | |
#define | _IQ12acos(A) (_IQ12(1.570796327) - _IQ12asin(A)) |
Computes the inverse cosine of an IQ12 type input. More... | |
#define | _IQ11acos(A) (_IQ11(1.570796327) - _IQ11asin(A)) |
Computes the inverse cosine of an IQ11 type input. More... | |
#define | _IQ10acos(A) (_IQ10(1.570796327) - _IQ10asin(A)) |
Computes the inverse cosine of an IQ10 type input. More... | |
#define | _IQ9acos(A) (_IQ9(1.570796327) - _IQ9asin(A)) |
Computes the inverse cosine of an IQ9 type input. More... | |
#define | _IQ8acos(A) (_IQ8(1.570796327) - _IQ8asin(A)) |
Computes the inverse cosine of an IQ8 type input. More... | |
#define | _IQ7acos(A) (_IQ7(1.570796327) - _IQ7asin(A)) |
Computes the inverse cosine of an IQ7 type input. More... | |
#define | _IQ6acos(A) (_IQ6(1.570796327) - _IQ6asin(A)) |
Computes the inverse cosine of an IQ6 type input. More... | |
#define | _IQ5acos(A) (_IQ5(1.570796327) - _IQ5asin(A)) |
Computes the inverse cosine of an IQ5 type input. More... | |
#define | _IQ4acos(A) (_IQ4(1.570796327) - _IQ4asin(A)) |
Computes the inverse cosine of an IQ4 type input. More... | |
#define | _IQ3acos(A) (_IQ3(1.570796327) - _IQ3asin(A)) |
Computes the inverse cosine of an IQ3 type input. More... | |
#define | _IQ2acos(A) (_IQ2(1.570796327) - _IQ2asin(A)) |
Computes the inverse cosine of an IQ2 type input. More... | |
#define | _IQ1acos(A) (_IQ1(1.570796327) - _IQ1asin(A)) |
Computes the inverse cosine of an IQ1 type input. More... | |
#define | _IQacos(A) _IQ24acos(A) |
Computes the inverse cosine of a global IQ format input. More... | |
#define | _IQatan2(A, B) _IQ24atan2(A, B) |
Compute the 4-quadrant arctangent of a global IQ format input, in radians. More... | |
#define | _IQatan2PU(A, B) _IQ24atan2PU(A, B) |
Compute the 4-quadrant arctangent of a global IQ format input. More... | |
#define | _IQ29atan(A) _IQ29atan2(A, _IQ29(1.0)) |
Computes the inverse tangnet of an IQ29 format input. More... | |
#define | _IQ28atan(A) _IQ28atan2(A, _IQ28(1.0)) |
Computes the inverse tangnet of an IQ28 format input. More... | |
#define | _IQ27atan(A) _IQ27atan2(A, _IQ27(1.0)) |
Computes the inverse tangnet of an IQ27 format input. More... | |
#define | _IQ26atan(A) _IQ26atan2(A, _IQ26(1.0)) |
Computes the inverse tangnet of an IQ26 format input. More... | |
#define | _IQ25atan(A) _IQ25atan2(A, _IQ25(1.0)) |
Computes the inverse tangnet of an IQ25 format input. More... | |
#define | _IQ24atan(A) _IQ24atan2(A, _IQ24(1.0)) |
Computes the inverse tangnet of an IQ24 format input. More... | |
#define | _IQ23atan(A) _IQ23atan2(A, _IQ23(1.0)) |
Computes the inverse tangnet of an IQ23 format input. More... | |
#define | _IQ22atan(A) _IQ22atan2(A, _IQ22(1.0)) |
Computes the inverse tangnet of an IQ22 format input. More... | |
#define | _IQ21atan(A) _IQ21atan2(A, _IQ21(1.0)) |
Computes the inverse tangnet of an IQ21 format input. More... | |
#define | _IQ20atan(A) _IQ20atan2(A, _IQ20(1.0)) |
Computes the inverse tangnet of an IQ20 format input. More... | |
#define | _IQ19atan(A) _IQ19atan2(A, _IQ19(1.0)) |
Computes the inverse tangnet of an IQ19 format input. More... | |
#define | _IQ18atan(A) _IQ18atan2(A, _IQ18(1.0)) |
Computes the inverse tangnet of an IQ18 format input. More... | |
#define | _IQ17atan(A) _IQ17atan2(A, _IQ17(1.0)) |
Computes the inverse tangnet of an IQ17 format input. More... | |
#define | _IQ16atan(A) _IQ16atan2(A, _IQ16(1.0)) |
Computes the inverse tangnet of an IQ16 format input. More... | |
#define | _IQ15atan(A) _IQ15atan2(A, _IQ15(1.0)) |
Computes the inverse tangnet of an IQ15 format input. More... | |
#define | _IQ14atan(A) _IQ14atan2(A, _IQ14(1.0)) |
Computes the inverse tangnet of an IQ14 format input. More... | |
#define | _IQ13atan(A) _IQ13atan2(A, _IQ13(1.0)) |
Computes the inverse tangnet of an IQ13 format input. More... | |
#define | _IQ12atan(A) _IQ12atan2(A, _IQ12(1.0)) |
Computes the inverse tangnet of an IQ12 format input. More... | |
#define | _IQ11atan(A) _IQ11atan2(A, _IQ11(1.0)) |
Computes the inverse tangnet of an IQ11 format input. More... | |
#define | _IQ10atan(A) _IQ10atan2(A, _IQ10(1.0)) |
Computes the inverse tangnet of an IQ10 format input. More... | |
#define | _IQ9atan(A) _IQ9atan2(A, _IQ9(1.0)) |
Computes the inverse tangnet of an IQ9 format input. More... | |
#define | _IQ8atan(A) _IQ8atan2(A, _IQ8(1.0)) |
Computes the inverse tangnet of an IQ8 format input. More... | |
#define | _IQ7atan(A) _IQ7atan2(A, _IQ7(1.0)) |
Computes the inverse tangnet of an IQ7 format input. More... | |
#define | _IQ6atan(A) _IQ6atan2(A, _IQ6(1.0)) |
Computes the inverse tangnet of an IQ6 format input. More... | |
#define | _IQ5atan(A) _IQ5atan2(A, _IQ5(1.0)) |
Computes the inverse tangnet of an IQ5 format input. More... | |
#define | _IQ4atan(A) _IQ4atan2(A, _IQ4(1.0)) |
Computes the inverse tangnet of an IQ4 format input. More... | |
#define | _IQ3atan(A) _IQ3atan2(A, _IQ3(1.0)) |
Computes the inverse tangnet of an IQ3 format input. More... | |
#define | _IQ2atan(A) _IQ2atan2(A, _IQ2(1.0)) |
Computes the inverse tangnet of an IQ2 format input. More... | |
#define | _IQ1atan(A) _IQ1atan2(A, _IQ1(1.0)) |
Computes the inverse tangnet of an IQ1 format input. More... | |
#define | _IQatan(A) _IQ24atan2(A, _IQ24(1.0)) |
Computes the inverse tangent of a global IQ format input. More... | |
#define | _IQsqrt(A) _IQ24sqrt(A) |
Calculate square root of a global IQ format input. More... | |
#define | _IQisqrt(A) _IQ24isqrt(A) |
Computes 1 over the square root of a global IQ format number. More... | |
#define | _IQexp(A) _IQ24exp(A) |
Computes the exponential of a global IQ format input. More... | |
#define | _IQlog(A) _IQ24log(A) |
Computes the base-e logarithm of a global IQ format input. More... | |
#define | _IQ30int(A) ((A) >> 30) |
Returns the integer portion of an IQ30 type number. More... | |
#define | _IQ29int(A) ((A) >> 29) |
Returns the integer portion of an IQ29 type number. More... | |
#define | _IQ28int(A) ((A) >> 28) |
Returns the integer portion of an IQ28 type number. More... | |
#define | _IQ27int(A) ((A) >> 27) |
Returns the integer portion of an IQ27 type number. More... | |
#define | _IQ26int(A) ((A) >> 26) |
Returns the integer portion of an IQ26 type number. More... | |
#define | _IQ25int(A) ((A) >> 25) |
Returns the integer portion of an IQ25 type number. More... | |
#define | _IQ24int(A) ((A) >> 24) |
Returns the integer portion of an IQ24 type number. More... | |
#define | _IQ23int(A) ((A) >> 23) |
Returns the integer portion of an IQ23 type number. More... | |
#define | _IQ22int(A) ((A) >> 22) |
Returns the integer portion of an IQ22 type number. More... | |
#define | _IQ21int(A) ((A) >> 21) |
Returns the integer portion of an IQ21 type number. More... | |
#define | _IQ20int(A) ((A) >> 20) |
Returns the integer portion of an IQ20 type number. More... | |
#define | _IQ19int(A) ((A) >> 19) |
Returns the integer portion of an IQ19 type number. More... | |
#define | _IQ18int(A) ((A) >> 18) |
Returns the integer portion of an IQ18 type number. More... | |
#define | _IQ17int(A) ((A) >> 17) |
Returns the integer portion of an IQ17 type number. More... | |
#define | _IQ16int(A) ((A) >> 16) |
Returns the integer portion of an IQ16 type number. More... | |
#define | _IQ15int(A) ((A) >> 15) |
Returns the integer portion of an IQ15 type number. More... | |
#define | _IQ14int(A) ((A) >> 14) |
Returns the integer portion of an IQ14 type number. More... | |
#define | _IQ13int(A) ((A) >> 13) |
Returns the integer portion of an IQ13 type number. More... | |
#define | _IQ12int(A) ((A) >> 12) |
Returns the integer portion of an IQ12 type number. More... | |
#define | _IQ11int(A) ((A) >> 11) |
Returns the integer portion of an IQ11 type number. More... | |
#define | _IQ10int(A) ((A) >> 10) |
Returns the integer portion of an IQ10 type number. More... | |
#define | _IQ9int(A) ((A) >> 9) |
Returns the integer portion of an IQ9 type number. More... | |
#define | _IQ8int(A) ((A) >> 8) |
Returns the integer portion of an IQ8 type number. More... | |
#define | _IQ7int(A) ((A) >> 7) |
Returns the integer portion of an IQ7 type number. More... | |
#define | _IQ6int(A) ((A) >> 6) |
Returns the integer portion of an IQ6 type number. More... | |
#define | _IQ5int(A) ((A) >> 5) |
Returns the integer portion of an IQ5 type number. More... | |
#define | _IQ4int(A) ((A) >> 4) |
Returns the integer portion of an IQ4 type number. More... | |
#define | _IQ3int(A) ((A) >> 3) |
Returns the integer portion of an IQ3 type number. More... | |
#define | _IQ2int(A) ((A) >> 2) |
Returns the integer portion of an IQ2 type number. More... | |
#define | _IQ1int(A) ((A) >> 1) |
Returns the integer portion of an IQ1 type number. More... | |
#define | _IQint(A) ((A) >> GLOBAL_IQ) |
Returns the integer portion of a global IQ format number. More... | |
#define | _IQfrac(A) _IQ24frac(A) |
Computes the fractional portion a global IQ format number. More... | |
#define | _IQmpyIQX(A, n1, B, n2) _IQ24mpyIQX(A, n1, B, n2) |
Multiply two IQ numbers in different IQ formats, returning the product in global IQ format. More... | |
#define | _IQ30mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ30 numbers. More... | |
#define | _IQ29mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ29 numbers. More... | |
#define | _IQ28mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ28 numbers. More... | |
#define | _IQ27mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ27 numbers. More... | |
#define | _IQ26mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ26 numbers. More... | |
#define | _IQ25mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ25 numbers. More... | |
#define | _IQ24mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ24 numbers. More... | |
#define | _IQ23mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ23 numbers. More... | |
#define | _IQ22mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ22 numbers. More... | |
#define | _IQ21mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ21 numbers. More... | |
#define | _IQ20mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ20 numbers. More... | |
#define | _IQ19mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ19 numbers. More... | |
#define | _IQ18mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ18 numbers. More... | |
#define | _IQ17mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ17 numbers. More... | |
#define | _IQ16mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ16 numbers. More... | |
#define | _IQ15mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ15 numbers. More... | |
#define | _IQ14mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ14 numbers. More... | |
#define | _IQ13mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ13 numbers. More... | |
#define | _IQ12mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ12 numbers. More... | |
#define | _IQ11mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ11 numbers. More... | |
#define | _IQ10mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ10 numbers. More... | |
#define | _IQ9mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ9 numbers. More... | |
#define | _IQ8mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ8 numbers. More... | |
#define | _IQ7mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ7 numbers. More... | |
#define | _IQ6mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ6 numbers. More... | |
#define | _IQ5mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ5 numbers. More... | |
#define | _IQ4mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ4 numbers. More... | |
#define | _IQ3mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ3 numbers. More... | |
#define | _IQ2mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ2 numbers. More... | |
#define | _IQ1mag(A, B) _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ1 numbers. More... | |
#define | _IQimag(A, B) _IQ24imag(A, B) |
Computes the inverse square root of A^2 + B^2 using IQ1 numbers. More... | |
#define | _atoIQ(A) _atoIQ24(A) |
Converts a string into a global IQ format number. More... | |
#define | _IQtoa(A, B, C) _IQ24toa(A, B, C) |
Converts a global IQ format input into a string. More... | |
#define | _IQ30abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ30 number. More... | |
#define | _IQ29abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ29 number. More... | |
#define | _IQ28abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ28 number. More... | |
#define | _IQ27abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ27 number. More... | |
#define | _IQ26abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ26 number. More... | |
#define | _IQ25abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ25 number. More... | |
#define | _IQ24abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ24 number. More... | |
#define | _IQ23abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ23 number. More... | |
#define | _IQ22abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ22 number. More... | |
#define | _IQ21abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ21 number. More... | |
#define | _IQ20abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ20 number. More... | |
#define | _IQ19abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ19 number. More... | |
#define | _IQ18abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ18 number. More... | |
#define | _IQ17abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ17 number. More... | |
#define | _IQ16abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ16 number. More... | |
#define | _IQ15abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ15 number. More... | |
#define | _IQ14abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ14 number. More... | |
#define | _IQ13abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ13 number. More... | |
#define | _IQ12abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ12 number. More... | |
#define | _IQ11abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ11 number. More... | |
#define | _IQ10abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ10 number. More... | |
#define | _IQ9abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ9 number. More... | |
#define | _IQ8abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ8 number. More... | |
#define | _IQ7abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ7 number. More... | |
#define | _IQ6abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ6 number. More... | |
#define | _IQ5abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ5 number. More... | |
#define | _IQ4abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ4 number. More... | |
#define | _IQ3abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ3 number. More... | |
#define | _IQ2abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ2 number. More... | |
#define | _IQ1abs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ1 number. More... | |
#define | _IQabs(A) (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an global IQ format number. More... | |
Functions | |
int32_t | _IQmag (int32_t A, int32_t B) |
Calculate the magnitude of two IQ31 inputs. More... | |
#define _IQmpy2 | ( | A | ) | ((A) << 1) |
Multiplies an IQ value by 2.
A | IQ type input. |
#define _IQmpy4 | ( | A | ) | ((A) << 2) |
Multiplies an IQ value by 4.
A | IQ type input. |
#define _IQmpy8 | ( | A | ) | ((A) << 3) |
Multiplies an IQ value by 8.
A | IQ type input. |
#define _IQmpy16 | ( | A | ) | ((A) << 4) |
Multiplies an IQ value by 16.
A | IQ type input. |
#define _IQmpy32 | ( | A | ) | ((A) << 5) |
Multiplies an IQ value by 32.
A | IQ type input. |
#define _IQmpy64 | ( | A | ) | ((A) << 6) |
Multiplies an IQ value by 64.
A | IQ type input. |
#define _IQdiv2 | ( | A | ) | ((A) >> 1) |
Divides an IQ value by 2.
A | IQ type input. |
#define _IQdiv4 | ( | A | ) | ((A) >> 2) |
Divides an IQ value by 4.
A | IQ type input. |
#define _IQdiv8 | ( | A | ) | ((A) >> 3) |
Divides an IQ value by 8.
A | IQ type input. |
#define _IQdiv16 | ( | A | ) | ((A) >> 4) |
Divides an IQ value by 16.
A | IQ type input. |
#define _IQdiv32 | ( | A | ) | ((A) >> 5) |
Divides an IQ value by 32.
A | IQ type input. |
#define _IQdiv64 | ( | A | ) | ((A) >> 6) |
Divides an IQ value by 64.
A | IQ type input. |
#define _IQ30 | ( | A | ) | ((_iq30)((A) * ((_iq30)1 << 30))) |
Converts a value into an IQ30 number.
A | Number input. |
#define _IQ29 | ( | A | ) | ((_iq29)((A) * ((_iq29)1 << 29))) |
Converts a value into an IQ29 number.
A | Number input. |
#define _IQ28 | ( | A | ) | ((_iq28)((A) * ((_iq28)1 << 28))) |
Converts a value into an IQ28 number.
A | Number input. |
#define _IQ27 | ( | A | ) | ((_iq27)((A) * ((_iq27)1 << 27))) |
Converts a value into an IQ27 number.
A | Number input. |
#define _IQ26 | ( | A | ) | ((_iq26)((A) * ((_iq26)1 << 26))) |
Converts a value into an IQ26 number.
A | Number input. |
#define _IQ25 | ( | A | ) | ((_iq25)((A) * ((_iq25)1 << 25))) |
Converts a value into an IQ25 number.
A | Number input. |
#define _IQ24 | ( | A | ) | ((_iq24)((A) * ((_iq24)1 << 24))) |
Converts a value into an IQ24 number.
A | Number input. |
#define _IQ23 | ( | A | ) | ((_iq23)((A) * ((_iq23)1 << 23))) |
Converts a value into an IQ23 number.
A | Number input. |
#define _IQ22 | ( | A | ) | ((_iq22)((A) * ((_iq22)1 << 22))) |
Converts a value into an IQ22 number.
A | Number input. |
#define _IQ21 | ( | A | ) | ((_iq21)((A) * ((_iq21)1 << 21))) |
Converts a value into an IQ21 number.
A | Number input. |
#define _IQ20 | ( | A | ) | ((_iq20)((A) * ((_iq20)1 << 20))) |
Converts a value into an IQ20 number.
A | Number input. |
#define _IQ19 | ( | A | ) | ((_iq19)((A) * ((_iq19)1 << 19))) |
Converts a value into an IQ19 number.
A | Number input. |
#define _IQ18 | ( | A | ) | ((_iq18)((A) * ((_iq18)1 << 18))) |
Converts a value into an IQ18 number.
A | Number input. |
#define _IQ17 | ( | A | ) | ((_iq17)((A) * ((_iq17)1 << 17))) |
Converts a value into an IQ17 number.
A | Number input. |
#define _IQ16 | ( | A | ) | ((_iq16)((A) * ((_iq16)1 << 16))) |
Converts a value into an IQ16 number.
A | Number input. |
#define _IQ15 | ( | A | ) | ((_iq15)((A) * ((_iq15)1 << 15))) |
Converts a value into an IQ15 number.
A | Number input. |
#define _IQ14 | ( | A | ) | ((_iq14)((A) * ((_iq14)1 << 14))) |
Converts a value into an IQ14 number.
A | Number input. |
#define _IQ13 | ( | A | ) | ((_iq13)((A) * ((_iq13)1 << 13))) |
Converts a value into an IQ13 number.
A | Number input. |
#define _IQ12 | ( | A | ) | ((_iq12)((A) * ((_iq12)1 << 12))) |
Converts a value into an IQ12 number.
A | Number input. |
#define _IQ11 | ( | A | ) | ((_iq11)((A) * ((_iq11)1 << 11))) |
Converts a value into an IQ11 number.
A | Number input. |
#define _IQ10 | ( | A | ) | ((_iq10)((A) * ((_iq10)1 << 10))) |
Converts a value into an IQ10 number.
A | Number input. |
#define _IQ9 | ( | A | ) | ((_iq9)((A) * ((_iq9)1 << 9))) |
Converts a value into an IQ9 number.
A | Number input. |
#define _IQ8 | ( | A | ) | ((_iq8)((A) * ((_iq8)1 << 8))) |
Converts a value into an IQ8 number.
A | Number input. |
#define _IQ7 | ( | A | ) | ((_iq7)((A) * ((_iq7)1 << 7))) |
Converts a value into an IQ7 number.
A | Number input. |
#define _IQ6 | ( | A | ) | ((_iq6)((A) * ((_iq6)1 << 6))) |
Converts a value into an IQ6 number.
A | Number input. |
#define _IQ5 | ( | A | ) | ((_iq5)((A) * ((_iq5)1 << 5))) |
Converts a value into an IQ5 number.
A | Number input. |
#define _IQ4 | ( | A | ) | ((_iq4)((A) * ((_iq4)1 << 4))) |
Converts a value into an IQ4 number.
A | Number input. |
#define _IQ3 | ( | A | ) | ((_iq3)((A) * ((_iq3)1 << 3))) |
Converts a value into an IQ3 number.
A | Number input. |
#define _IQ2 | ( | A | ) | ((_iq2)((A) * ((_iq2)1 << 2))) |
Converts a value into an IQ2 number.
A | Number input. |
#define _IQ1 | ( | A | ) | ((_iq1)((A) * ((_iq1)1 << 1))) |
Converts a value into an IQ1 number.
A | Number input. |
#define _IQ | ( | A | ) | _IQ24(A) |
Converts a value into an the global IQ format.
A | Number input. |
#define _IQtoF | ( | A | ) | _IQ24toF(A) |
Convert a global IQ format number to a floating point value.
A | Number input. |
#define _IQsat | ( | A, | |
Pos, | |||
Neg | |||
) |
Saturates an IQ number in a given range.
A | IQ number to be saturated. |
Pos | Maximum positive value. |
Neg | Minimum negative Value. |
#define _IQmpy | ( | A, | |
B | |||
) | _IQ24mpy(A, B) |
Multiplies two global IQ format numbers.
A | Global IQ format number to be multiplied. |
B | Global IQ format number to be multiplied. |
#define _IQrmpy | ( | A, | |
B | |||
) | _IQ24rmpy(A, B) |
Multiplies two global IQ format numbers, with rounding.
A | Global IQ format number to be multiplied. |
B | Global IQ format number to be multiplied. |
#define _IQrsmpy | ( | A, | |
B | |||
) | _IQ24rsmpy(A, B) |
Multiplies two global IQ format numbers, with rounding and saturation.
A | Global IQ format number to be multiplied. |
B | Global IQ format number to be multiplied. |
#define _IQdiv | ( | A, | |
B | |||
) | _IQ24div(A, B) |
Divides two global IQ format numbers.
A | Global IQ format numerator to be divided. |
B | Global IQ format denominator to divide by. |
#define _IQsin | ( | A | ) | _IQ24sin(A) |
Computes the sine of a global IQ format input, in radians.
A | Global IQ format input. |
#define _IQsinPU | ( | A | ) | _IQ24sinPU(A) |
Computes the sine of a global IQ format input.
A | Global IQ format input. |
#define _IQasin | ( | A | ) | _IQ24asin(A) |
Computes the inverse sine of a global IQ format input.
A | Global IQ format input. |
#define _IQcos | ( | A | ) | _IQ24cos(A) |
Computes the cosine of a global IQ format input, in radians.
A | Global IQ format input. |
#define _IQcosPU | ( | A | ) | _IQ24cosPU(A) |
Computes the cossine of a global IQ format input.
A | Global IQ format input. |
Computes the inverse cosine of an IQ29 type input.
A | IQ29 input. |
Computes the inverse cosine of an IQ28 type input.
A | IQ28 input. |
Computes the inverse cosine of an IQ27 type input.
A | IQ27 input. |
Computes the inverse cosine of an IQ26 type input.
A | IQ26 input. |
Computes the inverse cosine of an IQ25 type input.
A | IQ25 input. |
Computes the inverse cosine of an IQ24 type input.
A | IQ24 input. |
Computes the inverse cosine of an IQ23 type input.
A | IQ23 input. |
Computes the inverse cosine of an IQ22 type input.
A | IQ22 input. |
Computes the inverse cosine of an IQ21 type input.
A | IQ21 input. |
Computes the inverse cosine of an IQ20 type input.
A | IQ20 input. |
Computes the inverse cosine of an IQ19 type input.
A | IQ19 input. |
Computes the inverse cosine of an IQ18 type input.
A | IQ18 input. |
Computes the inverse cosine of an IQ17 type input.
A | IQ17 input. |
Computes the inverse cosine of an IQ16 type input.
A | IQ16 input. |
Computes the inverse cosine of an IQ15 type input.
A | IQ15 input. |
Computes the inverse cosine of an IQ14 type input.
A | IQ14 input. |
Computes the inverse cosine of an IQ13 type input.
A | IQ13 input. |
Computes the inverse cosine of an IQ12 type input.
A | IQ12 input. |
Computes the inverse cosine of an IQ11 type input.
A | IQ11 input. |
Computes the inverse cosine of an IQ10 type input.
A | IQ10 input. |
Computes the inverse cosine of an IQ9 type input.
A | IQ9 input. |
Computes the inverse cosine of an IQ8 type input.
A | IQ8 input. |
Computes the inverse cosine of an IQ7 type input.
A | IQ7 input. |
Computes the inverse cosine of an IQ6 type input.
A | IQ6 input. |
Computes the inverse cosine of an IQ5 type input.
A | IQ5 input. |
Computes the inverse cosine of an IQ4 type input.
A | IQ4 input. |
Computes the inverse cosine of an IQ3 type input.
A | IQ3 input. |
Computes the inverse cosine of an IQ2 type input.
A | IQ2 input. |
Computes the inverse cosine of an IQ1 type input.
A | IQ1 input. |
#define _IQacos | ( | A | ) | _IQ24acos(A) |
Computes the inverse cosine of a global IQ format input.
A | Global IQ format input. |
#define _IQatan2 | ( | A, | |
B | |||
) | _IQ24atan2(A, B) |
Compute the 4-quadrant arctangent of a global IQ format input, in radians.
A | Global IQ format input. |
B | Global IQ format input. |
#define _IQatan2PU | ( | A, | |
B | |||
) | _IQ24atan2PU(A, B) |
Compute the 4-quadrant arctangent of a global IQ format input.
A | Global IQ format input. |
B | Global IQ format input. |
#define _IQ29atan | ( | A | ) | _IQ29atan2(A, _IQ29(1.0)) |
Computes the inverse tangnet of an IQ29 format input.
A | IQ29 format input. |
#define _IQ28atan | ( | A | ) | _IQ28atan2(A, _IQ28(1.0)) |
Computes the inverse tangnet of an IQ28 format input.
A | IQ28 format input. |
#define _IQ27atan | ( | A | ) | _IQ27atan2(A, _IQ27(1.0)) |
Computes the inverse tangnet of an IQ27 format input.
A | IQ27 format input. |
#define _IQ26atan | ( | A | ) | _IQ26atan2(A, _IQ26(1.0)) |
Computes the inverse tangnet of an IQ26 format input.
A | IQ26 format input. |
#define _IQ25atan | ( | A | ) | _IQ25atan2(A, _IQ25(1.0)) |
Computes the inverse tangnet of an IQ25 format input.
A | IQ25 format input. |
#define _IQ24atan | ( | A | ) | _IQ24atan2(A, _IQ24(1.0)) |
Computes the inverse tangnet of an IQ24 format input.
A | IQ24 format input. |
#define _IQ23atan | ( | A | ) | _IQ23atan2(A, _IQ23(1.0)) |
Computes the inverse tangnet of an IQ23 format input.
A | IQ23 format input. |
#define _IQ22atan | ( | A | ) | _IQ22atan2(A, _IQ22(1.0)) |
Computes the inverse tangnet of an IQ22 format input.
A | IQ22 format input. |
#define _IQ21atan | ( | A | ) | _IQ21atan2(A, _IQ21(1.0)) |
Computes the inverse tangnet of an IQ21 format input.
A | IQ21 format input. |
#define _IQ20atan | ( | A | ) | _IQ20atan2(A, _IQ20(1.0)) |
Computes the inverse tangnet of an IQ20 format input.
A | IQ20 format input. |
#define _IQ19atan | ( | A | ) | _IQ19atan2(A, _IQ19(1.0)) |
Computes the inverse tangnet of an IQ19 format input.
A | IQ19 format input. |
#define _IQ18atan | ( | A | ) | _IQ18atan2(A, _IQ18(1.0)) |
Computes the inverse tangnet of an IQ18 format input.
A | IQ18 format input. |
#define _IQ17atan | ( | A | ) | _IQ17atan2(A, _IQ17(1.0)) |
Computes the inverse tangnet of an IQ17 format input.
A | IQ17 format input. |
#define _IQ16atan | ( | A | ) | _IQ16atan2(A, _IQ16(1.0)) |
Computes the inverse tangnet of an IQ16 format input.
A | IQ16 format input. |
#define _IQ15atan | ( | A | ) | _IQ15atan2(A, _IQ15(1.0)) |
Computes the inverse tangnet of an IQ15 format input.
A | IQ15 format input. |
#define _IQ14atan | ( | A | ) | _IQ14atan2(A, _IQ14(1.0)) |
Computes the inverse tangnet of an IQ14 format input.
A | IQ14 format input. |
#define _IQ13atan | ( | A | ) | _IQ13atan2(A, _IQ13(1.0)) |
Computes the inverse tangnet of an IQ13 format input.
A | IQ13 format input. |
#define _IQ12atan | ( | A | ) | _IQ12atan2(A, _IQ12(1.0)) |
Computes the inverse tangnet of an IQ12 format input.
A | IQ12 format input. |
#define _IQ11atan | ( | A | ) | _IQ11atan2(A, _IQ11(1.0)) |
Computes the inverse tangnet of an IQ11 format input.
A | IQ11 format input. |
#define _IQ10atan | ( | A | ) | _IQ10atan2(A, _IQ10(1.0)) |
Computes the inverse tangnet of an IQ10 format input.
A | IQ10 format input. |
Computes the inverse tangnet of an IQ9 format input.
A | IQ9 format input. |
Computes the inverse tangnet of an IQ8 format input.
A | IQ8 format input. |
Computes the inverse tangnet of an IQ7 format input.
A | IQ7 format input. |
Computes the inverse tangnet of an IQ6 format input.
A | IQ6 format input. |
Computes the inverse tangnet of an IQ5 format input.
A | IQ5 format input. |
Computes the inverse tangnet of an IQ4 format input.
A | IQ4 format input. |
Computes the inverse tangnet of an IQ3 format input.
A | IQ3 format input. |
Computes the inverse tangnet of an IQ2 format input.
A | IQ2 format input. |
Computes the inverse tangnet of an IQ1 format input.
A | IQ1 format input. |
#define _IQatan | ( | A | ) | _IQ24atan2(A, _IQ24(1.0)) |
Computes the inverse tangent of a global IQ format input.
A | Global IQ format input. |
#define _IQsqrt | ( | A | ) | _IQ24sqrt(A) |
Calculate square root of a global IQ format input.
A | Global IQ format input. |
#define _IQisqrt | ( | A | ) | _IQ24isqrt(A) |
Computes 1 over the square root of a global IQ format number.
A | Global IQ format input. |
#define _IQexp | ( | A | ) | _IQ24exp(A) |
Computes the exponential of a global IQ format input.
A | Global IQ format input. |
#define _IQlog | ( | A | ) | _IQ24log(A) |
Computes the base-e logarithm of a global IQ format input.
A | Global IQ format input. |
#define _IQ30int | ( | A | ) | ((A) >> 30) |
Returns the integer portion of an IQ30 type number.
A | IQ30 type input. |
#define _IQ29int | ( | A | ) | ((A) >> 29) |
Returns the integer portion of an IQ29 type number.
A | IQ29 type input. |
#define _IQ28int | ( | A | ) | ((A) >> 28) |
Returns the integer portion of an IQ28 type number.
A | IQ28 type input. |
#define _IQ27int | ( | A | ) | ((A) >> 27) |
Returns the integer portion of an IQ27 type number.
A | IQ27 type input. |
#define _IQ26int | ( | A | ) | ((A) >> 26) |
Returns the integer portion of an IQ26 type number.
A | IQ26 type input. |
#define _IQ25int | ( | A | ) | ((A) >> 25) |
Returns the integer portion of an IQ25 type number.
A | IQ25 type input. |
#define _IQ24int | ( | A | ) | ((A) >> 24) |
Returns the integer portion of an IQ24 type number.
A | IQ24 type input. |
#define _IQ23int | ( | A | ) | ((A) >> 23) |
Returns the integer portion of an IQ23 type number.
A | IQ23 type input. |
#define _IQ22int | ( | A | ) | ((A) >> 22) |
Returns the integer portion of an IQ22 type number.
A | IQ22 type input. |
#define _IQ21int | ( | A | ) | ((A) >> 21) |
Returns the integer portion of an IQ21 type number.
A | IQ21 type input. |
#define _IQ20int | ( | A | ) | ((A) >> 20) |
Returns the integer portion of an IQ20 type number.
A | IQ20 type input. |
#define _IQ19int | ( | A | ) | ((A) >> 19) |
Returns the integer portion of an IQ19 type number.
A | IQ19 type input. |
#define _IQ18int | ( | A | ) | ((A) >> 18) |
Returns the integer portion of an IQ18 type number.
A | IQ18 type input. |
#define _IQ17int | ( | A | ) | ((A) >> 17) |
Returns the integer portion of an IQ17 type number.
A | IQ17 type input. |
#define _IQ16int | ( | A | ) | ((A) >> 16) |
Returns the integer portion of an IQ16 type number.
A | IQ16 type input. |
#define _IQ15int | ( | A | ) | ((A) >> 15) |
Returns the integer portion of an IQ15 type number.
A | IQ15 type input. |
#define _IQ14int | ( | A | ) | ((A) >> 14) |
Returns the integer portion of an IQ14 type number.
A | IQ14 type input. |
#define _IQ13int | ( | A | ) | ((A) >> 13) |
Returns the integer portion of an IQ13 type number.
A | IQ13 type input. |
#define _IQ12int | ( | A | ) | ((A) >> 12) |
Returns the integer portion of an IQ12 type number.
A | IQ12 type input. |
#define _IQ11int | ( | A | ) | ((A) >> 11) |
Returns the integer portion of an IQ11 type number.
A | IQ11 type input. |
#define _IQ10int | ( | A | ) | ((A) >> 10) |
Returns the integer portion of an IQ10 type number.
A | IQ10 type input. |
#define _IQ9int | ( | A | ) | ((A) >> 9) |
Returns the integer portion of an IQ9 type number.
A | IQ9 type input. |
#define _IQ8int | ( | A | ) | ((A) >> 8) |
Returns the integer portion of an IQ8 type number.
A | IQ8 type input. |
#define _IQ7int | ( | A | ) | ((A) >> 7) |
Returns the integer portion of an IQ7 type number.
A | IQ7 type input. |
#define _IQ6int | ( | A | ) | ((A) >> 6) |
Returns the integer portion of an IQ6 type number.
A | IQ6 type input. |
#define _IQ5int | ( | A | ) | ((A) >> 5) |
Returns the integer portion of an IQ5 type number.
A | IQ5 type input. |
#define _IQ4int | ( | A | ) | ((A) >> 4) |
Returns the integer portion of an IQ4 type number.
A | IQ4 type input. |
#define _IQ3int | ( | A | ) | ((A) >> 3) |
Returns the integer portion of an IQ3 type number.
A | IQ3 type input. |
#define _IQ2int | ( | A | ) | ((A) >> 2) |
Returns the integer portion of an IQ2 type number.
A | IQ2 type input. |
#define _IQ1int | ( | A | ) | ((A) >> 1) |
Returns the integer portion of an IQ1 type number.
A | IQ1 type input. |
#define _IQint | ( | A | ) | ((A) >> GLOBAL_IQ) |
Returns the integer portion of a global IQ format number.
A | Global IQ format input. |
#define _IQfrac | ( | A | ) | _IQ24frac(A) |
Computes the fractional portion a global IQ format number.
A | Global IQ format input. |
#define _IQmpyIQX | ( | A, | |
n1, | |||
B, | |||
n2 | |||
) | _IQ24mpyIQX(A, n1, B, n2) |
Multiply two IQ numbers in different IQ formats, returning the product in global IQ format.
A | IQN1 format input to be multiplied. |
n1 | IQ format for first value. |
B | IQN2 format input to be multiplied. |
n2 | IQ format for second value. |
#define _IQ30mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ30 numbers.
A | IQ30 type input. |
B | IQ30 type input |
#define _IQ29mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ29 numbers.
A | IQ29 type input. |
B | IQ29 type input |
#define _IQ28mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ28 numbers.
A | IQ28 type input. |
B | IQ28 type input |
#define _IQ27mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ27 numbers.
A | IQ27 type input. |
B | IQ27 type input |
#define _IQ26mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ26 numbers.
A | IQ26 type input. |
B | IQ26 type input |
#define _IQ25mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ25 numbers.
A | IQ25 type input. |
B | IQ25 type input |
#define _IQ24mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ24 numbers.
A | IQ24 type input. |
B | IQ24 type input |
#define _IQ23mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ23 numbers.
A | IQ23 type input. |
B | IQ23 type input |
#define _IQ22mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ22 numbers.
A | IQ22 type input. |
B | IQ22 type input |
#define _IQ21mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ21 numbers.
A | IQ21 type input. |
B | IQ21 type input |
#define _IQ20mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ20 numbers.
A | IQ20 type input. |
B | IQ20 type input |
#define _IQ19mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ19 numbers.
A | IQ19 type input. |
B | IQ19 type input |
#define _IQ18mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ18 numbers.
A | IQ18 type input. |
B | IQ18 type input |
#define _IQ17mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ17 numbers.
A | IQ17 type input. |
B | IQ17 type input |
#define _IQ16mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ16 numbers.
A | IQ16 type input. |
B | IQ16 type input |
#define _IQ15mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ15 numbers.
A | IQ15 type input. |
B | IQ15 type input |
#define _IQ14mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ14 numbers.
A | IQ14 type input. |
B | IQ14 type input |
#define _IQ13mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ13 numbers.
A | IQ13 type input. |
B | IQ13 type input |
#define _IQ12mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ12 numbers.
A | IQ12 type input. |
B | IQ12 type input |
#define _IQ11mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ11 numbers.
A | IQ11 type input. |
B | IQ11 type input |
#define _IQ10mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ10 numbers.
A | IQ10 type input. |
B | IQ10 type input |
#define _IQ9mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ9 numbers.
A | IQ9 type input. |
B | IQ9 type input |
#define _IQ8mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ8 numbers.
A | IQ8 type input. |
B | IQ8 type input |
#define _IQ7mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ7 numbers.
A | IQ7 type input. |
B | IQ7 type input |
#define _IQ6mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ6 numbers.
A | IQ6 type input. |
B | IQ6 type input |
#define _IQ5mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ5 numbers.
A | IQ5 type input. |
B | IQ5 type input |
#define _IQ4mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ4 numbers.
A | IQ4 type input. |
B | IQ4 type input |
#define _IQ3mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ3 numbers.
A | IQ3 type input. |
B | IQ3 type input |
#define _IQ2mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ2 numbers.
A | IQ2 type input. |
B | IQ2 type input |
#define _IQ1mag | ( | A, | |
B | |||
) | _IQmag(A, B) |
Computes the square root of A^2 + B^2 using IQ1 numbers.
A | IQ1 type input. |
B | IQ1 type input |
#define _IQimag | ( | A, | |
B | |||
) | _IQ24imag(A, B) |
Computes the inverse square root of A^2 + B^2 using IQ1 numbers.
A | Global IQ format input. |
B | Global IQ format input |
#define _atoIQ | ( | A | ) | _atoIQ24(A) |
Converts a string into a global IQ format number.
A | String input. |
#define _IQtoa | ( | A, | |
B, | |||
C | |||
) | _IQ24toa(A, B, C) |
Converts a global IQ format input into a string.
A | Pointer to the buffer to store the converted IQ number. |
B | The format string specifying how to convert the IQ number. |
C | Global IQ format input. |
#define _IQ30abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ30 number.
A | IQ30 type input. |
#define _IQ29abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ29 number.
A | IQ29 type input. |
#define _IQ28abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ28 number.
A | IQ28 type input. |
#define _IQ27abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ27 number.
A | IQ27 type input. |
#define _IQ26abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ26 number.
A | IQ26 type input. |
#define _IQ25abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ25 number.
A | IQ25 type input. |
#define _IQ24abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ24 number.
A | IQ24 type input. |
#define _IQ23abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ23 number.
A | IQ23 type input. |
#define _IQ22abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ22 number.
A | IQ22 type input. |
#define _IQ21abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ21 number.
A | IQ21 type input. |
#define _IQ20abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ20 number.
A | IQ20 type input. |
#define _IQ19abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ19 number.
A | IQ19 type input. |
#define _IQ18abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ18 number.
A | IQ18 type input. |
#define _IQ17abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ17 number.
A | IQ17 type input. |
#define _IQ16abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ16 number.
A | IQ16 type input. |
#define _IQ15abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ15 number.
A | IQ15 type input. |
#define _IQ14abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ14 number.
A | IQ14 type input. |
#define _IQ13abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ13 number.
A | IQ13 type input. |
#define _IQ12abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ12 number.
A | IQ12 type input. |
#define _IQ11abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ11 number.
A | IQ11 type input. |
#define _IQ10abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ10 number.
A | IQ10 type input. |
#define _IQ9abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ9 number.
A | IQ9 type input. |
#define _IQ8abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ8 number.
A | IQ8 type input. |
#define _IQ7abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ7 number.
A | IQ7 type input. |
#define _IQ6abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ6 number.
A | IQ6 type input. |
#define _IQ5abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ5 number.
A | IQ5 type input. |
#define _IQ4abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ4 number.
A | IQ4 type input. |
#define _IQ3abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ3 number.
A | IQ3 type input. |
#define _IQ2abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ2 number.
A | IQ2 type input. |
#define _IQ1abs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an IQ1 number.
A | IQ1 type input. |
#define _IQabs | ( | A | ) | (((A) < 0) ? - (A) : (A)) |
Computes the absolute value of an global IQ format number.
A | Global IQ format input. |
Referenced by __IQNatan2().
int32_t _IQmag | ( | int32_t | a, |
int32_t | b | ||
) |
Calculate the magnitude of two IQ31 inputs.
a | IQ31 type input. |
b | IQ31 type input. |
References __IQNsqrt(), and TYPE_MAG.