IQMathLibrary  1.0
IQmathLib.h
Go to the documentation of this file.
1 /*!****************************************************************************
2  * @file IQmathLib.h
3  * @brief Library of IQMath operations.
4  *
5  * <hr>
6  ******************************************************************************/
7 #ifndef __IQMATHLIB_H__
8 #define __IQMATHLIB_H__
9 
10 //*****************************************************************************
11 //
12 // If building with a C++ compiler, make all of the definitions in this header
13 // have a C binding.
14 //
15 //*****************************************************************************
16 #ifdef __cplusplus
17 extern "C"
18 {
19 #endif
20 
21 //*****************************************************************************
27 //*****************************************************************************
28 #ifndef GLOBAL_IQ
29 #define GLOBAL_IQ 24
30 #endif
31 
32 //*****************************************************************************
33 //
34 // Include some standard headers.
35 //
36 //*****************************************************************************
37 #include <limits.h>
38 #include <stdlib.h>
39 #include <stdint.h>
40 
41 #ifndef DOXYGEN_SHOULD_SKIP_THIS
42 //*****************************************************************************
43 //
44 // Various Useful Constant Definitions:
45 //
46 //*****************************************************************************
47 #define Q30 30
48 #define Q29 29
49 #define Q28 28
50 #define Q27 27
51 #define Q26 26
52 #define Q25 25
53 #define Q24 24
54 #define Q23 23
55 #define Q22 22
56 #define Q21 21
57 #define Q20 20
58 #define Q19 19
59 #define Q18 18
60 #define Q17 17
61 #define Q16 16
62 #define Q15 15
63 #define Q14 14
64 #define Q13 13
65 #define Q12 12
66 #define Q11 11
67 #define Q10 10
68 #define Q9 9
69 #define Q8 8
70 #define Q7 7
71 #define Q6 6
72 #define Q5 5
73 #define Q4 4
74 #define Q3 3
75 #define Q2 2
76 #define Q1 1
77 #ifndef QG
78 #define QG GLOBAL_IQ
79 #endif
80 
81 #define MAX_IQ_POS LONG_MAX
82 #define MAX_IQ_NEG LONG_MIN
83 #define MIN_IQ_POS 1
84 #define MIN_IQ_NEG -1
85 
86 //*****************************************************************************
87 //
88 // The types for the various IQ formats.
89 //
90 //*****************************************************************************
91 typedef int32_t _iq30;
92 typedef int32_t _iq29;
93 typedef int32_t _iq28;
94 typedef int32_t _iq27;
95 typedef int32_t _iq26;
96 typedef int32_t _iq25;
97 typedef int32_t _iq24;
98 typedef int32_t _iq23;
99 typedef int32_t _iq22;
100 typedef int32_t _iq21;
101 typedef int32_t _iq20;
102 typedef int32_t _iq19;
103 typedef int32_t _iq18;
104 typedef int32_t _iq17;
105 typedef int32_t _iq16;
106 typedef int32_t _iq15;
107 typedef int32_t _iq14;
108 typedef int32_t _iq13;
109 typedef int32_t _iq12;
110 typedef int32_t _iq11;
111 typedef int32_t _iq10;
112 typedef int32_t _iq9;
113 typedef int32_t _iq8;
114 typedef int32_t _iq7;
115 typedef int32_t _iq6;
116 typedef int32_t _iq5;
117 typedef int32_t _iq4;
118 typedef int32_t _iq3;
119 typedef int32_t _iq2;
120 typedef int32_t _iq1;
121 typedef int32_t _iq;
122 
123 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
124 
125 //*****************************************************************************
126 //
127 // Simple multiplies or divides, which are accomplished with simple shifts.
128 //
129 //*****************************************************************************
130 
138 #define _IQmpy2(A) ((A) << 1)
139 
146 #define _IQmpy4(A) ((A) << 2)
147 
154 #define _IQmpy8(A) ((A) << 3)
155 
162 #define _IQmpy16(A) ((A) << 4)
163 
170 #define _IQmpy32(A) ((A) << 5)
171 
178 #define _IQmpy64(A) ((A) << 6)
179 
186 #define _IQdiv2(A) ((A) >> 1)
187 
194 #define _IQdiv4(A) ((A) >> 2)
195 
202 #define _IQdiv8(A) ((A) >> 3)
203 
210 #define _IQdiv16(A) ((A) >> 4)
211 
218 #define _IQdiv32(A) ((A) >> 5)
219 
226 #define _IQdiv64(A) ((A) >> 6)
227 
228 //*****************************************************************************
229 //
230 // Convert a value into an IQ number.
231 //
232 //*****************************************************************************
240 #define _IQ30(A) ((_iq30)((A) * ((_iq30)1 << 30)))
241 
248 #define _IQ29(A) ((_iq29)((A) * ((_iq29)1 << 29)))
249 
256 #define _IQ28(A) ((_iq28)((A) * ((_iq28)1 << 28)))
257 
264 #define _IQ27(A) ((_iq27)((A) * ((_iq27)1 << 27)))
265 
272 #define _IQ26(A) ((_iq26)((A) * ((_iq26)1 << 26)))
273 
280 #define _IQ25(A) ((_iq25)((A) * ((_iq25)1 << 25)))
281 
288 #define _IQ24(A) ((_iq24)((A) * ((_iq24)1 << 24)))
289 
296 #define _IQ23(A) ((_iq23)((A) * ((_iq23)1 << 23)))
297 
304 #define _IQ22(A) ((_iq22)((A) * ((_iq22)1 << 22)))
305 
312 #define _IQ21(A) ((_iq21)((A) * ((_iq21)1 << 21)))
313 
320 #define _IQ20(A) ((_iq20)((A) * ((_iq20)1 << 20)))
321 
328 #define _IQ19(A) ((_iq19)((A) * ((_iq19)1 << 19)))
329 
336 #define _IQ18(A) ((_iq18)((A) * ((_iq18)1 << 18)))
337 
344 #define _IQ17(A) ((_iq17)((A) * ((_iq17)1 << 17)))
345 
352 #define _IQ16(A) ((_iq16)((A) * ((_iq16)1 << 16)))
353 
360 #define _IQ15(A) ((_iq15)((A) * ((_iq15)1 << 15)))
361 
368 #define _IQ14(A) ((_iq14)((A) * ((_iq14)1 << 14)))
369 
376 #define _IQ13(A) ((_iq13)((A) * ((_iq13)1 << 13)))
377 
384 #define _IQ12(A) ((_iq12)((A) * ((_iq12)1 << 12)))
385 
392 #define _IQ11(A) ((_iq11)((A) * ((_iq11)1 << 11)))
393 
400 #define _IQ10(A) ((_iq10)((A) * ((_iq10)1 << 10)))
401 
408 #define _IQ9(A) ((_iq9)((A) * ((_iq9)1 << 9)))
409 
416 #define _IQ8(A) ((_iq8)((A) * ((_iq8)1 << 8)))
417 
424 #define _IQ7(A) ((_iq7)((A) * ((_iq7)1 << 7)))
425 
432 #define _IQ6(A) ((_iq6)((A) * ((_iq6)1 << 6)))
433 
440 #define _IQ5(A) ((_iq5)((A) * ((_iq5)1 << 5)))
441 
448 #define _IQ4(A) ((_iq4)((A) * ((_iq4)1 << 4)))
449 
456 #define _IQ3(A) ((_iq3)((A) * ((_iq3)1 << 3)))
457 
464 #define _IQ2(A) ((_iq2)((A) * ((_iq2)1 << 2)))
465 
472 #define _IQ1(A) ((_iq1)((A) * ((_iq1)1 << 1)))
473 
481 #if GLOBAL_IQ == 30
482 #define _IQ(A) _IQ30(A)
483 #endif
484 #if GLOBAL_IQ == 29
485 #define _IQ(A) _IQ29(A)
486 #endif
487 #if GLOBAL_IQ == 28
488 #define _IQ(A) _IQ28(A)
489 #endif
490 #if GLOBAL_IQ == 27
491 #define _IQ(A) _IQ27(A)
492 #endif
493 #if GLOBAL_IQ == 26
494 #define _IQ(A) _IQ26(A)
495 #endif
496 #if GLOBAL_IQ == 25
497 #define _IQ(A) _IQ25(A)
498 #endif
499 #if GLOBAL_IQ == 24
500 #define _IQ(A) _IQ24(A)
501 #endif
502 #if GLOBAL_IQ == 23
503 #define _IQ(A) _IQ23(A)
504 #endif
505 #if GLOBAL_IQ == 22
506 #define _IQ(A) _IQ22(A)
507 #endif
508 #if GLOBAL_IQ == 21
509 #define _IQ(A) _IQ21(A)
510 #endif
511 #if GLOBAL_IQ == 20
512 #define _IQ(A) _IQ20(A)
513 #endif
514 #if GLOBAL_IQ == 19
515 #define _IQ(A) _IQ19(A)
516 #endif
517 #if GLOBAL_IQ == 18
518 #define _IQ(A) _IQ18(A)
519 #endif
520 #if GLOBAL_IQ == 17
521 #define _IQ(A) _IQ17(A)
522 #endif
523 #if GLOBAL_IQ == 16
524 #define _IQ(A) _IQ16(A)
525 #endif
526 #if GLOBAL_IQ == 15
527 #define _IQ(A) _IQ15(A)
528 #endif
529 #if GLOBAL_IQ == 14
530 #define _IQ(A) _IQ14(A)
531 #endif
532 #if GLOBAL_IQ == 13
533 #define _IQ(A) _IQ13(A)
534 #endif
535 #if GLOBAL_IQ == 12
536 #define _IQ(A) _IQ12(A)
537 #endif
538 #if GLOBAL_IQ == 11
539 #define _IQ(A) _IQ11(A)
540 #endif
541 #if GLOBAL_IQ == 10
542 #define _IQ(A) _IQ10(A)
543 #endif
544 #if GLOBAL_IQ == 9
545 #define _IQ(A) _IQ9(A)
546 #endif
547 #if GLOBAL_IQ == 8
548 #define _IQ(A) _IQ8(A)
549 #endif
550 #if GLOBAL_IQ == 7
551 #define _IQ(A) _IQ7(A)
552 #endif
553 #if GLOBAL_IQ == 6
554 #define _IQ(A) _IQ6(A)
555 #endif
556 #if GLOBAL_IQ == 5
557 #define _IQ(A) _IQ5(A)
558 #endif
559 #if GLOBAL_IQ == 4
560 #define _IQ(A) _IQ4(A)
561 #endif
562 #if GLOBAL_IQ == 3
563 #define _IQ(A) _IQ3(A)
564 #endif
565 #if GLOBAL_IQ == 2
566 #define _IQ(A) _IQ2(A)
567 #endif
568 #if GLOBAL_IQ == 1
569 #define _IQ(A) _IQ1(A)
570 #endif
571 
572 //*****************************************************************************
573 //
574 // Convert an IQ number to a floating point value.
575 //
576 //*****************************************************************************
577 #ifndef DOXYGEN_SHOULD_SKIP_THIS
578 extern float _IQ30toF(_iq30 A);
579 extern float _IQ29toF(_iq29 A);
580 extern float _IQ28toF(_iq28 A);
581 extern float _IQ27toF(_iq27 A);
582 extern float _IQ26toF(_iq26 A);
583 extern float _IQ25toF(_iq25 A);
584 extern float _IQ24toF(_iq24 A);
585 extern float _IQ23toF(_iq23 A);
586 extern float _IQ22toF(_iq22 A);
587 extern float _IQ21toF(_iq21 A);
588 extern float _IQ20toF(_iq20 A);
589 extern float _IQ19toF(_iq19 A);
590 extern float _IQ18toF(_iq18 A);
591 extern float _IQ17toF(_iq17 A);
592 extern float _IQ16toF(_iq16 A);
593 extern float _IQ15toF(_iq15 A);
594 extern float _IQ14toF(_iq14 A);
595 extern float _IQ13toF(_iq13 A);
596 extern float _IQ12toF(_iq12 A);
597 extern float _IQ11toF(_iq11 A);
598 extern float _IQ10toF(_iq10 A);
599 extern float _IQ9toF(_iq9 A);
600 extern float _IQ8toF(_iq8 A);
601 extern float _IQ7toF(_iq7 A);
602 extern float _IQ6toF(_iq6 A);
603 extern float _IQ5toF(_iq5 A);
604 extern float _IQ4toF(_iq4 A);
605 extern float _IQ3toF(_iq3 A);
606 extern float _IQ2toF(_iq2 A);
607 extern float _IQ1toF(_iq1 A);
608 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
609 
617 #if GLOBAL_IQ == 30
618 #define _IQtoF(A) _IQ30toF(A)
619 #endif
620 #if GLOBAL_IQ == 29
621 #define _IQtoF(A) _IQ29toF(A)
622 #endif
623 #if GLOBAL_IQ == 28
624 #define _IQtoF(A) _IQ28toF(A)
625 #endif
626 #if GLOBAL_IQ == 27
627 #define _IQtoF(A) _IQ27toF(A)
628 #endif
629 #if GLOBAL_IQ == 26
630 #define _IQtoF(A) _IQ26toF(A)
631 #endif
632 #if GLOBAL_IQ == 25
633 #define _IQtoF(A) _IQ25toF(A)
634 #endif
635 #if GLOBAL_IQ == 24
636 #define _IQtoF(A) _IQ24toF(A)
637 #endif
638 #if GLOBAL_IQ == 23
639 #define _IQtoF(A) _IQ23toF(A)
640 #endif
641 #if GLOBAL_IQ == 22
642 #define _IQtoF(A) _IQ22toF(A)
643 #endif
644 #if GLOBAL_IQ == 21
645 #define _IQtoF(A) _IQ21toF(A)
646 #endif
647 #if GLOBAL_IQ == 20
648 #define _IQtoF(A) _IQ20toF(A)
649 #endif
650 #if GLOBAL_IQ == 19
651 #define _IQtoF(A) _IQ19toF(A)
652 #endif
653 #if GLOBAL_IQ == 18
654 #define _IQtoF(A) _IQ18toF(A)
655 #endif
656 #if GLOBAL_IQ == 17
657 #define _IQtoF(A) _IQ17toF(A)
658 #endif
659 #if GLOBAL_IQ == 16
660 #define _IQtoF(A) _IQ16toF(A)
661 #endif
662 #if GLOBAL_IQ == 15
663 #define _IQtoF(A) _IQ15toF(A)
664 #endif
665 #if GLOBAL_IQ == 14
666 #define _IQtoF(A) _IQ14toF(A)
667 #endif
668 #if GLOBAL_IQ == 13
669 #define _IQtoF(A) _IQ13toF(A)
670 #endif
671 #if GLOBAL_IQ == 12
672 #define _IQtoF(A) _IQ12toF(A)
673 #endif
674 #if GLOBAL_IQ == 11
675 #define _IQtoF(A) _IQ11toF(A)
676 #endif
677 #if GLOBAL_IQ == 10
678 #define _IQtoF(A) _IQ10toF(A)
679 #endif
680 #if GLOBAL_IQ == 9
681 #define _IQtoF(A) _IQ9toF(A)
682 #endif
683 #if GLOBAL_IQ == 8
684 #define _IQtoF(A) _IQ8toF(A)
685 #endif
686 #if GLOBAL_IQ == 7
687 #define _IQtoF(A) _IQ7toF(A)
688 #endif
689 #if GLOBAL_IQ == 6
690 #define _IQtoF(A) _IQ6toF(A)
691 #endif
692 #if GLOBAL_IQ == 5
693 #define _IQtoF(A) _IQ5toF(A)
694 #endif
695 #if GLOBAL_IQ == 4
696 #define _IQtoF(A) _IQ4toF(A)
697 #endif
698 #if GLOBAL_IQ == 3
699 #define _IQtoF(A) _IQ3toF(A)
700 #endif
701 #if GLOBAL_IQ == 2
702 #define _IQtoF(A) _IQ2toF(A)
703 #endif
704 #if GLOBAL_IQ == 1
705 #define _IQtoF(A) _IQ1toF(A)
706 #endif
707 
708 //*****************************************************************************
709 //
710 // Saturates an IQ number in a given range.
711 //
712 //*****************************************************************************
722 #define _IQsat(A, Pos, Neg) (((A) > (Pos)) ? \
723  (Pos) : \
724  (((A) < (Neg)) ? (Neg) : (A)))
725 
726 #ifndef DOXYGEN_SHOULD_SKIP_THIS
727 //*****************************************************************************
728 //
729 // Converts an IQ number between the global IQ format and a specified IQ
730 // format.
731 //
732 //*****************************************************************************
733 #define _IQtoIQ30(A) ((_iq30)(A) << (30 - GLOBAL_IQ))
734 #define _IQ30toIQ(A) ((_iq30)(A) >> (30 - GLOBAL_IQ))
735 
736 #if (GLOBAL_IQ >= 29)
737 #define _IQtoIQ29(A) ((_iq29)(A) >> (GLOBAL_IQ - 29))
738 #define _IQ29toIQ(A) ((_iq29)(A) << (GLOBAL_IQ - 29))
739 #else
740 #define _IQtoIQ29(A) ((_iq29)(A) << (29 - GLOBAL_IQ))
741 #define _IQ29toIQ(A) ((_iq29)(A) >> (29 - GLOBAL_IQ))
742 #endif
743 
744 #if (GLOBAL_IQ >= 28)
745 #define _IQtoIQ28(A) ((_iq28)(A) >> (GLOBAL_IQ - 28))
746 #define _IQ28toIQ(A) ((_iq28)(A) << (GLOBAL_IQ - 28))
747 #else
748 #define _IQtoIQ28(A) ((_iq28)(A) << (28 - GLOBAL_IQ))
749 #define _IQ28toIQ(A) ((_iq28)(A) >> (28 - GLOBAL_IQ))
750 #endif
751 
752 #if (GLOBAL_IQ >= 27)
753 #define _IQtoIQ27(A) ((_iq27)(A) >> (GLOBAL_IQ - 27))
754 #define _IQ27toIQ(A) ((_iq27)(A) << (GLOBAL_IQ - 27))
755 #else
756 #define _IQtoIQ27(A) ((_iq27)(A) << (27 - GLOBAL_IQ))
757 #define _IQ27toIQ(A) ((_iq27)(A) >> (27 - GLOBAL_IQ))
758 #endif
759 
760 #if (GLOBAL_IQ >= 26)
761 #define _IQtoIQ26(A) ((_iq26)(A) >> (GLOBAL_IQ - 26))
762 #define _IQ26toIQ(A) ((_iq26)(A) << (GLOBAL_IQ - 26))
763 #else
764 #define _IQtoIQ26(A) ((_iq26)(A) << (26 - GLOBAL_IQ))
765 #define _IQ26toIQ(A) ((_iq26)(A) >> (26 - GLOBAL_IQ))
766 #endif
767 
768 #if (GLOBAL_IQ >= 25)
769 #define _IQtoIQ25(A) ((_iq25)(A) >> (GLOBAL_IQ - 25))
770 #define _IQ25toIQ(A) ((_iq25)(A) << (GLOBAL_IQ - 25))
771 #else
772 #define _IQtoIQ25(A) ((_iq25)(A) << (25 - GLOBAL_IQ))
773 #define _IQ25toIQ(A) ((_iq25)(A) >> (25 - GLOBAL_IQ))
774 #endif
775 
776 #if (GLOBAL_IQ >= 24)
777 #define _IQtoIQ24(A) ((_iq24)(A) >> (GLOBAL_IQ - 24))
778 #define _IQ24toIQ(A) ((_iq24)(A) << (GLOBAL_IQ - 24))
779 #else
780 #define _IQtoIQ24(A) ((_iq24)(A) << (24 - GLOBAL_IQ))
781 #define _IQ24toIQ(A) ((_iq24)(A) >> (24 - GLOBAL_IQ))
782 #endif
783 
784 #if (GLOBAL_IQ >= 23)
785 #define _IQtoIQ23(A) ((_iq23)(A) >> (GLOBAL_IQ - 23))
786 #define _IQ23toIQ(A) ((_iq23)(A) << (GLOBAL_IQ - 23))
787 #else
788 #define _IQtoIQ23(A) ((_iq23)(A) << (23 - GLOBAL_IQ))
789 #define _IQ23toIQ(A) ((_iq23)(A) >> (23 - GLOBAL_IQ))
790 #endif
791 
792 #if (GLOBAL_IQ >= 22)
793 #define _IQtoIQ22(A) ((_iq22)(A) >> (GLOBAL_IQ - 22))
794 #define _IQ22toIQ(A) ((_iq22)(A) << (GLOBAL_IQ - 22))
795 #else
796 #define _IQtoIQ22(A) ((_iq22)(A) << (22 - GLOBAL_IQ))
797 #define _IQ22toIQ(A) ((_iq22)(A) >> (22 - GLOBAL_IQ))
798 #endif
799 
800 #if (GLOBAL_IQ >= 21)
801 #define _IQtoIQ21(A) ((_iq21)(A) >> (GLOBAL_IQ - 21))
802 #define _IQ21toIQ(A) ((_iq21)(A) << (GLOBAL_IQ - 21))
803 #else
804 #define _IQtoIQ21(A) ((_iq21)(A) << (21 - GLOBAL_IQ))
805 #define _IQ21toIQ(A) ((_iq21)(A) >> (21 - GLOBAL_IQ))
806 #endif
807 
808 #if (GLOBAL_IQ >= 20)
809 #define _IQtoIQ20(A) ((_iq20)(A) >> (GLOBAL_IQ - 20))
810 #define _IQ20toIQ(A) ((_iq20)(A) << (GLOBAL_IQ - 20))
811 #else
812 #define _IQtoIQ20(A) ((_iq20)(A) << (20 - GLOBAL_IQ))
813 #define _IQ20toIQ(A) ((_iq20)(A) >> (20 - GLOBAL_IQ))
814 #endif
815 
816 #if (GLOBAL_IQ >= 19)
817 #define _IQtoIQ19(A) ((_iq19)(A) >> (GLOBAL_IQ - 19))
818 #define _IQ19toIQ(A) ((_iq19)(A) << (GLOBAL_IQ - 19))
819 #else
820 #define _IQtoIQ19(A) ((_iq19)(A) << (19 - GLOBAL_IQ))
821 #define _IQ19toIQ(A) ((_iq19)(A) >> (19 - GLOBAL_IQ))
822 #endif
823 
824 #if (GLOBAL_IQ >= 18)
825 #define _IQtoIQ18(A) ((_iq18)(A) >> (GLOBAL_IQ - 18))
826 #define _IQ18toIQ(A) ((_iq18)(A) << (GLOBAL_IQ - 18))
827 #else
828 #define _IQtoIQ18(A) ((_iq18)(A) << (18 - GLOBAL_IQ))
829 #define _IQ18toIQ(A) ((_iq18)(A) >> (18 - GLOBAL_IQ))
830 #endif
831 
832 #if (GLOBAL_IQ >= 17)
833 #define _IQtoIQ17(A) ((_iq17)(A) >> (GLOBAL_IQ - 17))
834 #define _IQ17toIQ(A) ((_iq17)(A) << (GLOBAL_IQ - 17))
835 #else
836 #define _IQtoIQ17(A) ((_iq17)(A) << (17 - GLOBAL_IQ))
837 #define _IQ17toIQ(A) ((_iq17)(A) >> (17 - GLOBAL_IQ))
838 #endif
839 
840 #if (GLOBAL_IQ >= 16)
841 #define _IQtoIQ16(A) ((_iq16)(A) >> (GLOBAL_IQ - 16))
842 #define _IQ16toIQ(A) ((_iq16)(A) << (GLOBAL_IQ - 16))
843 #else
844 #define _IQtoIQ16(A) ((_iq16)(A) << (16 - GLOBAL_IQ))
845 #define _IQ16toIQ(A) ((_iq16)(A) >> (16 - GLOBAL_IQ))
846 #endif
847 
848 #if (GLOBAL_IQ >= 15)
849 #define _IQtoIQ15(A) ((_iq15)(A) >> (GLOBAL_IQ - 15))
850 #define _IQ15toIQ(A) ((_iq15)(A) << (GLOBAL_IQ - 15))
851 #else
852 #define _IQtoIQ15(A) ((_iq15)(A) << (15 - GLOBAL_IQ))
853 #define _IQ15toIQ(A) ((_iq15)(A) >> (15 - GLOBAL_IQ))
854 #endif
855 
856 #if (GLOBAL_IQ >= 14)
857 #define _IQtoIQ14(A) ((_iq14)(A) >> (GLOBAL_IQ - 14))
858 #define _IQ14toIQ(A) ((_iq14)(A) << (GLOBAL_IQ - 14))
859 #else
860 #define _IQtoIQ14(A) ((_iq14)(A) << (14 - GLOBAL_IQ))
861 #define _IQ14toIQ(A) ((_iq14)(A) >> (14 - GLOBAL_IQ))
862 #endif
863 
864 #if (GLOBAL_IQ >= 13)
865 #define _IQtoIQ13(A) ((_iq13)(A) >> (GLOBAL_IQ - 13))
866 #define _IQ13toIQ(A) ((_iq13)(A) << (GLOBAL_IQ - 13))
867 #else
868 #define _IQtoIQ13(A) ((_iq13)(A) << (13 - GLOBAL_IQ))
869 #define _IQ13toIQ(A) ((_iq13)(A) >> (13 - GLOBAL_IQ))
870 #endif
871 
872 #if (GLOBAL_IQ >= 12)
873 #define _IQtoIQ12(A) ((_iq12)(A) >> (GLOBAL_IQ - 12))
874 #define _IQ12toIQ(A) ((_iq12)(A) << (GLOBAL_IQ - 12))
875 #else
876 #define _IQtoIQ12(A) ((_iq12)(A) << (12 - GLOBAL_IQ))
877 #define _IQ12toIQ(A) ((_iq12)(A) >> (12 - GLOBAL_IQ))
878 #endif
879 
880 #if (GLOBAL_IQ >= 11)
881 #define _IQtoIQ11(A) ((_iq11)(A) >> (GLOBAL_IQ - 11))
882 #define _IQ11toIQ(A) ((_iq11)(A) << (GLOBAL_IQ - 11))
883 #else
884 #define _IQtoIQ11(A) ((_iq11)(A) << (11 - GLOBAL_IQ))
885 #define _IQ11toIQ(A) ((_iq11)(A) >> (11 - GLOBAL_IQ))
886 #endif
887 
888 #if (GLOBAL_IQ >= 10)
889 #define _IQtoIQ10(A) ((_iq10)(A) >> (GLOBAL_IQ - 10))
890 #define _IQ10toIQ(A) ((_iq10)(A) << (GLOBAL_IQ - 10))
891 #else
892 #define _IQtoIQ10(A) ((_iq10)(A) << (10 - GLOBAL_IQ))
893 #define _IQ10toIQ(A) ((_iq10)(A) >> (10 - GLOBAL_IQ))
894 #endif
895 
896 #if (GLOBAL_IQ >= 9)
897 #define _IQtoIQ9(A) ((_iq9)(A) >> (GLOBAL_IQ - 9))
898 #define _IQ9toIQ(A) ((_iq9)(A) << (GLOBAL_IQ - 9))
899 #else
900 #define _IQtoIQ9(A) ((_iq9)(A) << (9 - GLOBAL_IQ))
901 #define _IQ9toIQ(A) ((_iq9)(A) >> (9 - GLOBAL_IQ))
902 #endif
903 
904 #if (GLOBAL_IQ >= 8)
905 #define _IQtoIQ8(A) ((_iq8)(A) >> (GLOBAL_IQ - 8))
906 #define _IQ8toIQ(A) ((_iq8)(A) << (GLOBAL_IQ - 8))
907 #else
908 #define _IQtoIQ8(A) ((_iq8)(A) << (8 - GLOBAL_IQ))
909 #define _IQ8toIQ(A) ((_iq8)(A) >> (8 - GLOBAL_IQ))
910 #endif
911 
912 #if (GLOBAL_IQ >= 7)
913 #define _IQtoIQ7(A) ((_iq7)(A) >> (GLOBAL_IQ - 7))
914 #define _IQ7toIQ(A) ((_iq7)(A) << (GLOBAL_IQ - 7))
915 #else
916 #define _IQtoIQ7(A) ((_iq7)(A) << (7 - GLOBAL_IQ))
917 #define _IQ7toIQ(A) ((_iq7)(A) >> (7 - GLOBAL_IQ))
918 #endif
919 
920 #if (GLOBAL_IQ >= 6)
921 #define _IQtoIQ6(A) ((_iq6)(A) >> (GLOBAL_IQ - 6))
922 #define _IQ6toIQ(A) ((_iq6)(A) << (GLOBAL_IQ - 6))
923 #else
924 #define _IQtoIQ6(A) ((_iq6)(A) << (6 - GLOBAL_IQ))
925 #define _IQ6toIQ(A) ((_iq6)(A) >> (6 - GLOBAL_IQ))
926 #endif
927 
928 #if (GLOBAL_IQ >= 5)
929 #define _IQtoIQ5(A) ((_iq5)(A) >> (GLOBAL_IQ - 5))
930 #define _IQ5toIQ(A) ((_iq5)(A) << (GLOBAL_IQ - 5))
931 #else
932 #define _IQtoIQ5(A) ((_iq5)(A) << (5 - GLOBAL_IQ))
933 #define _IQ5toIQ(A) ((_iq5)(A) >> (5 - GLOBAL_IQ))
934 #endif
935 
936 #if (GLOBAL_IQ >= 4)
937 #define _IQtoIQ4(A) ((_iq4)(A) >> (GLOBAL_IQ - 4))
938 #define _IQ4toIQ(A) ((_iq4)(A) << (GLOBAL_IQ - 4))
939 #else
940 #define _IQtoIQ4(A) ((_iq4)(A) << (4 - GLOBAL_IQ))
941 #define _IQ4toIQ(A) ((_iq4)(A) >> (4 - GLOBAL_IQ))
942 #endif
943 
944 #if (GLOBAL_IQ >= 3)
945 #define _IQtoIQ3(A) ((_iq3)(A) >> (GLOBAL_IQ - 3))
946 #define _IQ3toIQ(A) ((_iq3)(A) << (GLOBAL_IQ - 3))
947 #else
948 #define _IQtoIQ3(A) ((_iq3)(A) << (3 - GLOBAL_IQ))
949 #define _IQ3toIQ(A) ((_iq3)(A) >> (3 - GLOBAL_IQ))
950 #endif
951 
952 #if (GLOBAL_IQ >= 2)
953 #define _IQtoIQ2(A) ((_iq2)(A) >> (GLOBAL_IQ - 2))
954 #define _IQ2toIQ(A) ((_iq2)(A) << (GLOBAL_IQ - 2))
955 #else
956 #define _IQtoIQ2(A) ((_iq2)(A) << (2 - GLOBAL_IQ))
957 #define _IQ2toIQ(A) ((_iq2)(A) >> (2 - GLOBAL_IQ))
958 #endif
959 
960 #define _IQtoIQ1(A) ((_iq1)(A) >> (GLOBAL_IQ - 1))
961 #define _IQ1toIQ(A) ((_iq1)(A) << (GLOBAL_IQ - 1))
962 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
963 
964 #ifndef DOXYGEN_SHOULD_SKIP_THIS
965 //*****************************************************************************
966 //
967 // Converts an IQ number between a specified IQ format and another
968 // specified IQ format.
969 //
970 // For the functions of type _IQXtoIQY, the values are shifted by the
971 // difference of X and Y, depending on which one is larger. The definition is
972 // as follows:
973 //
974 // #define _IQXtoIQY(A)
975 // If X < Y
976 // ((_iqY) (A) << (Y-X)
977 // else
978 // ((_iqY) (A) >> (X-Y)
979 //
980 //*****************************************************************************
981 /* IQ1 to IQN */
982 #define _IQ1toIQ30(A) ((_iq30)(A) << (29))
983 #define _IQ1toIQ29(A) ((_iq29)(A) << (28))
984 #define _IQ1toIQ28(A) ((_iq28)(A) << (27))
985 #define _IQ1toIQ27(A) ((_iq27)(A) << (26))
986 #define _IQ1toIQ26(A) ((_iq26)(A) << (25))
987 #define _IQ1toIQ25(A) ((_iq25)(A) << (24))
988 #define _IQ1toIQ24(A) ((_iq24)(A) << (23))
989 #define _IQ1toIQ23(A) ((_iq23)(A) << (22))
990 #define _IQ1toIQ22(A) ((_iq22)(A) << (21))
991 #define _IQ1toIQ21(A) ((_iq21)(A) << (20))
992 #define _IQ1toIQ20(A) ((_iq20)(A) << (19))
993 #define _IQ1toIQ19(A) ((_iq19)(A) << (18))
994 #define _IQ1toIQ18(A) ((_iq18)(A) << (17))
995 #define _IQ1toIQ17(A) ((_iq17)(A) << (16))
996 #define _IQ1toIQ16(A) ((_iq16)(A) << (15))
997 #define _IQ1toIQ15(A) ((_iq15)(A) << (14))
998 #define _IQ1toIQ14(A) ((_iq14)(A) << (13))
999 #define _IQ1toIQ13(A) ((_iq13)(A) << (12))
1000 #define _IQ1toIQ12(A) ((_iq12)(A) << (11))
1001 #define _IQ1toIQ11(A) ((_iq11)(A) << (10))
1002 #define _IQ1toIQ10(A) ((_iq10)(A) << (9))
1003 #define _IQ1toIQ9(A) ((_iq9 )(A) << (8))
1004 #define _IQ1toIQ8(A) ((_iq8 )(A) << (7))
1005 #define _IQ1toIQ7(A) ((_iq7 )(A) << (6))
1006 #define _IQ1toIQ6(A) ((_iq6 )(A) << (5))
1007 #define _IQ1toIQ5(A) ((_iq5 )(A) << (4))
1008 #define _IQ1toIQ4(A) ((_iq4 )(A) << (3))
1009 #define _IQ1toIQ3(A) ((_iq3 )(A) << (2))
1010 #define _IQ1toIQ2(A) ((_iq2 )(A) << (1))
1011 
1012 /* IQ2 to IQN */
1013 #define _IQ2toIQ30(A) ((_iq30)(A) << (28))
1014 #define _IQ2toIQ29(A) ((_iq29)(A) << (27))
1015 #define _IQ2toIQ28(A) ((_iq28)(A) << (26))
1016 #define _IQ2toIQ27(A) ((_iq27)(A) << (25))
1017 #define _IQ2toIQ26(A) ((_iq26)(A) << (24))
1018 #define _IQ2toIQ25(A) ((_iq25)(A) << (23))
1019 #define _IQ2toIQ24(A) ((_iq24)(A) << (22))
1020 #define _IQ2toIQ23(A) ((_iq23)(A) << (21))
1021 #define _IQ2toIQ22(A) ((_iq22)(A) << (20))
1022 #define _IQ2toIQ21(A) ((_iq21)(A) << (19))
1023 #define _IQ2toIQ20(A) ((_iq20)(A) << (18))
1024 #define _IQ2toIQ19(A) ((_iq19)(A) << (17))
1025 #define _IQ2toIQ18(A) ((_iq18)(A) << (16))
1026 #define _IQ2toIQ17(A) ((_iq17)(A) << (15))
1027 #define _IQ2toIQ16(A) ((_iq16)(A) << (14))
1028 #define _IQ2toIQ15(A) ((_iq15)(A) << (13))
1029 #define _IQ2toIQ14(A) ((_iq14)(A) << (12))
1030 #define _IQ2toIQ13(A) ((_iq13)(A) << (11))
1031 #define _IQ2toIQ12(A) ((_iq12)(A) << (10))
1032 #define _IQ2toIQ11(A) ((_iq11)(A) << (9))
1033 #define _IQ2toIQ10(A) ((_iq10)(A) << (8))
1034 #define _IQ2toIQ9(A) ((_iq9 )(A) << (7))
1035 #define _IQ2toIQ8(A) ((_iq8 )(A) << (6))
1036 #define _IQ2toIQ7(A) ((_iq7 )(A) << (5))
1037 #define _IQ2toIQ6(A) ((_iq6 )(A) << (4))
1038 #define _IQ2toIQ5(A) ((_iq5 )(A) << (3))
1039 #define _IQ2toIQ4(A) ((_iq4 )(A) << (2))
1040 #define _IQ2toIQ3(A) ((_iq3 )(A) << (1))
1041 #define _IQ2toIQ1(A) ((_iq1 )(A) >> (1))
1042 
1043 /* IQ3 to IQN */
1044 #define _IQ3toIQ30(A) ((_iq30)(A) << (27))
1045 #define _IQ3toIQ29(A) ((_iq29)(A) << (26))
1046 #define _IQ3toIQ28(A) ((_iq28)(A) << (25))
1047 #define _IQ3toIQ27(A) ((_iq27)(A) << (24))
1048 #define _IQ3toIQ26(A) ((_iq26)(A) << (23))
1049 #define _IQ3toIQ25(A) ((_iq25)(A) << (22))
1050 #define _IQ3toIQ24(A) ((_iq24)(A) << (21))
1051 #define _IQ3toIQ23(A) ((_iq23)(A) << (20))
1052 #define _IQ3toIQ22(A) ((_iq22)(A) << (19))
1053 #define _IQ3toIQ21(A) ((_iq21)(A) << (18))
1054 #define _IQ3toIQ20(A) ((_iq20)(A) << (17))
1055 #define _IQ3toIQ19(A) ((_iq19)(A) << (16))
1056 #define _IQ3toIQ18(A) ((_iq18)(A) << (15))
1057 #define _IQ3toIQ17(A) ((_iq17)(A) << (14))
1058 #define _IQ3toIQ16(A) ((_iq16)(A) << (13))
1059 #define _IQ3toIQ15(A) ((_iq15)(A) << (12))
1060 #define _IQ3toIQ14(A) ((_iq14)(A) << (11))
1061 #define _IQ3toIQ13(A) ((_iq13)(A) << (10))
1062 #define _IQ3toIQ12(A) ((_iq12)(A) << (9))
1063 #define _IQ3toIQ11(A) ((_iq11)(A) << (8))
1064 #define _IQ3toIQ10(A) ((_iq10)(A) << (7))
1065 #define _IQ3toIQ9(A) ((_iq9 )(A) << (6))
1066 #define _IQ3toIQ8(A) ((_iq8 )(A) << (5))
1067 #define _IQ3toIQ7(A) ((_iq7 )(A) << (4))
1068 #define _IQ3toIQ6(A) ((_iq6 )(A) << (3))
1069 #define _IQ3toIQ5(A) ((_iq5 )(A) << (2))
1070 #define _IQ3toIQ4(A) ((_iq4 )(A) << (1))
1071 #define _IQ3toIQ2(A) ((_iq2 )(A) >> (1))
1072 #define _IQ3toIQ1(A) ((_iq1 )(A) >> (2))
1073 
1074 /* IQ4 to IQN */
1075 #define _IQ4toIQ30(A) ((_iq30)(A) << (26))
1076 #define _IQ4toIQ29(A) ((_iq29)(A) << (25))
1077 #define _IQ4toIQ28(A) ((_iq28)(A) << (24))
1078 #define _IQ4toIQ27(A) ((_iq27)(A) << (23))
1079 #define _IQ4toIQ26(A) ((_iq26)(A) << (22))
1080 #define _IQ4toIQ25(A) ((_iq25)(A) << (21))
1081 #define _IQ4toIQ24(A) ((_iq24)(A) << (20))
1082 #define _IQ4toIQ23(A) ((_iq23)(A) << (19))
1083 #define _IQ4toIQ22(A) ((_iq22)(A) << (18))
1084 #define _IQ4toIQ21(A) ((_iq21)(A) << (17))
1085 #define _IQ4toIQ20(A) ((_iq20)(A) << (16))
1086 #define _IQ4toIQ19(A) ((_iq19)(A) << (15))
1087 #define _IQ4toIQ18(A) ((_iq18)(A) << (14))
1088 #define _IQ4toIQ17(A) ((_iq17)(A) << (13))
1089 #define _IQ4toIQ16(A) ((_iq16)(A) << (12))
1090 #define _IQ4toIQ15(A) ((_iq15)(A) << (11))
1091 #define _IQ4toIQ14(A) ((_iq14)(A) << (10))
1092 #define _IQ4toIQ13(A) ((_iq13)(A) << (9))
1093 #define _IQ4toIQ12(A) ((_iq12)(A) << (8))
1094 #define _IQ4toIQ11(A) ((_iq11)(A) << (7))
1095 #define _IQ4toIQ10(A) ((_iq10)(A) << (6))
1096 #define _IQ4toIQ9(A) ((_iq9 )(A) << (5))
1097 #define _IQ4toIQ8(A) ((_iq8 )(A) << (4))
1098 #define _IQ4toIQ7(A) ((_iq7 )(A) << (3))
1099 #define _IQ4toIQ6(A) ((_iq6 )(A) << (2))
1100 #define _IQ4toIQ5(A) ((_iq5 )(A) << (1))
1101 #define _IQ4toIQ3(A) ((_iq3 )(A) >> (1))
1102 #define _IQ4toIQ2(A) ((_iq2 )(A) >> (2))
1103 #define _IQ4toIQ1(A) ((_iq1 )(A) >> (3))
1104 
1105 /* IQ5 to IQN */
1106 #define _IQ5toIQ30(A) ((_iq30)(A) << (25))
1107 #define _IQ5toIQ29(A) ((_iq29)(A) << (24))
1108 #define _IQ5toIQ28(A) ((_iq28)(A) << (23))
1109 #define _IQ5toIQ27(A) ((_iq27)(A) << (22))
1110 #define _IQ5toIQ26(A) ((_iq26)(A) << (21))
1111 #define _IQ5toIQ25(A) ((_iq25)(A) << (20))
1112 #define _IQ5toIQ24(A) ((_iq24)(A) << (19))
1113 #define _IQ5toIQ23(A) ((_iq23)(A) << (18))
1114 #define _IQ5toIQ22(A) ((_iq22)(A) << (17))
1115 #define _IQ5toIQ21(A) ((_iq21)(A) << (16))
1116 #define _IQ5toIQ20(A) ((_iq20)(A) << (15))
1117 #define _IQ5toIQ19(A) ((_iq19)(A) << (14))
1118 #define _IQ5toIQ18(A) ((_iq18)(A) << (13))
1119 #define _IQ5toIQ17(A) ((_iq17)(A) << (12))
1120 #define _IQ5toIQ16(A) ((_iq16)(A) << (11))
1121 #define _IQ5toIQ15(A) ((_iq15)(A) << (10))
1122 #define _IQ5toIQ14(A) ((_iq14)(A) << (9))
1123 #define _IQ5toIQ13(A) ((_iq13)(A) << (8))
1124 #define _IQ5toIQ12(A) ((_iq12)(A) << (7))
1125 #define _IQ5toIQ11(A) ((_iq11)(A) << (6))
1126 #define _IQ5toIQ10(A) ((_iq10)(A) << (5))
1127 #define _IQ5toIQ9(A) ((_iq9 )(A) << (4))
1128 #define _IQ5toIQ8(A) ((_iq8 )(A) << (3))
1129 #define _IQ5toIQ7(A) ((_iq7 )(A) << (2))
1130 #define _IQ5toIQ6(A) ((_iq6 )(A) << (1))
1131 #define _IQ5toIQ4(A) ((_iq4 )(A) >> (1))
1132 #define _IQ5toIQ3(A) ((_iq3 )(A) >> (2))
1133 #define _IQ5toIQ2(A) ((_iq2 )(A) >> (3))
1134 #define _IQ5toIQ1(A) ((_iq1 )(A) >> (4))
1135 
1136 /* IQ6 to IQN */
1137 #define _IQ6toIQ30(A) ((_iq30)(A) << (24))
1138 #define _IQ6toIQ29(A) ((_iq29)(A) << (23))
1139 #define _IQ6toIQ28(A) ((_iq28)(A) << (22))
1140 #define _IQ6toIQ27(A) ((_iq27)(A) << (21))
1141 #define _IQ6toIQ26(A) ((_iq26)(A) << (20))
1142 #define _IQ6toIQ25(A) ((_iq25)(A) << (19))
1143 #define _IQ6toIQ24(A) ((_iq24)(A) << (18))
1144 #define _IQ6toIQ23(A) ((_iq23)(A) << (17))
1145 #define _IQ6toIQ22(A) ((_iq22)(A) << (16))
1146 #define _IQ6toIQ21(A) ((_iq21)(A) << (15))
1147 #define _IQ6toIQ20(A) ((_iq20)(A) << (14))
1148 #define _IQ6toIQ19(A) ((_iq19)(A) << (13))
1149 #define _IQ6toIQ18(A) ((_iq18)(A) << (12))
1150 #define _IQ6toIQ17(A) ((_iq17)(A) << (11))
1151 #define _IQ6toIQ16(A) ((_iq16)(A) << (10))
1152 #define _IQ6toIQ15(A) ((_iq15)(A) << (9))
1153 #define _IQ6toIQ14(A) ((_iq14)(A) << (8))
1154 #define _IQ6toIQ13(A) ((_iq13)(A) << (7))
1155 #define _IQ6toIQ12(A) ((_iq12)(A) << (6))
1156 #define _IQ6toIQ11(A) ((_iq11)(A) << (5))
1157 #define _IQ6toIQ10(A) ((_iq10)(A) << (4))
1158 #define _IQ6toIQ9(A) ((_iq9 )(A) << (3))
1159 #define _IQ6toIQ8(A) ((_iq8 )(A) << (2))
1160 #define _IQ6toIQ7(A) ((_iq7 )(A) << (1))
1161 #define _IQ6toIQ5(A) ((_iq5 )(A) >> (1))
1162 #define _IQ6toIQ4(A) ((_iq4 )(A) >> (2))
1163 #define _IQ6toIQ3(A) ((_iq3 )(A) >> (3))
1164 #define _IQ6toIQ2(A) ((_iq2 )(A) >> (4))
1165 #define _IQ6toIQ1(A) ((_iq1 )(A) >> (5))
1166 
1167 /* IQ7 to IQN */
1168 #define _IQ7toIQ30(A) ((_iq30)(A) << (23))
1169 #define _IQ7toIQ29(A) ((_iq29)(A) << (22))
1170 #define _IQ7toIQ28(A) ((_iq28)(A) << (21))
1171 #define _IQ7toIQ27(A) ((_iq27)(A) << (20))
1172 #define _IQ7toIQ26(A) ((_iq26)(A) << (19))
1173 #define _IQ7toIQ25(A) ((_iq25)(A) << (18))
1174 #define _IQ7toIQ24(A) ((_iq24)(A) << (17))
1175 #define _IQ7toIQ23(A) ((_iq23)(A) << (16))
1176 #define _IQ7toIQ22(A) ((_iq22)(A) << (15))
1177 #define _IQ7toIQ21(A) ((_iq21)(A) << (14))
1178 #define _IQ7toIQ20(A) ((_iq20)(A) << (13))
1179 #define _IQ7toIQ19(A) ((_iq19)(A) << (12))
1180 #define _IQ7toIQ18(A) ((_iq18)(A) << (11))
1181 #define _IQ7toIQ17(A) ((_iq17)(A) << (10))
1182 #define _IQ7toIQ16(A) ((_iq16)(A) << (9))
1183 #define _IQ7toIQ15(A) ((_iq15)(A) << (8))
1184 #define _IQ7toIQ14(A) ((_iq14)(A) << (7))
1185 #define _IQ7toIQ13(A) ((_iq13)(A) << (6))
1186 #define _IQ7toIQ12(A) ((_iq12)(A) << (5))
1187 #define _IQ7toIQ11(A) ((_iq11)(A) << (4))
1188 #define _IQ7toIQ10(A) ((_iq10)(A) << (3))
1189 #define _IQ7toIQ9(A) ((_iq9 )(A) << (2))
1190 #define _IQ7toIQ8(A) ((_iq8 )(A) << (1))
1191 #define _IQ7toIQ6(A) ((_iq6 )(A) >> (1))
1192 #define _IQ7toIQ5(A) ((_iq5 )(A) >> (2))
1193 #define _IQ7toIQ4(A) ((_iq4 )(A) >> (3))
1194 #define _IQ7toIQ3(A) ((_iq3 )(A) >> (4))
1195 #define _IQ7toIQ2(A) ((_iq2 )(A) >> (5))
1196 #define _IQ7toIQ1(A) ((_iq1 )(A) >> (6))
1197 
1198 /* IQ8 to IQN */
1199 #define _IQ8toIQ30(A) ((_iq30)(A) << (22))
1200 #define _IQ8toIQ29(A) ((_iq29)(A) << (21))
1201 #define _IQ8toIQ28(A) ((_iq28)(A) << (20))
1202 #define _IQ8toIQ27(A) ((_iq27)(A) << (19))
1203 #define _IQ8toIQ26(A) ((_iq26)(A) << (18))
1204 #define _IQ8toIQ25(A) ((_iq25)(A) << (17))
1205 #define _IQ8toIQ24(A) ((_iq24)(A) << (16))
1206 #define _IQ8toIQ23(A) ((_iq23)(A) << (15))
1207 #define _IQ8toIQ22(A) ((_iq22)(A) << (14))
1208 #define _IQ8toIQ21(A) ((_iq21)(A) << (13))
1209 #define _IQ8toIQ20(A) ((_iq20)(A) << (12))
1210 #define _IQ8toIQ19(A) ((_iq19)(A) << (11))
1211 #define _IQ8toIQ18(A) ((_iq18)(A) << (10))
1212 #define _IQ8toIQ17(A) ((_iq17)(A) << (9))
1213 #define _IQ8toIQ16(A) ((_iq16)(A) << (8))
1214 #define _IQ8toIQ15(A) ((_iq15)(A) << (7))
1215 #define _IQ8toIQ14(A) ((_iq14)(A) << (6))
1216 #define _IQ8toIQ13(A) ((_iq13)(A) << (5))
1217 #define _IQ8toIQ12(A) ((_iq12)(A) << (4))
1218 #define _IQ8toIQ11(A) ((_iq11)(A) << (3))
1219 #define _IQ8toIQ10(A) ((_iq10)(A) << (2))
1220 #define _IQ8toIQ9(A) ((_iq9 )(A) << (1))
1221 #define _IQ8toIQ7(A) ((_iq7 )(A) >> (1))
1222 #define _IQ8toIQ6(A) ((_iq6 )(A) >> (2))
1223 #define _IQ8toIQ5(A) ((_iq5 )(A) >> (3))
1224 #define _IQ8toIQ4(A) ((_iq4 )(A) >> (4))
1225 #define _IQ8toIQ3(A) ((_iq3 )(A) >> (5))
1226 #define _IQ8toIQ2(A) ((_iq2 )(A) >> (6))
1227 #define _IQ8toIQ1(A) ((_iq1 )(A) >> (7))
1228 
1229 /* IQ9 to IQN */
1230 #define _IQ9toIQ30(A) ((_iq30)(A) << (21))
1231 #define _IQ9toIQ29(A) ((_iq29)(A) << (20))
1232 #define _IQ9toIQ28(A) ((_iq28)(A) << (19))
1233 #define _IQ9toIQ27(A) ((_iq27)(A) << (18))
1234 #define _IQ9toIQ26(A) ((_iq26)(A) << (17))
1235 #define _IQ9toIQ25(A) ((_iq25)(A) << (16))
1236 #define _IQ9toIQ24(A) ((_iq24)(A) << (15))
1237 #define _IQ9toIQ23(A) ((_iq23)(A) << (14))
1238 #define _IQ9toIQ22(A) ((_iq22)(A) << (13))
1239 #define _IQ9toIQ21(A) ((_iq21)(A) << (12))
1240 #define _IQ9toIQ20(A) ((_iq20)(A) << (11))
1241 #define _IQ9toIQ19(A) ((_iq19)(A) << (10))
1242 #define _IQ9toIQ18(A) ((_iq18)(A) << (9))
1243 #define _IQ9toIQ17(A) ((_iq17)(A) << (8))
1244 #define _IQ9toIQ16(A) ((_iq16)(A) << (7))
1245 #define _IQ9toIQ15(A) ((_iq15)(A) << (6))
1246 #define _IQ9toIQ14(A) ((_iq14)(A) << (5))
1247 #define _IQ9toIQ13(A) ((_iq13)(A) << (4))
1248 #define _IQ9toIQ12(A) ((_iq12)(A) << (3))
1249 #define _IQ9toIQ11(A) ((_iq11)(A) << (2))
1250 #define _IQ9toIQ10(A) ((_iq10)(A) << (1))
1251 #define _IQ9toIQ8(A) ((_iq8 )(A) >> (1))
1252 #define _IQ9toIQ7(A) ((_iq7 )(A) >> (2))
1253 #define _IQ9toIQ6(A) ((_iq6 )(A) >> (3))
1254 #define _IQ9toIQ5(A) ((_iq5 )(A) >> (4))
1255 #define _IQ9toIQ4(A) ((_iq4 )(A) >> (5))
1256 #define _IQ9toIQ3(A) ((_iq3 )(A) >> (6))
1257 #define _IQ9toIQ2(A) ((_iq2 )(A) >> (7))
1258 #define _IQ9toIQ1(A) ((_iq1 )(A) >> (8))
1259 
1260 /* IQ10 to IQN */
1261 #define _IQ10toIQ30(A) ((_iq30)(A) << (20))
1262 #define _IQ10toIQ29(A) ((_iq29)(A) << (19))
1263 #define _IQ10toIQ28(A) ((_iq28)(A) << (18))
1264 #define _IQ10toIQ27(A) ((_iq27)(A) << (17))
1265 #define _IQ10toIQ26(A) ((_iq26)(A) << (16))
1266 #define _IQ10toIQ25(A) ((_iq25)(A) << (15))
1267 #define _IQ10toIQ24(A) ((_iq24)(A) << (14))
1268 #define _IQ10toIQ23(A) ((_iq23)(A) << (13))
1269 #define _IQ10toIQ22(A) ((_iq22)(A) << (12))
1270 #define _IQ10toIQ21(A) ((_iq21)(A) << (11))
1271 #define _IQ10toIQ20(A) ((_iq20)(A) << (10))
1272 #define _IQ10toIQ19(A) ((_iq19)(A) << (9))
1273 #define _IQ10toIQ18(A) ((_iq18)(A) << (8))
1274 #define _IQ10toIQ17(A) ((_iq17)(A) << (7))
1275 #define _IQ10toIQ16(A) ((_iq16)(A) << (6))
1276 #define _IQ10toIQ15(A) ((_iq15)(A) << (5))
1277 #define _IQ10toIQ14(A) ((_iq14)(A) << (4))
1278 #define _IQ10toIQ13(A) ((_iq13)(A) << (3))
1279 #define _IQ10toIQ12(A) ((_iq12)(A) << (2))
1280 #define _IQ10toIQ11(A) ((_iq11)(A) << (1))
1281 #define _IQ10toIQ9(A) ((_iq9 )(A) >> (1))
1282 #define _IQ10toIQ8(A) ((_iq8 )(A) >> (2))
1283 #define _IQ10toIQ7(A) ((_iq7 )(A) >> (3))
1284 #define _IQ10toIQ6(A) ((_iq6 )(A) >> (4))
1285 #define _IQ10toIQ5(A) ((_iq5 )(A) >> (5))
1286 #define _IQ10toIQ4(A) ((_iq4 )(A) >> (6))
1287 #define _IQ10toIQ3(A) ((_iq3 )(A) >> (7))
1288 #define _IQ10toIQ2(A) ((_iq2 )(A) >> (8))
1289 #define _IQ10toIQ1(A) ((_iq1 )(A) >> (9))
1290 
1291 /* IQ11 to IQN */
1292 #define _IQ11toIQ30(A) ((_iq30)(A) << (19))
1293 #define _IQ11toIQ29(A) ((_iq29)(A) << (18))
1294 #define _IQ11toIQ28(A) ((_iq28)(A) << (17))
1295 #define _IQ11toIQ27(A) ((_iq27)(A) << (16))
1296 #define _IQ11toIQ26(A) ((_iq26)(A) << (15))
1297 #define _IQ11toIQ25(A) ((_iq25)(A) << (14))
1298 #define _IQ11toIQ24(A) ((_iq24)(A) << (13))
1299 #define _IQ11toIQ23(A) ((_iq23)(A) << (12))
1300 #define _IQ11toIQ22(A) ((_iq22)(A) << (11))
1301 #define _IQ11toIQ21(A) ((_iq21)(A) << (10))
1302 #define _IQ11toIQ20(A) ((_iq20)(A) << (9))
1303 #define _IQ11toIQ19(A) ((_iq19)(A) << (8))
1304 #define _IQ11toIQ18(A) ((_iq18)(A) << (7))
1305 #define _IQ11toIQ17(A) ((_iq17)(A) << (6))
1306 #define _IQ11toIQ16(A) ((_iq16)(A) << (5))
1307 #define _IQ11toIQ15(A) ((_iq15)(A) << (4))
1308 #define _IQ11toIQ14(A) ((_iq14)(A) << (3))
1309 #define _IQ11toIQ13(A) ((_iq13)(A) << (2))
1310 #define _IQ11toIQ12(A) ((_iq12)(A) << (1))
1311 #define _IQ11toIQ10(A) ((_iq10)(A) >> (1))
1312 #define _IQ11toIQ9(A) ((_iq9 )(A) >> (2))
1313 #define _IQ11toIQ8(A) ((_iq8 )(A) >> (3))
1314 #define _IQ11toIQ7(A) ((_iq7 )(A) >> (4))
1315 #define _IQ11toIQ6(A) ((_iq6 )(A) >> (5))
1316 #define _IQ11toIQ5(A) ((_iq5 )(A) >> (6))
1317 #define _IQ11toIQ4(A) ((_iq4 )(A) >> (7))
1318 #define _IQ11toIQ3(A) ((_iq3 )(A) >> (8))
1319 #define _IQ11toIQ2(A) ((_iq2 )(A) >> (9))
1320 #define _IQ11toIQ1(A) ((_iq1 )(A) >> (10))
1321 
1322 /* IQ12 to IQN */
1323 #define _IQ12toIQ30(A) ((_iq30)(A) << (18))
1324 #define _IQ12toIQ29(A) ((_iq29)(A) << (17))
1325 #define _IQ12toIQ28(A) ((_iq28)(A) << (16))
1326 #define _IQ12toIQ27(A) ((_iq27)(A) << (15))
1327 #define _IQ12toIQ26(A) ((_iq26)(A) << (14))
1328 #define _IQ12toIQ25(A) ((_iq25)(A) << (13))
1329 #define _IQ12toIQ24(A) ((_iq24)(A) << (12))
1330 #define _IQ12toIQ23(A) ((_iq23)(A) << (11))
1331 #define _IQ12toIQ22(A) ((_iq22)(A) << (10))
1332 #define _IQ12toIQ21(A) ((_iq21)(A) << (9))
1333 #define _IQ12toIQ20(A) ((_iq20)(A) << (8))
1334 #define _IQ12toIQ19(A) ((_iq19)(A) << (7))
1335 #define _IQ12toIQ18(A) ((_iq18)(A) << (6))
1336 #define _IQ12toIQ17(A) ((_iq17)(A) << (5))
1337 #define _IQ12toIQ16(A) ((_iq16)(A) << (4))
1338 #define _IQ12toIQ15(A) ((_iq15)(A) << (3))
1339 #define _IQ12toIQ14(A) ((_iq14)(A) << (2))
1340 #define _IQ12toIQ13(A) ((_iq13)(A) << (1))
1341 #define _IQ12toIQ11(A) ((_iq11)(A) >> (1))
1342 #define _IQ12toIQ10(A) ((_iq10)(A) >> (2))
1343 #define _IQ12toIQ9(A) ((_iq9 )(A) >> (3))
1344 #define _IQ12toIQ8(A) ((_iq8 )(A) >> (4))
1345 #define _IQ12toIQ7(A) ((_iq7 )(A) >> (5))
1346 #define _IQ12toIQ6(A) ((_iq6 )(A) >> (6))
1347 #define _IQ12toIQ5(A) ((_iq5 )(A) >> (7))
1348 #define _IQ12toIQ4(A) ((_iq4 )(A) >> (8))
1349 #define _IQ12toIQ3(A) ((_iq3 )(A) >> (9))
1350 #define _IQ12toIQ2(A) ((_iq2 )(A) >> (10))
1351 #define _IQ12toIQ1(A) ((_iq1 )(A) >> (11))
1352 
1353 /* IQ13 to IQN */
1354 #define _IQ13toIQ30(A) ((_iq30)(A) << (17))
1355 #define _IQ13toIQ29(A) ((_iq29)(A) << (16))
1356 #define _IQ13toIQ28(A) ((_iq28)(A) << (15))
1357 #define _IQ13toIQ27(A) ((_iq27)(A) << (14))
1358 #define _IQ13toIQ26(A) ((_iq26)(A) << (13))
1359 #define _IQ13toIQ25(A) ((_iq25)(A) << (12))
1360 #define _IQ13toIQ24(A) ((_iq24)(A) << (11))
1361 #define _IQ13toIQ23(A) ((_iq23)(A) << (10))
1362 #define _IQ13toIQ22(A) ((_iq22)(A) << (9))
1363 #define _IQ13toIQ21(A) ((_iq21)(A) << (8))
1364 #define _IQ13toIQ20(A) ((_iq20)(A) << (7))
1365 #define _IQ13toIQ19(A) ((_iq19)(A) << (6))
1366 #define _IQ13toIQ18(A) ((_iq18)(A) << (5))
1367 #define _IQ13toIQ17(A) ((_iq17)(A) << (4))
1368 #define _IQ13toIQ16(A) ((_iq16)(A) << (3))
1369 #define _IQ13toIQ15(A) ((_iq15)(A) << (2))
1370 #define _IQ13toIQ14(A) ((_iq14)(A) << (1))
1371 #define _IQ13toIQ12(A) ((_iq12)(A) >> (1))
1372 #define _IQ13toIQ11(A) ((_iq11)(A) >> (2))
1373 #define _IQ13toIQ10(A) ((_iq10)(A) >> (3))
1374 #define _IQ13toIQ9(A) ((_iq9 )(A) >> (4))
1375 #define _IQ13toIQ8(A) ((_iq8 )(A) >> (5))
1376 #define _IQ13toIQ7(A) ((_iq7 )(A) >> (6))
1377 #define _IQ13toIQ6(A) ((_iq6 )(A) >> (7))
1378 #define _IQ13toIQ5(A) ((_iq5 )(A) >> (8))
1379 #define _IQ13toIQ4(A) ((_iq4 )(A) >> (9))
1380 #define _IQ13toIQ3(A) ((_iq3 )(A) >> (10))
1381 #define _IQ13toIQ2(A) ((_iq2 )(A) >> (11))
1382 #define _IQ13toIQ1(A) ((_iq1 )(A) >> (12))
1383 
1384 /* IQ14 to IQN */
1385 #define _IQ14toIQ30(A) ((_iq30)(A) << (16))
1386 #define _IQ14toIQ29(A) ((_iq29)(A) << (15))
1387 #define _IQ14toIQ28(A) ((_iq28)(A) << (14))
1388 #define _IQ14toIQ27(A) ((_iq27)(A) << (13))
1389 #define _IQ14toIQ26(A) ((_iq26)(A) << (12))
1390 #define _IQ14toIQ25(A) ((_iq25)(A) << (11))
1391 #define _IQ14toIQ24(A) ((_iq24)(A) << (10))
1392 #define _IQ14toIQ23(A) ((_iq23)(A) << (9))
1393 #define _IQ14toIQ22(A) ((_iq22)(A) << (8))
1394 #define _IQ14toIQ21(A) ((_iq21)(A) << (7))
1395 #define _IQ14toIQ20(A) ((_iq20)(A) << (6))
1396 #define _IQ14toIQ19(A) ((_iq19)(A) << (5))
1397 #define _IQ14toIQ18(A) ((_iq18)(A) << (4))
1398 #define _IQ14toIQ17(A) ((_iq17)(A) << (3))
1399 #define _IQ14toIQ16(A) ((_iq16)(A) << (2))
1400 #define _IQ14toIQ15(A) ((_iq15)(A) << (1))
1401 #define _IQ14toIQ13(A) ((_iq13)(A) >> (1))
1402 #define _IQ14toIQ12(A) ((_iq12)(A) >> (2))
1403 #define _IQ14toIQ11(A) ((_iq11)(A) >> (3))
1404 #define _IQ14toIQ10(A) ((_iq10)(A) >> (4))
1405 #define _IQ14toIQ9(A) ((_iq9 )(A) >> (5))
1406 #define _IQ14toIQ8(A) ((_iq8 )(A) >> (6))
1407 #define _IQ14toIQ7(A) ((_iq7 )(A) >> (7))
1408 #define _IQ14toIQ6(A) ((_iq6 )(A) >> (8))
1409 #define _IQ14toIQ5(A) ((_iq5 )(A) >> (9))
1410 #define _IQ14toIQ4(A) ((_iq4 )(A) >> (10))
1411 #define _IQ14toIQ3(A) ((_iq3 )(A) >> (11))
1412 #define _IQ14toIQ2(A) ((_iq2 )(A) >> (12))
1413 #define _IQ14toIQ1(A) ((_iq1 )(A) >> (13))
1414 
1415 /* IQ15 to IQN */
1416 #define _IQ15toIQ30(A) ((_iq30)(A) << (15))
1417 #define _IQ15toIQ29(A) ((_iq29)(A) << (14))
1418 #define _IQ15toIQ28(A) ((_iq28)(A) << (13))
1419 #define _IQ15toIQ27(A) ((_iq27)(A) << (12))
1420 #define _IQ15toIQ26(A) ((_iq26)(A) << (11))
1421 #define _IQ15toIQ25(A) ((_iq25)(A) << (10))
1422 #define _IQ15toIQ24(A) ((_iq24)(A) << (9))
1423 #define _IQ15toIQ23(A) ((_iq23)(A) << (8))
1424 #define _IQ15toIQ22(A) ((_iq22)(A) << (7))
1425 #define _IQ15toIQ21(A) ((_iq21)(A) << (6))
1426 #define _IQ15toIQ20(A) ((_iq20)(A) << (5))
1427 #define _IQ15toIQ19(A) ((_iq19)(A) << (4))
1428 #define _IQ15toIQ18(A) ((_iq18)(A) << (3))
1429 #define _IQ15toIQ17(A) ((_iq17)(A) << (2))
1430 #define _IQ15toIQ16(A) ((_iq16)(A) << (1))
1431 #define _IQ15toIQ14(A) ((_iq14)(A) >> (1))
1432 #define _IQ15toIQ13(A) ((_iq13)(A) >> (2))
1433 #define _IQ15toIQ12(A) ((_iq12)(A) >> (3))
1434 #define _IQ15toIQ11(A) ((_iq11)(A) >> (4))
1435 #define _IQ15toIQ10(A) ((_iq10)(A) >> (5))
1436 #define _IQ15toIQ9(A) ((_iq9 )(A) >> (6))
1437 #define _IQ15toIQ8(A) ((_iq8 )(A) >> (7))
1438 #define _IQ15toIQ7(A) ((_iq7 )(A) >> (8))
1439 #define _IQ15toIQ6(A) ((_iq6 )(A) >> (9))
1440 #define _IQ15toIQ5(A) ((_iq5 )(A) >> (10))
1441 #define _IQ15toIQ4(A) ((_iq4 )(A) >> (11))
1442 #define _IQ15toIQ3(A) ((_iq3 )(A) >> (12))
1443 #define _IQ15toIQ2(A) ((_iq2 )(A) >> (13))
1444 #define _IQ15toIQ1(A) ((_iq1 )(A) >> (14))
1445 
1446 /* IQ16 to IQN */
1447 #define _IQ16toIQ30(A) ((_iq30)(A) << (14))
1448 #define _IQ16toIQ29(A) ((_iq29)(A) << (13))
1449 #define _IQ16toIQ28(A) ((_iq28)(A) << (12))
1450 #define _IQ16toIQ27(A) ((_iq27)(A) << (11))
1451 #define _IQ16toIQ26(A) ((_iq26)(A) << (10))
1452 #define _IQ16toIQ25(A) ((_iq25)(A) << (9))
1453 #define _IQ16toIQ24(A) ((_iq24)(A) << (8))
1454 #define _IQ16toIQ23(A) ((_iq23)(A) << (7))
1455 #define _IQ16toIQ22(A) ((_iq22)(A) << (6))
1456 #define _IQ16toIQ21(A) ((_iq21)(A) << (5))
1457 #define _IQ16toIQ20(A) ((_iq20)(A) << (4))
1458 #define _IQ16toIQ19(A) ((_iq19)(A) << (3))
1459 #define _IQ16toIQ18(A) ((_iq18)(A) << (2))
1460 #define _IQ16toIQ17(A) ((_iq17)(A) << (1))
1461 #define _IQ16toIQ15(A) ((_iq15)(A) >> (1))
1462 #define _IQ16toIQ14(A) ((_iq14)(A) >> (2))
1463 #define _IQ16toIQ13(A) ((_iq13)(A) >> (3))
1464 #define _IQ16toIQ12(A) ((_iq12)(A) >> (4))
1465 #define _IQ16toIQ11(A) ((_iq11)(A) >> (5))
1466 #define _IQ16toIQ10(A) ((_iq10)(A) >> (6))
1467 #define _IQ16toIQ9(A) ((_iq9 )(A) >> (7))
1468 #define _IQ16toIQ8(A) ((_iq8 )(A) >> (8))
1469 #define _IQ16toIQ7(A) ((_iq7 )(A) >> (9))
1470 #define _IQ16toIQ6(A) ((_iq6 )(A) >> (10))
1471 #define _IQ16toIQ5(A) ((_iq5 )(A) >> (11))
1472 #define _IQ16toIQ4(A) ((_iq4 )(A) >> (12))
1473 #define _IQ16toIQ3(A) ((_iq3 )(A) >> (13))
1474 #define _IQ16toIQ2(A) ((_iq2 )(A) >> (14))
1475 #define _IQ16toIQ1(A) ((_iq1 )(A) >> (15))
1476 
1477 /* IQ17 to IQN */
1478 #define _IQ17toIQ30(A) ((_iq30)(A) << (13))
1479 #define _IQ17toIQ29(A) ((_iq29)(A) << (12))
1480 #define _IQ17toIQ28(A) ((_iq28)(A) << (11))
1481 #define _IQ17toIQ27(A) ((_iq27)(A) << (10))
1482 #define _IQ17toIQ26(A) ((_iq26)(A) << (9))
1483 #define _IQ17toIQ25(A) ((_iq25)(A) << (8))
1484 #define _IQ17toIQ24(A) ((_iq24)(A) << (7))
1485 #define _IQ17toIQ23(A) ((_iq23)(A) << (6))
1486 #define _IQ17toIQ22(A) ((_iq22)(A) << (5))
1487 #define _IQ17toIQ21(A) ((_iq21)(A) << (4))
1488 #define _IQ17toIQ20(A) ((_iq20)(A) << (3))
1489 #define _IQ17toIQ19(A) ((_iq19)(A) << (2))
1490 #define _IQ17toIQ18(A) ((_iq18)(A) << (1))
1491 #define _IQ17toIQ16(A) ((_iq16)(A) >> (1))
1492 #define _IQ17toIQ15(A) ((_iq15)(A) >> (2))
1493 #define _IQ17toIQ14(A) ((_iq14)(A) >> (3))
1494 #define _IQ17toIQ13(A) ((_iq13)(A) >> (4))
1495 #define _IQ17toIQ12(A) ((_iq12)(A) >> (5))
1496 #define _IQ17toIQ11(A) ((_iq11)(A) >> (6))
1497 #define _IQ17toIQ10(A) ((_iq10)(A) >> (7))
1498 #define _IQ17toIQ9(A) ((_iq9 )(A) >> (8))
1499 #define _IQ17toIQ8(A) ((_iq8 )(A) >> (9))
1500 #define _IQ17toIQ7(A) ((_iq7 )(A) >> (10))
1501 #define _IQ17toIQ6(A) ((_iq6 )(A) >> (11))
1502 #define _IQ17toIQ5(A) ((_iq5 )(A) >> (12))
1503 #define _IQ17toIQ4(A) ((_iq4 )(A) >> (13))
1504 #define _IQ17toIQ3(A) ((_iq3 )(A) >> (14))
1505 #define _IQ17toIQ2(A) ((_iq2 )(A) >> (15))
1506 #define _IQ17toIQ1(A) ((_iq1 )(A) >> (16))
1507 
1508 /* IQ18 to IQN */
1509 #define _IQ18toIQ30(A) ((_iq30)(A) << (12))
1510 #define _IQ18toIQ29(A) ((_iq29)(A) << (11))
1511 #define _IQ18toIQ28(A) ((_iq28)(A) << (10))
1512 #define _IQ18toIQ27(A) ((_iq27)(A) << (9))
1513 #define _IQ18toIQ26(A) ((_iq26)(A) << (8))
1514 #define _IQ18toIQ25(A) ((_iq25)(A) << (7))
1515 #define _IQ18toIQ24(A) ((_iq24)(A) << (6))
1516 #define _IQ18toIQ23(A) ((_iq23)(A) << (5))
1517 #define _IQ18toIQ22(A) ((_iq22)(A) << (4))
1518 #define _IQ18toIQ21(A) ((_iq21)(A) << (3))
1519 #define _IQ18toIQ20(A) ((_iq20)(A) << (2))
1520 #define _IQ18toIQ19(A) ((_iq19)(A) << (1))
1521 #define _IQ18toIQ17(A) ((_iq17)(A) >> (1))
1522 #define _IQ18toIQ16(A) ((_iq16)(A) >> (2))
1523 #define _IQ18toIQ15(A) ((_iq15)(A) >> (3))
1524 #define _IQ18toIQ14(A) ((_iq14)(A) >> (4))
1525 #define _IQ18toIQ13(A) ((_iq13)(A) >> (5))
1526 #define _IQ18toIQ12(A) ((_iq12)(A) >> (6))
1527 #define _IQ18toIQ11(A) ((_iq11)(A) >> (7))
1528 #define _IQ18toIQ10(A) ((_iq10)(A) >> (8))
1529 #define _IQ18toIQ9(A) ((_iq9 )(A) >> (9))
1530 #define _IQ18toIQ8(A) ((_iq8 )(A) >> (10))
1531 #define _IQ18toIQ7(A) ((_iq7 )(A) >> (11))
1532 #define _IQ18toIQ6(A) ((_iq6 )(A) >> (12))
1533 #define _IQ18toIQ5(A) ((_iq5 )(A) >> (13))
1534 #define _IQ18toIQ4(A) ((_iq4 )(A) >> (14))
1535 #define _IQ18toIQ3(A) ((_iq3 )(A) >> (15))
1536 #define _IQ18toIQ2(A) ((_iq2 )(A) >> (16))
1537 #define _IQ18toIQ1(A) ((_iq1 )(A) >> (17))
1538 
1539 /* IQ19 to IQN */
1540 #define _IQ19toIQ30(A) ((_iq30)(A) << (11))
1541 #define _IQ19toIQ29(A) ((_iq29)(A) << (10))
1542 #define _IQ19toIQ28(A) ((_iq28)(A) << (9))
1543 #define _IQ19toIQ27(A) ((_iq27)(A) << (8))
1544 #define _IQ19toIQ26(A) ((_iq26)(A) << (7))
1545 #define _IQ19toIQ25(A) ((_iq25)(A) << (6))
1546 #define _IQ19toIQ24(A) ((_iq24)(A) << (5))
1547 #define _IQ19toIQ23(A) ((_iq23)(A) << (4))
1548 #define _IQ19toIQ22(A) ((_iq22)(A) << (3))
1549 #define _IQ19toIQ21(A) ((_iq21)(A) << (2))
1550 #define _IQ19toIQ20(A) ((_iq20)(A) << (1))
1551 #define _IQ19toIQ18(A) ((_iq18)(A) >> (1))
1552 #define _IQ19toIQ17(A) ((_iq17)(A) >> (2))
1553 #define _IQ19toIQ16(A) ((_iq16)(A) >> (3))
1554 #define _IQ19toIQ15(A) ((_iq15)(A) >> (4))
1555 #define _IQ19toIQ14(A) ((_iq14)(A) >> (5))
1556 #define _IQ19toIQ13(A) ((_iq13)(A) >> (6))
1557 #define _IQ19toIQ12(A) ((_iq12)(A) >> (7))
1558 #define _IQ19toIQ11(A) ((_iq11)(A) >> (8))
1559 #define _IQ19toIQ10(A) ((_iq10)(A) >> (9))
1560 #define _IQ19toIQ9(A) ((_iq9 )(A) >> (10))
1561 #define _IQ19toIQ8(A) ((_iq8 )(A) >> (11))
1562 #define _IQ19toIQ7(A) ((_iq7 )(A) >> (12))
1563 #define _IQ19toIQ6(A) ((_iq6 )(A) >> (13))
1564 #define _IQ19toIQ5(A) ((_iq5 )(A) >> (14))
1565 #define _IQ19toIQ4(A) ((_iq4 )(A) >> (15))
1566 #define _IQ19toIQ3(A) ((_iq3 )(A) >> (16))
1567 #define _IQ19toIQ2(A) ((_iq2 )(A) >> (17))
1568 #define _IQ19toIQ1(A) ((_iq1 )(A) >> (18))
1569 
1570 /* IQ20 to IQN */
1571 #define _IQ20toIQ30(A) ((_iq30)(A) << (10))
1572 #define _IQ20toIQ29(A) ((_iq29)(A) << (9))
1573 #define _IQ20toIQ28(A) ((_iq28)(A) << (8))
1574 #define _IQ20toIQ27(A) ((_iq27)(A) << (7))
1575 #define _IQ20toIQ26(A) ((_iq26)(A) << (6))
1576 #define _IQ20toIQ25(A) ((_iq25)(A) << (5))
1577 #define _IQ20toIQ24(A) ((_iq24)(A) << (4))
1578 #define _IQ20toIQ23(A) ((_iq23)(A) << (3))
1579 #define _IQ20toIQ22(A) ((_iq22)(A) << (2))
1580 #define _IQ20toIQ21(A) ((_iq21)(A) << (1))
1581 #define _IQ20toIQ19(A) ((_iq19)(A) >> (1))
1582 #define _IQ20toIQ18(A) ((_iq18)(A) >> (2))
1583 #define _IQ20toIQ17(A) ((_iq17)(A) >> (3))
1584 #define _IQ20toIQ16(A) ((_iq16)(A) >> (4))
1585 #define _IQ20toIQ15(A) ((_iq15)(A) >> (5))
1586 #define _IQ20toIQ14(A) ((_iq14)(A) >> (6))
1587 #define _IQ20toIQ13(A) ((_iq13)(A) >> (7))
1588 #define _IQ20toIQ12(A) ((_iq12)(A) >> (8))
1589 #define _IQ20toIQ11(A) ((_iq11)(A) >> (9))
1590 #define _IQ20toIQ10(A) ((_iq10)(A) >> (10))
1591 #define _IQ20toIQ9(A) ((_iq9 )(A) >> (11))
1592 #define _IQ20toIQ8(A) ((_iq8 )(A) >> (12))
1593 #define _IQ20toIQ7(A) ((_iq7 )(A) >> (13))
1594 #define _IQ20toIQ6(A) ((_iq6 )(A) >> (14))
1595 #define _IQ20toIQ5(A) ((_iq5 )(A) >> (15))
1596 #define _IQ20toIQ4(A) ((_iq4 )(A) >> (16))
1597 #define _IQ20toIQ3(A) ((_iq3 )(A) >> (17))
1598 #define _IQ20toIQ2(A) ((_iq2 )(A) >> (18))
1599 #define _IQ20toIQ1(A) ((_iq1 )(A) >> (19))
1600 
1601 /* IQ21 to IQN */
1602 #define _IQ21toIQ30(A) ((_iq30)(A) << (9))
1603 #define _IQ21toIQ29(A) ((_iq29)(A) << (8))
1604 #define _IQ21toIQ28(A) ((_iq28)(A) << (7))
1605 #define _IQ21toIQ27(A) ((_iq27)(A) << (6))
1606 #define _IQ21toIQ26(A) ((_iq26)(A) << (5))
1607 #define _IQ21toIQ25(A) ((_iq25)(A) << (4))
1608 #define _IQ21toIQ24(A) ((_iq24)(A) << (3))
1609 #define _IQ21toIQ23(A) ((_iq23)(A) << (2))
1610 #define _IQ21toIQ22(A) ((_iq22)(A) << (1))
1611 #define _IQ21toIQ20(A) ((_iq20)(A) >> (1))
1612 #define _IQ21toIQ19(A) ((_iq19)(A) >> (2))
1613 #define _IQ21toIQ18(A) ((_iq18)(A) >> (3))
1614 #define _IQ21toIQ17(A) ((_iq17)(A) >> (4))
1615 #define _IQ21toIQ16(A) ((_iq16)(A) >> (5))
1616 #define _IQ21toIQ15(A) ((_iq15)(A) >> (6))
1617 #define _IQ21toIQ14(A) ((_iq14)(A) >> (7))
1618 #define _IQ21toIQ13(A) ((_iq13)(A) >> (8))
1619 #define _IQ21toIQ12(A) ((_iq12)(A) >> (9))
1620 #define _IQ21toIQ11(A) ((_iq11)(A) >> (10))
1621 #define _IQ21toIQ10(A) ((_iq10)(A) >> (11))
1622 #define _IQ21toIQ9(A) ((_iq9 )(A) >> (12))
1623 #define _IQ21toIQ8(A) ((_iq8 )(A) >> (13))
1624 #define _IQ21toIQ7(A) ((_iq7 )(A) >> (14))
1625 #define _IQ21toIQ6(A) ((_iq6 )(A) >> (15))
1626 #define _IQ21toIQ5(A) ((_iq5 )(A) >> (16))
1627 #define _IQ21toIQ4(A) ((_iq4 )(A) >> (17))
1628 #define _IQ21toIQ3(A) ((_iq3 )(A) >> (18))
1629 #define _IQ21toIQ2(A) ((_iq2 )(A) >> (19))
1630 #define _IQ21toIQ1(A) ((_iq1 )(A) >> (20))
1631 
1632 /* IQ22 to IQN */
1633 #define _IQ22toIQ30(A) ((_iq30)(A) << (8))
1634 #define _IQ22toIQ29(A) ((_iq29)(A) << (7))
1635 #define _IQ22toIQ28(A) ((_iq28)(A) << (6))
1636 #define _IQ22toIQ27(A) ((_iq27)(A) << (5))
1637 #define _IQ22toIQ26(A) ((_iq26)(A) << (4))
1638 #define _IQ22toIQ25(A) ((_iq25)(A) << (3))
1639 #define _IQ22toIQ24(A) ((_iq24)(A) << (2))
1640 #define _IQ22toIQ23(A) ((_iq23)(A) << (1))
1641 #define _IQ22toIQ21(A) ((_iq21)(A) >> (1))
1642 #define _IQ22toIQ20(A) ((_iq20)(A) >> (2))
1643 #define _IQ22toIQ19(A) ((_iq19)(A) >> (3))
1644 #define _IQ22toIQ18(A) ((_iq18)(A) >> (4))
1645 #define _IQ22toIQ17(A) ((_iq17)(A) >> (5))
1646 #define _IQ22toIQ16(A) ((_iq16)(A) >> (6))
1647 #define _IQ22toIQ15(A) ((_iq15)(A) >> (7))
1648 #define _IQ22toIQ14(A) ((_iq14)(A) >> (8))
1649 #define _IQ22toIQ13(A) ((_iq13)(A) >> (9))
1650 #define _IQ22toIQ12(A) ((_iq12)(A) >> (10))
1651 #define _IQ22toIQ11(A) ((_iq11)(A) >> (11))
1652 #define _IQ22toIQ10(A) ((_iq10)(A) >> (12))
1653 #define _IQ22toIQ9(A) ((_iq9 )(A) >> (13))
1654 #define _IQ22toIQ8(A) ((_iq8 )(A) >> (14))
1655 #define _IQ22toIQ7(A) ((_iq7 )(A) >> (15))
1656 #define _IQ22toIQ6(A) ((_iq6 )(A) >> (16))
1657 #define _IQ22toIQ5(A) ((_iq5 )(A) >> (17))
1658 #define _IQ22toIQ4(A) ((_iq4 )(A) >> (18))
1659 #define _IQ22toIQ3(A) ((_iq3 )(A) >> (19))
1660 #define _IQ22toIQ2(A) ((_iq2 )(A) >> (20))
1661 #define _IQ22toIQ1(A) ((_iq1 )(A) >> (21))
1662 
1663 /* IQ23 to IQN */
1664 #define _IQ23toIQ30(A) ((_iq30)(A) << (7))
1665 #define _IQ23toIQ29(A) ((_iq29)(A) << (6))
1666 #define _IQ23toIQ28(A) ((_iq28)(A) << (5))
1667 #define _IQ23toIQ27(A) ((_iq27)(A) << (4))
1668 #define _IQ23toIQ26(A) ((_iq26)(A) << (3))
1669 #define _IQ23toIQ25(A) ((_iq25)(A) << (2))
1670 #define _IQ23toIQ24(A) ((_iq24)(A) << (1))
1671 #define _IQ23toIQ22(A) ((_iq22)(A) >> (1))
1672 #define _IQ23toIQ21(A) ((_iq21)(A) >> (2))
1673 #define _IQ23toIQ20(A) ((_iq20)(A) >> (3))
1674 #define _IQ23toIQ19(A) ((_iq19)(A) >> (4))
1675 #define _IQ23toIQ18(A) ((_iq18)(A) >> (5))
1676 #define _IQ23toIQ17(A) ((_iq17)(A) >> (6))
1677 #define _IQ23toIQ16(A) ((_iq16)(A) >> (7))
1678 #define _IQ23toIQ15(A) ((_iq15)(A) >> (8))
1679 #define _IQ23toIQ14(A) ((_iq14)(A) >> (9))
1680 #define _IQ23toIQ13(A) ((_iq13)(A) >> (10))
1681 #define _IQ23toIQ12(A) ((_iq12)(A) >> (11))
1682 #define _IQ23toIQ11(A) ((_iq11)(A) >> (12))
1683 #define _IQ23toIQ10(A) ((_iq10)(A) >> (13))
1684 #define _IQ23toIQ9(A) ((_iq9 )(A) >> (14))
1685 #define _IQ23toIQ8(A) ((_iq8 )(A) >> (15))
1686 #define _IQ23toIQ7(A) ((_iq7 )(A) >> (16))
1687 #define _IQ23toIQ6(A) ((_iq6 )(A) >> (17))
1688 #define _IQ23toIQ5(A) ((_iq5 )(A) >> (18))
1689 #define _IQ23toIQ4(A) ((_iq4 )(A) >> (19))
1690 #define _IQ23toIQ3(A) ((_iq3 )(A) >> (20))
1691 #define _IQ23toIQ2(A) ((_iq2 )(A) >> (21))
1692 #define _IQ23toIQ1(A) ((_iq1 )(A) >> (22))
1693 
1694 /* IQ24 to IQN */
1695 #define _IQ24toIQ30(A) ((_iq30)(A) << (6))
1696 #define _IQ24toIQ29(A) ((_iq29)(A) << (5))
1697 #define _IQ24toIQ28(A) ((_iq28)(A) << (4))
1698 #define _IQ24toIQ27(A) ((_iq27)(A) << (3))
1699 #define _IQ24toIQ26(A) ((_iq26)(A) << (2))
1700 #define _IQ24toIQ25(A) ((_iq25)(A) << (1))
1701 #define _IQ24toIQ23(A) ((_iq23)(A) >> (1))
1702 #define _IQ24toIQ22(A) ((_iq22)(A) >> (2))
1703 #define _IQ24toIQ21(A) ((_iq21)(A) >> (3))
1704 #define _IQ24toIQ20(A) ((_iq20)(A) >> (4))
1705 #define _IQ24toIQ19(A) ((_iq19)(A) >> (5))
1706 #define _IQ24toIQ18(A) ((_iq18)(A) >> (6))
1707 #define _IQ24toIQ17(A) ((_iq17)(A) >> (7))
1708 #define _IQ24toIQ16(A) ((_iq16)(A) >> (8))
1709 #define _IQ24toIQ15(A) ((_iq15)(A) >> (9))
1710 #define _IQ24toIQ14(A) ((_iq14)(A) >> (10))
1711 #define _IQ24toIQ13(A) ((_iq13)(A) >> (11))
1712 #define _IQ24toIQ12(A) ((_iq12)(A) >> (12))
1713 #define _IQ24toIQ11(A) ((_iq11)(A) >> (13))
1714 #define _IQ24toIQ10(A) ((_iq10)(A) >> (14))
1715 #define _IQ24toIQ9(A) ((_iq9 )(A) >> (15))
1716 #define _IQ24toIQ8(A) ((_iq8 )(A) >> (16))
1717 #define _IQ24toIQ7(A) ((_iq7 )(A) >> (17))
1718 #define _IQ24toIQ6(A) ((_iq6 )(A) >> (18))
1719 #define _IQ24toIQ5(A) ((_iq5 )(A) >> (19))
1720 #define _IQ24toIQ4(A) ((_iq4 )(A) >> (20))
1721 #define _IQ24toIQ3(A) ((_iq3 )(A) >> (21))
1722 #define _IQ24toIQ2(A) ((_iq2 )(A) >> (22))
1723 #define _IQ24toIQ1(A) ((_iq1 )(A) >> (23))
1724 
1725 /* IQ25 to IQN */
1726 #define _IQ25toIQ30(A) ((_iq30)(A) << (5))
1727 #define _IQ25toIQ29(A) ((_iq29)(A) << (4))
1728 #define _IQ25toIQ28(A) ((_iq28)(A) << (3))
1729 #define _IQ25toIQ27(A) ((_iq27)(A) << (2))
1730 #define _IQ25toIQ26(A) ((_iq26)(A) << (1))
1731 #define _IQ25toIQ24(A) ((_iq24)(A) >> (1))
1732 #define _IQ25toIQ23(A) ((_iq23)(A) >> (2))
1733 #define _IQ25toIQ22(A) ((_iq22)(A) >> (3))
1734 #define _IQ25toIQ21(A) ((_iq21)(A) >> (4))
1735 #define _IQ25toIQ20(A) ((_iq20)(A) >> (5))
1736 #define _IQ25toIQ19(A) ((_iq19)(A) >> (6))
1737 #define _IQ25toIQ18(A) ((_iq18)(A) >> (7))
1738 #define _IQ25toIQ17(A) ((_iq17)(A) >> (8))
1739 #define _IQ25toIQ16(A) ((_iq16)(A) >> (9))
1740 #define _IQ25toIQ15(A) ((_iq15)(A) >> (10))
1741 #define _IQ25toIQ14(A) ((_iq14)(A) >> (11))
1742 #define _IQ25toIQ13(A) ((_iq13)(A) >> (12))
1743 #define _IQ25toIQ12(A) ((_iq12)(A) >> (13))
1744 #define _IQ25toIQ11(A) ((_iq11)(A) >> (14))
1745 #define _IQ25toIQ10(A) ((_iq10)(A) >> (15))
1746 #define _IQ25toIQ9(A) ((_iq9 )(A) >> (16))
1747 #define _IQ25toIQ8(A) ((_iq8 )(A) >> (17))
1748 #define _IQ25toIQ7(A) ((_iq7 )(A) >> (18))
1749 #define _IQ25toIQ6(A) ((_iq6 )(A) >> (19))
1750 #define _IQ25toIQ5(A) ((_iq5 )(A) >> (20))
1751 #define _IQ25toIQ4(A) ((_iq4 )(A) >> (21))
1752 #define _IQ25toIQ3(A) ((_iq3 )(A) >> (22))
1753 #define _IQ25toIQ2(A) ((_iq2 )(A) >> (23))
1754 #define _IQ25toIQ1(A) ((_iq1 )(A) >> (24))
1755 
1756 /* IQ26 to IQN */
1757 #define _IQ26toIQ30(A) ((_iq30)(A) << (4))
1758 #define _IQ26toIQ29(A) ((_iq29)(A) << (3))
1759 #define _IQ26toIQ28(A) ((_iq28)(A) << (2))
1760 #define _IQ26toIQ27(A) ((_iq27)(A) << (1))
1761 #define _IQ26toIQ25(A) ((_iq25)(A) >> (1))
1762 #define _IQ26toIQ24(A) ((_iq24)(A) >> (2))
1763 #define _IQ26toIQ23(A) ((_iq23)(A) >> (3))
1764 #define _IQ26toIQ22(A) ((_iq22)(A) >> (4))
1765 #define _IQ26toIQ21(A) ((_iq21)(A) >> (5))
1766 #define _IQ26toIQ20(A) ((_iq20)(A) >> (6))
1767 #define _IQ26toIQ19(A) ((_iq19)(A) >> (7))
1768 #define _IQ26toIQ18(A) ((_iq18)(A) >> (8))
1769 #define _IQ26toIQ17(A) ((_iq17)(A) >> (9))
1770 #define _IQ26toIQ16(A) ((_iq16)(A) >> (10))
1771 #define _IQ26toIQ15(A) ((_iq15)(A) >> (11))
1772 #define _IQ26toIQ14(A) ((_iq14)(A) >> (12))
1773 #define _IQ26toIQ13(A) ((_iq13)(A) >> (13))
1774 #define _IQ26toIQ12(A) ((_iq12)(A) >> (14))
1775 #define _IQ26toIQ11(A) ((_iq11)(A) >> (15))
1776 #define _IQ26toIQ10(A) ((_iq10)(A) >> (16))
1777 #define _IQ26toIQ9(A) ((_iq9 )(A) >> (17))
1778 #define _IQ26toIQ8(A) ((_iq8 )(A) >> (18))
1779 #define _IQ26toIQ7(A) ((_iq7 )(A) >> (19))
1780 #define _IQ26toIQ6(A) ((_iq6 )(A) >> (20))
1781 #define _IQ26toIQ5(A) ((_iq5 )(A) >> (21))
1782 #define _IQ26toIQ4(A) ((_iq4 )(A) >> (22))
1783 #define _IQ26toIQ3(A) ((_iq3 )(A) >> (23))
1784 #define _IQ26toIQ2(A) ((_iq2 )(A) >> (24))
1785 #define _IQ26toIQ1(A) ((_iq1 )(A) >> (25))
1786 
1787 /* IQ27 to IQN */
1788 #define _IQ27toIQ30(A) ((_iq30)(A) << (3))
1789 #define _IQ27toIQ29(A) ((_iq29)(A) << (2))
1790 #define _IQ27toIQ28(A) ((_iq28)(A) << (1))
1791 #define _IQ27toIQ26(A) ((_iq26)(A) >> (1))
1792 #define _IQ27toIQ25(A) ((_iq25)(A) >> (2))
1793 #define _IQ27toIQ24(A) ((_iq24)(A) >> (3))
1794 #define _IQ27toIQ23(A) ((_iq23)(A) >> (4))
1795 #define _IQ27toIQ22(A) ((_iq22)(A) >> (5))
1796 #define _IQ27toIQ21(A) ((_iq21)(A) >> (6))
1797 #define _IQ27toIQ20(A) ((_iq20)(A) >> (7))
1798 #define _IQ27toIQ19(A) ((_iq19)(A) >> (8))
1799 #define _IQ27toIQ18(A) ((_iq18)(A) >> (9))
1800 #define _IQ27toIQ17(A) ((_iq17)(A) >> (10))
1801 #define _IQ27toIQ16(A) ((_iq16)(A) >> (11))
1802 #define _IQ27toIQ15(A) ((_iq15)(A) >> (12))
1803 #define _IQ27toIQ14(A) ((_iq14)(A) >> (13))
1804 #define _IQ27toIQ13(A) ((_iq13)(A) >> (14))
1805 #define _IQ27toIQ12(A) ((_iq12)(A) >> (15))
1806 #define _IQ27toIQ11(A) ((_iq11)(A) >> (16))
1807 #define _IQ27toIQ10(A) ((_iq10)(A) >> (17))
1808 #define _IQ27toIQ9(A) ((_iq9 )(A) >> (18))
1809 #define _IQ27toIQ8(A) ((_iq8 )(A) >> (19))
1810 #define _IQ27toIQ7(A) ((_iq7 )(A) >> (20))
1811 #define _IQ27toIQ6(A) ((_iq6 )(A) >> (21))
1812 #define _IQ27toIQ5(A) ((_iq5 )(A) >> (22))
1813 #define _IQ27toIQ4(A) ((_iq4 )(A) >> (23))
1814 #define _IQ27toIQ3(A) ((_iq3 )(A) >> (24))
1815 #define _IQ27toIQ2(A) ((_iq2 )(A) >> (25))
1816 #define _IQ27toIQ1(A) ((_iq1 )(A) >> (26))
1817 
1818 /* IQ28 to IQN */
1819 #define _IQ28toIQ30(A) ((_iq30)(A) << (2))
1820 #define _IQ28toIQ29(A) ((_iq29)(A) << (1))
1821 #define _IQ28toIQ27(A) ((_iq27)(A) >> (1))
1822 #define _IQ28toIQ26(A) ((_iq26)(A) >> (2))
1823 #define _IQ28toIQ25(A) ((_iq25)(A) >> (3))
1824 #define _IQ28toIQ24(A) ((_iq24)(A) >> (4))
1825 #define _IQ28toIQ23(A) ((_iq23)(A) >> (5))
1826 #define _IQ28toIQ22(A) ((_iq22)(A) >> (6))
1827 #define _IQ28toIQ21(A) ((_iq21)(A) >> (7))
1828 #define _IQ28toIQ20(A) ((_iq20)(A) >> (8))
1829 #define _IQ28toIQ19(A) ((_iq19)(A) >> (9))
1830 #define _IQ28toIQ18(A) ((_iq18)(A) >> (10))
1831 #define _IQ28toIQ17(A) ((_iq17)(A) >> (11))
1832 #define _IQ28toIQ16(A) ((_iq16)(A) >> (12))
1833 #define _IQ28toIQ15(A) ((_iq15)(A) >> (13))
1834 #define _IQ28toIQ14(A) ((_iq14)(A) >> (14))
1835 #define _IQ28toIQ13(A) ((_iq13)(A) >> (15))
1836 #define _IQ28toIQ12(A) ((_iq12)(A) >> (16))
1837 #define _IQ28toIQ11(A) ((_iq11)(A) >> (17))
1838 #define _IQ28toIQ10(A) ((_iq10)(A) >> (18))
1839 #define _IQ28toIQ9(A) ((_iq9 )(A) >> (19))
1840 #define _IQ28toIQ8(A) ((_iq8 )(A) >> (20))
1841 #define _IQ28toIQ7(A) ((_iq7 )(A) >> (21))
1842 #define _IQ28toIQ6(A) ((_iq6 )(A) >> (22))
1843 #define _IQ28toIQ5(A) ((_iq5 )(A) >> (23))
1844 #define _IQ28toIQ4(A) ((_iq4 )(A) >> (24))
1845 #define _IQ28toIQ3(A) ((_iq3 )(A) >> (25))
1846 #define _IQ28toIQ2(A) ((_iq2 )(A) >> (26))
1847 #define _IQ28toIQ1(A) ((_iq1 )(A) >> (27))
1848 
1849 /* IQ29 to IQN */
1850 #define _IQ29toIQ30(A) ((_iq30)(A) << (1))
1851 #define _IQ29toIQ28(A) ((_iq28)(A) >> (1))
1852 #define _IQ29toIQ27(A) ((_iq27)(A) >> (2))
1853 #define _IQ29toIQ26(A) ((_iq26)(A) >> (3))
1854 #define _IQ29toIQ25(A) ((_iq25)(A) >> (4))
1855 #define _IQ29toIQ24(A) ((_iq24)(A) >> (5))
1856 #define _IQ29toIQ23(A) ((_iq23)(A) >> (6))
1857 #define _IQ29toIQ22(A) ((_iq22)(A) >> (7))
1858 #define _IQ29toIQ21(A) ((_iq21)(A) >> (8))
1859 #define _IQ29toIQ20(A) ((_iq20)(A) >> (9))
1860 #define _IQ29toIQ19(A) ((_iq19)(A) >> (10))
1861 #define _IQ29toIQ18(A) ((_iq18)(A) >> (11))
1862 #define _IQ29toIQ17(A) ((_iq17)(A) >> (12))
1863 #define _IQ29toIQ16(A) ((_iq16)(A) >> (13))
1864 #define _IQ29toIQ15(A) ((_iq15)(A) >> (14))
1865 #define _IQ29toIQ14(A) ((_iq14)(A) >> (15))
1866 #define _IQ29toIQ13(A) ((_iq13)(A) >> (16))
1867 #define _IQ29toIQ12(A) ((_iq12)(A) >> (17))
1868 #define _IQ29toIQ11(A) ((_iq11)(A) >> (18))
1869 #define _IQ29toIQ10(A) ((_iq10)(A) >> (19))
1870 #define _IQ29toIQ9(A) ((_iq9 )(A) >> (20))
1871 #define _IQ29toIQ8(A) ((_iq8 )(A) >> (21))
1872 #define _IQ29toIQ7(A) ((_iq7 )(A) >> (22))
1873 #define _IQ29toIQ6(A) ((_iq6 )(A) >> (23))
1874 #define _IQ29toIQ5(A) ((_iq5 )(A) >> (24))
1875 #define _IQ29toIQ4(A) ((_iq4 )(A) >> (25))
1876 #define _IQ29toIQ3(A) ((_iq3 )(A) >> (26))
1877 #define _IQ29toIQ2(A) ((_iq2 )(A) >> (27))
1878 #define _IQ29toIQ1(A) ((_iq1 )(A) >> (28))
1879 
1880 /* IQ30 to IQN */
1881 #define _IQ30toIQ29(A) ((_iq29)(A) >> (1))
1882 #define _IQ30toIQ28(A) ((_iq28)(A) >> (2))
1883 #define _IQ30toIQ27(A) ((_iq27)(A) >> (3))
1884 #define _IQ30toIQ26(A) ((_iq26)(A) >> (4))
1885 #define _IQ30toIQ25(A) ((_iq25)(A) >> (5))
1886 #define _IQ30toIQ24(A) ((_iq24)(A) >> (6))
1887 #define _IQ30toIQ23(A) ((_iq23)(A) >> (7))
1888 #define _IQ30toIQ22(A) ((_iq22)(A) >> (8))
1889 #define _IQ30toIQ21(A) ((_iq21)(A) >> (9))
1890 #define _IQ30toIQ20(A) ((_iq20)(A) >> (10))
1891 #define _IQ30toIQ19(A) ((_iq19)(A) >> (11))
1892 #define _IQ30toIQ18(A) ((_iq18)(A) >> (12))
1893 #define _IQ30toIQ17(A) ((_iq17)(A) >> (13))
1894 #define _IQ30toIQ16(A) ((_iq16)(A) >> (14))
1895 #define _IQ30toIQ15(A) ((_iq15)(A) >> (15))
1896 #define _IQ30toIQ14(A) ((_iq14)(A) >> (16))
1897 #define _IQ30toIQ13(A) ((_iq13)(A) >> (17))
1898 #define _IQ30toIQ12(A) ((_iq12)(A) >> (18))
1899 #define _IQ30toIQ11(A) ((_iq11)(A) >> (19))
1900 #define _IQ30toIQ10(A) ((_iq10)(A) >> (20))
1901 #define _IQ30toIQ9(A) ((_iq9 )(A) >> (21))
1902 #define _IQ30toIQ8(A) ((_iq8 )(A) >> (22))
1903 #define _IQ30toIQ7(A) ((_iq7 )(A) >> (23))
1904 #define _IQ30toIQ6(A) ((_iq6 )(A) >> (24))
1905 #define _IQ30toIQ5(A) ((_iq5 )(A) >> (25))
1906 #define _IQ30toIQ4(A) ((_iq4 )(A) >> (26))
1907 #define _IQ30toIQ3(A) ((_iq3 )(A) >> (27))
1908 #define _IQ30toIQ2(A) ((_iq2 )(A) >> (28))
1909 #define _IQ30toIQ1(A) ((_iq1 )(A) >> (29))
1910 
1911 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
1912 
1913 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1914 //*****************************************************************************
1915 //
1916 // Converts a number between IQ format and 16-bit Qn format.
1917 //
1918 //*****************************************************************************
1919 #if (GLOBAL_IQ >= 15)
1920 #define _IQtoQ15(A) ((int32_t)(A) >> (GLOBAL_IQ - 15))
1921 #define _Q15toIQ(A) ((_iq15)(A) << (GLOBAL_IQ - 15))
1922 #else
1923 #define _IQtoQ15(A) ((int32_t)(A) << (15 - GLOBAL_IQ))
1924 #define _Q15toIQ(A) ((_iq15)(A) >> (15 - GLOBAL_IQ))
1925 #endif
1926 
1927 #if (GLOBAL_IQ >= 14)
1928 #define _IQtoQ14(A) ((int32_t)(A) >> (GLOBAL_IQ - 14))
1929 #define _Q14toIQ(A) ((_iq14)(A) << (GLOBAL_IQ - 14))
1930 #else
1931 #define _IQtoQ14(A) ((int32_t)(A) << (14 - GLOBAL_IQ))
1932 #define _Q14toIQ(A) ((_iq14)(A) >> (14 - GLOBAL_IQ))
1933 #endif
1934 
1935 #if (GLOBAL_IQ >= 13)
1936 #define _IQtoQ13(A) ((int32_t)(A) >> (GLOBAL_IQ - 13))
1937 #define _Q13toIQ(A) ((_iq13)(A) << (GLOBAL_IQ - 13))
1938 #else
1939 #define _IQtoQ13(A) ((int32_t)(A) << (13 - GLOBAL_IQ))
1940 #define _Q13toIQ(A) ((_iq13)(A) >> (13 - GLOBAL_IQ))
1941 #endif
1942 
1943 #if (GLOBAL_IQ >= 12)
1944 #define _IQtoQ12(A) ((int32_t)(A) >> (GLOBAL_IQ - 12))
1945 #define _Q12toIQ(A) ((_iq12)(A) << (GLOBAL_IQ - 12))
1946 #else
1947 #define _IQtoQ12(A) ((int32_t)(A) << (12 - GLOBAL_IQ))
1948 #define _Q12toIQ(A) ((_iq12)(A) >> (12 - GLOBAL_IQ))
1949 #endif
1950 
1951 #if (GLOBAL_IQ >= 11)
1952 #define _IQtoQ11(A) ((int32_t)(A) >> (GLOBAL_IQ - 11))
1953 #define _Q11toIQ(A) ((_iq11)(A) << (GLOBAL_IQ - 11))
1954 #else
1955 #define _IQtoQ11(A) ((int32_t)(A) << (11 - GLOBAL_IQ))
1956 #define _Q11toIQ(A) ((_iq11)(A) >> (11 - GLOBAL_IQ))
1957 #endif
1958 
1959 #if (GLOBAL_IQ >= 10)
1960 #define _IQtoQ10(A) ((int32_t)(A) >> (GLOBAL_IQ - 10))
1961 #define _Q10toIQ(A) ((_iq10)(A) << (GLOBAL_IQ - 10))
1962 #else
1963 #define _IQtoQ10(A) ((int32_t)(A) << (10 - GLOBAL_IQ))
1964 #define _Q10toIQ(A) ((_iq10)(A) >> (10 - GLOBAL_IQ))
1965 #endif
1966 
1967 #if (GLOBAL_IQ >= 9)
1968 #define _IQtoQ9(A) ((int32_t)(A) >> (GLOBAL_IQ - 9))
1969 #define _Q9toIQ(A) ((_iq9)(A) << (GLOBAL_IQ - 9))
1970 #else
1971 #define _IQtoQ9(A) ((int32_t)(A) << (9 - GLOBAL_IQ))
1972 #define _Q9toIQ(A) ((_iq9)(A) >> (9 - GLOBAL_IQ))
1973 #endif
1974 
1975 #if (GLOBAL_IQ >= 8)
1976 #define _IQtoQ8(A) ((int32_t)(A) >> (GLOBAL_IQ - 8))
1977 #define _Q8toIQ(A) ((_iq8)(A) << (GLOBAL_IQ - 8))
1978 #else
1979 #define _IQtoQ8(A) ((int32_t)(A) << (8 - GLOBAL_IQ))
1980 #define _Q8toIQ(A) ((_iq8)(A) >> (8 - GLOBAL_IQ))
1981 #endif
1982 
1983 #if (GLOBAL_IQ >= 7)
1984 #define _IQtoQ7(A) ((int32_t)(A) >> (GLOBAL_IQ - 7))
1985 #define _Q7toIQ(A) ((_iq7)(A) << (GLOBAL_IQ - 7))
1986 #else
1987 #define _IQtoQ7(A) ((int32_t)(A) << (7 - GLOBAL_IQ))
1988 #define _Q7toIQ(A) ((_iq7)(A) >> (7 - GLOBAL_IQ))
1989 #endif
1990 
1991 #if (GLOBAL_IQ >= 6)
1992 #define _IQtoQ6(A) ((int32_t)(A) >> (GLOBAL_IQ - 6))
1993 #define _Q6toIQ(A) ((_iq6)(A) << (GLOBAL_IQ - 6))
1994 #else
1995 #define _IQtoQ6(A) ((int32_t)(A) << (6 - GLOBAL_IQ))
1996 #define _Q6toIQ(A) ((_iq6)(A) >> (6 - GLOBAL_IQ))
1997 #endif
1998 
1999 #if (GLOBAL_IQ >= 5)
2000 #define _IQtoQ5(A) ((int32_t)(A) >> (GLOBAL_IQ - 5))
2001 #define _Q5toIQ(A) ((_iq5)(A) << (GLOBAL_IQ - 5))
2002 #else
2003 #define _IQtoQ5(A) ((int32_t)(A) << (5 - GLOBAL_IQ))
2004 #define _Q5toIQ(A) ((_iq5)(A) >> (5 - GLOBAL_IQ))
2005 #endif
2006 
2007 #if (GLOBAL_IQ >= 4)
2008 #define _IQtoQ4(A) ((int32_t)(A) >> (GLOBAL_IQ - 4))
2009 #define _Q4toIQ(A) ((_iq4)(A) << (GLOBAL_IQ - 4))
2010 #else
2011 #define _IQtoQ4(A) ((int32_t)(A) << (4 - GLOBAL_IQ))
2012 #define _Q4toIQ(A) ((_iq4)(A) >> (4 - GLOBAL_IQ))
2013 #endif
2014 
2015 #if (GLOBAL_IQ >= 3)
2016 #define _IQtoQ3(A) ((int32_t)(A) >> (GLOBAL_IQ - 3))
2017 #define _Q3toIQ(A) ((_iq3)(A) << (GLOBAL_IQ - 3))
2018 #else
2019 #define _IQtoQ3(A) ((int32_t)(A) << (3 - GLOBAL_IQ))
2020 #define _Q3toIQ(A) ((_iq3)(A) >> (3 - GLOBAL_IQ))
2021 #endif
2022 
2023 #if (GLOBAL_IQ >= 2)
2024 #define _IQtoQ2(A) ((int32_t)(A) >> (GLOBAL_IQ - 2))
2025 #define _Q2toIQ(A) ((_iq2)(A) << (GLOBAL_IQ - 2))
2026 #else
2027 #define _IQtoQ2(A) ((int32_t)(A) << (2 - GLOBAL_IQ))
2028 #define _Q2toIQ(A) ((_iq2)(A) >> (2 - GLOBAL_IQ))
2029 #endif
2030 
2031 #define _IQtoQ1(A) ((int32_t)(A) >> (GLOBAL_IQ - 1))
2032 #define _Q1toIQ(A) ((_iq1)(A) << (GLOBAL_IQ - 1))
2033 
2034 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
2035 
2036 //*****************************************************************************
2037 //
2038 // Multiplies two IQ numbers.
2039 //
2040 //*****************************************************************************
2041 #ifndef DOXYGEN_SHOULD_SKIP_THIS
2042 extern _iq30 _IQ30mpy(_iq30 A, _iq30 B);
2043 extern _iq29 _IQ29mpy(_iq29 A, _iq29 B);
2044 extern _iq28 _IQ28mpy(_iq28 A, _iq28 B);
2045 extern _iq27 _IQ27mpy(_iq27 A, _iq27 B);
2046 extern _iq26 _IQ26mpy(_iq26 A, _iq26 B);
2047 extern _iq25 _IQ25mpy(_iq25 A, _iq25 B);
2048 extern _iq24 _IQ24mpy(_iq24 A, _iq24 B);
2049 extern _iq23 _IQ23mpy(_iq23 A, _iq23 B);
2050 extern _iq22 _IQ22mpy(_iq22 A, _iq22 B);
2051 extern _iq21 _IQ21mpy(_iq21 A, _iq21 B);
2052 extern _iq20 _IQ20mpy(_iq20 A, _iq20 B);
2053 extern _iq19 _IQ19mpy(_iq19 A, _iq19 B);
2054 extern _iq18 _IQ18mpy(_iq18 A, _iq18 B);
2055 extern _iq17 _IQ17mpy(_iq17 A, _iq17 B);
2056 extern _iq16 _IQ16mpy(_iq16 A, _iq16 B);
2057 extern _iq15 _IQ15mpy(_iq15 A, _iq15 B);
2058 extern _iq14 _IQ14mpy(_iq14 A, _iq14 B);
2059 extern _iq13 _IQ13mpy(_iq13 A, _iq13 B);
2060 extern _iq12 _IQ12mpy(_iq12 A, _iq12 B);
2061 extern _iq11 _IQ11mpy(_iq11 A, _iq11 B);
2062 extern _iq10 _IQ10mpy(_iq10 A, _iq10 B);
2063 extern _iq9 _IQ9mpy(_iq9 A, _iq9 B);
2064 extern _iq8 _IQ8mpy(_iq8 A, _iq8 B);
2065 extern _iq7 _IQ7mpy(_iq7 A, _iq7 B);
2066 extern _iq6 _IQ6mpy(_iq6 A, _iq6 B);
2067 extern _iq5 _IQ5mpy(_iq5 A, _iq5 B);
2068 extern _iq4 _IQ4mpy(_iq4 A, _iq4 B);
2069 extern _iq3 _IQ3mpy(_iq3 A, _iq3 B);
2070 extern _iq2 _IQ2mpy(_iq2 A, _iq2 B);
2071 extern _iq1 _IQ1mpy(_iq1 A, _iq1 B);
2072 
2073 //*****************************************************************************
2074 //
2075 // MathACL Repeat Operation: repeats same settings as last call (same IQ value, same operation).
2076 // This version is only compatible with IQmpy and IQdiv.
2077 //
2078 //*****************************************************************************
2079 #if ((defined (__IQMATH_USE_MATHACL__)) && (defined (__MSPM0_HAS_MATHACL__)))
2080 extern int32_t _IQrepeat(int32_t A, int32_t B);
2081 #endif
2082 
2083 
2084 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
2085 
2094 #if GLOBAL_IQ == 30
2095 #define _IQmpy(A, B) _IQ30mpy(A, B)
2096 #endif
2097 #if GLOBAL_IQ == 29
2098 #define _IQmpy(A, B) _IQ29mpy(A, B)
2099 #endif
2100 #if GLOBAL_IQ == 28
2101 #define _IQmpy(A, B) _IQ28mpy(A, B)
2102 #endif
2103 #if GLOBAL_IQ == 27
2104 #define _IQmpy(A, B) _IQ27mpy(A, B)
2105 #endif
2106 #if GLOBAL_IQ == 26
2107 #define _IQmpy(A, B) _IQ26mpy(A, B)
2108 #endif
2109 #if GLOBAL_IQ == 25
2110 #define _IQmpy(A, B) _IQ25mpy(A, B)
2111 #endif
2112 #if GLOBAL_IQ == 24
2113 #define _IQmpy(A, B) _IQ24mpy(A, B)
2114 #endif
2115 #if GLOBAL_IQ == 23
2116 #define _IQmpy(A, B) _IQ23mpy(A, B)
2117 #endif
2118 #if GLOBAL_IQ == 22
2119 #define _IQmpy(A, B) _IQ22mpy(A, B)
2120 #endif
2121 #if GLOBAL_IQ == 21
2122 #define _IQmpy(A, B) _IQ21mpy(A, B)
2123 #endif
2124 #if GLOBAL_IQ == 20
2125 #define _IQmpy(A, B) _IQ20mpy(A, B)
2126 #endif
2127 #if GLOBAL_IQ == 19
2128 #define _IQmpy(A, B) _IQ19mpy(A, B)
2129 #endif
2130 #if GLOBAL_IQ == 18
2131 #define _IQmpy(A, B) _IQ18mpy(A, B)
2132 #endif
2133 #if GLOBAL_IQ == 17
2134 #define _IQmpy(A, B) _IQ17mpy(A, B)
2135 #endif
2136 #if GLOBAL_IQ == 16
2137 #define _IQmpy(A, B) _IQ16mpy(A, B)
2138 #endif
2139 #if GLOBAL_IQ == 15
2140 #define _IQmpy(A, B) _IQ15mpy(A, B)
2141 #endif
2142 #if GLOBAL_IQ == 14
2143 #define _IQmpy(A, B) _IQ14mpy(A, B)
2144 #endif
2145 #if GLOBAL_IQ == 13
2146 #define _IQmpy(A, B) _IQ13mpy(A, B)
2147 #endif
2148 #if GLOBAL_IQ == 12
2149 #define _IQmpy(A, B) _IQ12mpy(A, B)
2150 #endif
2151 #if GLOBAL_IQ == 11
2152 #define _IQmpy(A, B) _IQ11mpy(A, B)
2153 #endif
2154 #if GLOBAL_IQ == 10
2155 #define _IQmpy(A, B) _IQ10mpy(A, B)
2156 #endif
2157 #if GLOBAL_IQ == 9
2158 #define _IQmpy(A, B) _IQ9mpy(A, B)
2159 #endif
2160 #if GLOBAL_IQ == 8
2161 #define _IQmpy(A, B) _IQ8mpy(A, B)
2162 #endif
2163 #if GLOBAL_IQ == 7
2164 #define _IQmpy(A, B) _IQ7mpy(A, B)
2165 #endif
2166 #if GLOBAL_IQ == 6
2167 #define _IQmpy(A, B) _IQ6mpy(A, B)
2168 #endif
2169 #if GLOBAL_IQ == 5
2170 #define _IQmpy(A, B) _IQ5mpy(A, B)
2171 #endif
2172 #if GLOBAL_IQ == 4
2173 #define _IQmpy(A, B) _IQ4mpy(A, B)
2174 #endif
2175 #if GLOBAL_IQ == 3
2176 #define _IQmpy(A, B) _IQ3mpy(A, B)
2177 #endif
2178 #if GLOBAL_IQ == 2
2179 #define _IQmpy(A, B) _IQ2mpy(A, B)
2180 #endif
2181 #if GLOBAL_IQ == 1
2182 #define _IQmpy(A, B) _IQ1mpy(A, B)
2183 #endif
2184 
2185 //*****************************************************************************
2186 //
2187 // Multiplies two IQ numbers, with rounding.
2188 //
2189 //*****************************************************************************
2190 #ifndef DOXYGEN_SHOULD_SKIP_THIS
2191 extern _iq30 _IQ30rmpy(_iq30 A, _iq30 B);
2192 extern _iq29 _IQ29rmpy(_iq29 A, _iq29 B);
2193 extern _iq28 _IQ28rmpy(_iq28 A, _iq28 B);
2194 extern _iq27 _IQ27rmpy(_iq27 A, _iq27 B);
2195 extern _iq26 _IQ26rmpy(_iq26 A, _iq26 B);
2196 extern _iq25 _IQ25rmpy(_iq25 A, _iq25 B);
2197 extern _iq24 _IQ24rmpy(_iq24 A, _iq24 B);
2198 extern _iq23 _IQ23rmpy(_iq23 A, _iq23 B);
2199 extern _iq22 _IQ22rmpy(_iq22 A, _iq22 B);
2200 extern _iq21 _IQ21rmpy(_iq21 A, _iq21 B);
2201 extern _iq20 _IQ20rmpy(_iq20 A, _iq20 B);
2202 extern _iq19 _IQ19rmpy(_iq19 A, _iq19 B);
2203 extern _iq18 _IQ18rmpy(_iq18 A, _iq18 B);
2204 extern _iq17 _IQ17rmpy(_iq17 A, _iq17 B);
2205 extern _iq16 _IQ16rmpy(_iq16 A, _iq16 B);
2206 extern _iq15 _IQ15rmpy(_iq15 A, _iq15 B);
2207 extern _iq14 _IQ14rmpy(_iq14 A, _iq14 B);
2208 extern _iq13 _IQ13rmpy(_iq13 A, _iq13 B);
2209 extern _iq12 _IQ12rmpy(_iq12 A, _iq12 B);
2210 extern _iq11 _IQ11rmpy(_iq11 A, _iq11 B);
2211 extern _iq10 _IQ10rmpy(_iq10 A, _iq10 B);
2212 extern _iq9 _IQ9rmpy(_iq9 A, _iq9 B);
2213 extern _iq8 _IQ8rmpy(_iq8 A, _iq8 B);
2214 extern _iq7 _IQ7rmpy(_iq7 A, _iq7 B);
2215 extern _iq6 _IQ6rmpy(_iq6 A, _iq6 B);
2216 extern _iq5 _IQ5rmpy(_iq5 A, _iq5 B);
2217 extern _iq4 _IQ4rmpy(_iq4 A, _iq4 B);
2218 extern _iq3 _IQ3rmpy(_iq3 A, _iq3 B);
2219 extern _iq2 _IQ2rmpy(_iq2 A, _iq2 B);
2220 extern _iq1 _IQ1rmpy(_iq1 A, _iq1 B);
2221 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
2222 
2231 #if GLOBAL_IQ == 30
2232 #define _IQrmpy(A, B) _IQ30rmpy(A, B)
2233 #endif
2234 #if GLOBAL_IQ == 29
2235 #define _IQrmpy(A, B) _IQ29rmpy(A, B)
2236 #endif
2237 #if GLOBAL_IQ == 28
2238 #define _IQrmpy(A, B) _IQ28rmpy(A, B)
2239 #endif
2240 #if GLOBAL_IQ == 27
2241 #define _IQrmpy(A, B) _IQ27rmpy(A, B)
2242 #endif
2243 #if GLOBAL_IQ == 26
2244 #define _IQrmpy(A, B) _IQ26rmpy(A, B)
2245 #endif
2246 #if GLOBAL_IQ == 25
2247 #define _IQrmpy(A, B) _IQ25rmpy(A, B)
2248 #endif
2249 #if GLOBAL_IQ == 24
2250 #define _IQrmpy(A, B) _IQ24rmpy(A, B)
2251 #endif
2252 #if GLOBAL_IQ == 23
2253 #define _IQrmpy(A, B) _IQ23rmpy(A, B)
2254 #endif
2255 #if GLOBAL_IQ == 22
2256 #define _IQrmpy(A, B) _IQ22rmpy(A, B)
2257 #endif
2258 #if GLOBAL_IQ == 21
2259 #define _IQrmpy(A, B) _IQ21rmpy(A, B)
2260 #endif
2261 #if GLOBAL_IQ == 20
2262 #define _IQrmpy(A, B) _IQ20rmpy(A, B)
2263 #endif
2264 #if GLOBAL_IQ == 19
2265 #define _IQrmpy(A, B) _IQ19rmpy(A, B)
2266 #endif
2267 #if GLOBAL_IQ == 18
2268 #define _IQrmpy(A, B) _IQ18rmpy(A, B)
2269 #endif
2270 #if GLOBAL_IQ == 17
2271 #define _IQrmpy(A, B) _IQ17rmpy(A, B)
2272 #endif
2273 #if GLOBAL_IQ == 16
2274 #define _IQrmpy(A, B) _IQ16rmpy(A, B)
2275 #endif
2276 #if GLOBAL_IQ == 15
2277 #define _IQrmpy(A, B) _IQ15rmpy(A, B)
2278 #endif
2279 #if GLOBAL_IQ == 14
2280 #define _IQrmpy(A, B) _IQ14rmpy(A, B)
2281 #endif
2282 #if GLOBAL_IQ == 13
2283 #define _IQrmpy(A, B) _IQ13rmpy(A, B)
2284 #endif
2285 #if GLOBAL_IQ == 12
2286 #define _IQrmpy(A, B) _IQ12rmpy(A, B)
2287 #endif
2288 #if GLOBAL_IQ == 11
2289 #define _IQrmpy(A, B) _IQ11rmpy(A, B)
2290 #endif
2291 #if GLOBAL_IQ == 10
2292 #define _IQrmpy(A, B) _IQ10rmpy(A, B)
2293 #endif
2294 #if GLOBAL_IQ == 9
2295 #define _IQrmpy(A, B) _IQ9rmpy(A, B)
2296 #endif
2297 #if GLOBAL_IQ == 8
2298 #define _IQrmpy(A, B) _IQ8rmpy(A, B)
2299 #endif
2300 #if GLOBAL_IQ == 7
2301 #define _IQrmpy(A, B) _IQ7rmpy(A, B)
2302 #endif
2303 #if GLOBAL_IQ == 6
2304 #define _IQrmpy(A, B) _IQ6rmpy(A, B)
2305 #endif
2306 #if GLOBAL_IQ == 5
2307 #define _IQrmpy(A, B) _IQ5rmpy(A, B)
2308 #endif
2309 #if GLOBAL_IQ == 4
2310 #define _IQrmpy(A, B) _IQ4rmpy(A, B)
2311 #endif
2312 #if GLOBAL_IQ == 3
2313 #define _IQrmpy(A, B) _IQ3rmpy(A, B)
2314 #endif
2315 #if GLOBAL_IQ == 2
2316 #define _IQrmpy(A, B) _IQ2rmpy(A, B)
2317 #endif
2318 #if GLOBAL_IQ == 1
2319 #define _IQrmpy(A, B) _IQ1rmpy(A, B)
2320 #endif
2321 
2322 //*****************************************************************************
2323 //
2324 // Multiplies two IQ numbers, with rounding and saturation.
2325 //
2326 //*****************************************************************************
2327 #ifndef DOXYGEN_SHOULD_SKIP_THIS
2328 extern _iq30 _IQ30rsmpy(_iq30 A, _iq30 B);
2329 extern _iq29 _IQ29rsmpy(_iq29 A, _iq29 B);
2330 extern _iq28 _IQ28rsmpy(_iq28 A, _iq28 B);
2331 extern _iq27 _IQ27rsmpy(_iq27 A, _iq27 B);
2332 extern _iq26 _IQ26rsmpy(_iq26 A, _iq26 B);
2333 extern _iq25 _IQ25rsmpy(_iq25 A, _iq25 B);
2334 extern _iq24 _IQ24rsmpy(_iq24 A, _iq24 B);
2335 extern _iq23 _IQ23rsmpy(_iq23 A, _iq23 B);
2336 extern _iq22 _IQ22rsmpy(_iq22 A, _iq22 B);
2337 extern _iq21 _IQ21rsmpy(_iq21 A, _iq21 B);
2338 extern _iq20 _IQ20rsmpy(_iq20 A, _iq20 B);
2339 extern _iq19 _IQ19rsmpy(_iq19 A, _iq19 B);
2340 extern _iq18 _IQ18rsmpy(_iq18 A, _iq18 B);
2341 extern _iq17 _IQ17rsmpy(_iq17 A, _iq17 B);
2342 extern _iq16 _IQ16rsmpy(_iq16 A, _iq16 B);
2343 extern _iq15 _IQ15rsmpy(_iq15 A, _iq15 B);
2344 extern _iq14 _IQ14rsmpy(_iq14 A, _iq14 B);
2345 extern _iq13 _IQ13rsmpy(_iq13 A, _iq13 B);
2346 extern _iq12 _IQ12rsmpy(_iq12 A, _iq12 B);
2347 extern _iq11 _IQ11rsmpy(_iq11 A, _iq11 B);
2348 extern _iq10 _IQ10rsmpy(_iq10 A, _iq10 B);
2349 extern _iq9 _IQ9rsmpy(_iq9 A, _iq9 B);
2350 extern _iq8 _IQ8rsmpy(_iq8 A, _iq8 B);
2351 extern _iq7 _IQ7rsmpy(_iq7 A, _iq7 B);
2352 extern _iq6 _IQ6rsmpy(_iq6 A, _iq6 B);
2353 extern _iq5 _IQ5rsmpy(_iq5 A, _iq5 B);
2354 extern _iq4 _IQ4rsmpy(_iq4 A, _iq4 B);
2355 extern _iq3 _IQ3rsmpy(_iq3 A, _iq3 B);
2356 extern _iq2 _IQ2rsmpy(_iq2 A, _iq2 B);
2357 extern _iq1 _IQ1rsmpy(_iq1 A, _iq1 B);
2358 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
2359 
2368 #if GLOBAL_IQ == 30
2369 #define _IQrsmpy(A, B) _IQ30rsmpy(A, B)
2370 #endif
2371 #if GLOBAL_IQ == 29
2372 #define _IQrsmpy(A, B) _IQ29rsmpy(A, B)
2373 #endif
2374 #if GLOBAL_IQ == 28
2375 #define _IQrsmpy(A, B) _IQ28rsmpy(A, B)
2376 #endif
2377 #if GLOBAL_IQ == 27
2378 #define _IQrsmpy(A, B) _IQ27rsmpy(A, B)
2379 #endif
2380 #if GLOBAL_IQ == 26
2381 #define _IQrsmpy(A, B) _IQ26rsmpy(A, B)
2382 #endif
2383 #if GLOBAL_IQ == 25
2384 #define _IQrsmpy(A, B) _IQ25rsmpy(A, B)
2385 #endif
2386 #if GLOBAL_IQ == 24
2387 #define _IQrsmpy(A, B) _IQ24rsmpy(A, B)
2388 #endif
2389 #if GLOBAL_IQ == 23
2390 #define _IQrsmpy(A, B) _IQ23rsmpy(A, B)
2391 #endif
2392 #if GLOBAL_IQ == 22
2393 #define _IQrsmpy(A, B) _IQ22rsmpy(A, B)
2394 #endif
2395 #if GLOBAL_IQ == 21
2396 #define _IQrsmpy(A, B) _IQ21rsmpy(A, B)
2397 #endif
2398 #if GLOBAL_IQ == 20
2399 #define _IQrsmpy(A, B) _IQ20rsmpy(A, B)
2400 #endif
2401 #if GLOBAL_IQ == 19
2402 #define _IQrsmpy(A, B) _IQ19rsmpy(A, B)
2403 #endif
2404 #if GLOBAL_IQ == 18
2405 #define _IQrsmpy(A, B) _IQ18rsmpy(A, B)
2406 #endif
2407 #if GLOBAL_IQ == 17
2408 #define _IQrsmpy(A, B) _IQ17rsmpy(A, B)
2409 #endif
2410 #if GLOBAL_IQ == 16
2411 #define _IQrsmpy(A, B) _IQ16rsmpy(A, B)
2412 #endif
2413 #if GLOBAL_IQ == 15
2414 #define _IQrsmpy(A, B) _IQ15rsmpy(A, B)
2415 #endif
2416 #if GLOBAL_IQ == 14
2417 #define _IQrsmpy(A, B) _IQ14rsmpy(A, B)
2418 #endif
2419 #if GLOBAL_IQ == 13
2420 #define _IQrsmpy(A, B) _IQ13rsmpy(A, B)
2421 #endif
2422 #if GLOBAL_IQ == 12
2423 #define _IQrsmpy(A, B) _IQ12rsmpy(A, B)
2424 #endif
2425 #if GLOBAL_IQ == 11
2426 #define _IQrsmpy(A, B) _IQ11rsmpy(A, B)
2427 #endif
2428 #if GLOBAL_IQ == 10
2429 #define _IQrsmpy(A, B) _IQ10rsmpy(A, B)
2430 #endif
2431 #if GLOBAL_IQ == 9
2432 #define _IQrsmpy(A, B) _IQ9rsmpy(A, B)
2433 #endif
2434 #if GLOBAL_IQ == 8
2435 #define _IQrsmpy(A, B) _IQ8rsmpy(A, B)
2436 #endif
2437 #if GLOBAL_IQ == 7
2438 #define _IQrsmpy(A, B) _IQ7rsmpy(A, B)
2439 #endif
2440 #if GLOBAL_IQ == 6
2441 #define _IQrsmpy(A, B) _IQ6rsmpy(A, B)
2442 #endif
2443 #if GLOBAL_IQ == 5
2444 #define _IQrsmpy(A, B) _IQ5rsmpy(A, B)
2445 #endif
2446 #if GLOBAL_IQ == 4
2447 #define _IQrsmpy(A, B) _IQ4rsmpy(A, B)
2448 #endif
2449 #if GLOBAL_IQ == 3
2450 #define _IQrsmpy(A, B) _IQ3rsmpy(A, B)
2451 #endif
2452 #if GLOBAL_IQ == 2
2453 #define _IQrsmpy(A, B) _IQ2rsmpy(A, B)
2454 #endif
2455 #if GLOBAL_IQ == 1
2456 #define _IQrsmpy(A, B) _IQ1rsmpy(A, B)
2457 #endif
2458 
2459 //*****************************************************************************
2460 //
2461 // Divides two IQ numbers.
2462 //
2463 //*****************************************************************************
2464 #ifndef DOXYGEN_SHOULD_SKIP_THIS
2465 extern _iq30 _IQ30div(_iq30 A, _iq30 B);
2466 extern _iq29 _IQ29div(_iq29 A, _iq29 B);
2467 extern _iq28 _IQ28div(_iq28 A, _iq28 B);
2468 extern _iq27 _IQ27div(_iq27 A, _iq27 B);
2469 extern _iq26 _IQ26div(_iq26 A, _iq26 B);
2470 extern _iq25 _IQ25div(_iq25 A, _iq25 B);
2471 extern _iq24 _IQ24div(_iq24 A, _iq24 B);
2472 extern _iq23 _IQ23div(_iq23 A, _iq23 B);
2473 extern _iq22 _IQ22div(_iq22 A, _iq22 B);
2474 extern _iq21 _IQ21div(_iq21 A, _iq21 B);
2475 extern _iq20 _IQ20div(_iq20 A, _iq20 B);
2476 extern _iq19 _IQ19div(_iq19 A, _iq19 B);
2477 extern _iq18 _IQ18div(_iq18 A, _iq18 B);
2478 extern _iq17 _IQ17div(_iq17 A, _iq17 B);
2479 extern _iq16 _IQ16div(_iq16 A, _iq16 B);
2480 extern _iq15 _IQ15div(_iq15 A, _iq15 B);
2481 extern _iq14 _IQ14div(_iq14 A, _iq14 B);
2482 extern _iq13 _IQ13div(_iq13 A, _iq13 B);
2483 extern _iq12 _IQ12div(_iq12 A, _iq12 B);
2484 extern _iq11 _IQ11div(_iq11 A, _iq11 B);
2485 extern _iq10 _IQ10div(_iq10 A, _iq10 B);
2486 extern _iq9 _IQ9div(_iq9 A, _iq9 B);
2487 extern _iq8 _IQ8div(_iq8 A, _iq8 B);
2488 extern _iq7 _IQ7div(_iq7 A, _iq7 B);
2489 extern _iq6 _IQ6div(_iq6 A, _iq6 B);
2490 extern _iq5 _IQ5div(_iq5 A, _iq5 B);
2491 extern _iq4 _IQ4div(_iq4 A, _iq4 B);
2492 extern _iq3 _IQ3div(_iq3 A, _iq3 B);
2493 extern _iq2 _IQ2div(_iq2 A, _iq2 B);
2494 extern _iq1 _IQ1div(_iq1 A, _iq1 B);
2495 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
2496 
2505 #if GLOBAL_IQ == 30
2506 #define _IQdiv(A, B) _IQ30div(A, B)
2507 #endif
2508 #if GLOBAL_IQ == 29
2509 #define _IQdiv(A, B) _IQ29div(A, B)
2510 #endif
2511 #if GLOBAL_IQ == 28
2512 #define _IQdiv(A, B) _IQ28div(A, B)
2513 #endif
2514 #if GLOBAL_IQ == 27
2515 #define _IQdiv(A, B) _IQ27div(A, B)
2516 #endif
2517 #if GLOBAL_IQ == 26
2518 #define _IQdiv(A, B) _IQ26div(A, B)
2519 #endif
2520 #if GLOBAL_IQ == 25
2521 #define _IQdiv(A, B) _IQ25div(A, B)
2522 #endif
2523 #if GLOBAL_IQ == 24
2524 #define _IQdiv(A, B) _IQ24div(A, B)
2525 #endif
2526 #if GLOBAL_IQ == 23
2527 #define _IQdiv(A, B) _IQ23div(A, B)
2528 #endif
2529 #if GLOBAL_IQ == 22
2530 #define _IQdiv(A, B) _IQ22div(A, B)
2531 #endif
2532 #if GLOBAL_IQ == 21
2533 #define _IQdiv(A, B) _IQ21div(A, B)
2534 #endif
2535 #if GLOBAL_IQ == 20
2536 #define _IQdiv(A, B) _IQ20div(A, B)
2537 #endif
2538 #if GLOBAL_IQ == 19
2539 #define _IQdiv(A, B) _IQ19div(A, B)
2540 #endif
2541 #if GLOBAL_IQ == 18
2542 #define _IQdiv(A, B) _IQ18div(A, B)
2543 #endif
2544 #if GLOBAL_IQ == 17
2545 #define _IQdiv(A, B) _IQ17div(A, B)
2546 #endif
2547 #if GLOBAL_IQ == 16
2548 #define _IQdiv(A, B) _IQ16div(A, B)
2549 #endif
2550 #if GLOBAL_IQ == 15
2551 #define _IQdiv(A, B) _IQ15div(A, B)
2552 #endif
2553 #if GLOBAL_IQ == 14
2554 #define _IQdiv(A, B) _IQ14div(A, B)
2555 #endif
2556 #if GLOBAL_IQ == 13
2557 #define _IQdiv(A, B) _IQ13div(A, B)
2558 #endif
2559 #if GLOBAL_IQ == 12
2560 #define _IQdiv(A, B) _IQ12div(A, B)
2561 #endif
2562 #if GLOBAL_IQ == 11
2563 #define _IQdiv(A, B) _IQ11div(A, B)
2564 #endif
2565 #if GLOBAL_IQ == 10
2566 #define _IQdiv(A, B) _IQ10div(A, B)
2567 #endif
2568 #if GLOBAL_IQ == 9
2569 #define _IQdiv(A, B) _IQ9div(A, B)
2570 #endif
2571 #if GLOBAL_IQ == 8
2572 #define _IQdiv(A, B) _IQ8div(A, B)
2573 #endif
2574 #if GLOBAL_IQ == 7
2575 #define _IQdiv(A, B) _IQ7div(A, B)
2576 #endif
2577 #if GLOBAL_IQ == 6
2578 #define _IQdiv(A, B) _IQ6div(A, B)
2579 #endif
2580 #if GLOBAL_IQ == 5
2581 #define _IQdiv(A, B) _IQ5div(A, B)
2582 #endif
2583 #if GLOBAL_IQ == 4
2584 #define _IQdiv(A, B) _IQ4div(A, B)
2585 #endif
2586 #if GLOBAL_IQ == 3
2587 #define _IQdiv(A, B) _IQ3div(A, B)
2588 #endif
2589 #if GLOBAL_IQ == 2
2590 #define _IQdiv(A, B) _IQ2div(A, B)
2591 #endif
2592 #if GLOBAL_IQ == 1
2593 #define _IQdiv(A, B) _IQ1div(A, B)
2594 #endif
2595 
2596 //*****************************************************************************
2597 //
2598 // Computes the sin of an IQ number.
2599 //
2600 //*****************************************************************************
2601 #ifndef DOXYGEN_SHOULD_SKIP_THIS
2602 extern _iq29 _IQ29sin(_iq29 A);
2603 extern _iq28 _IQ28sin(_iq28 A);
2604 extern _iq27 _IQ27sin(_iq27 A);
2605 extern _iq26 _IQ26sin(_iq26 A);
2606 extern _iq25 _IQ25sin(_iq25 A);
2607 extern _iq24 _IQ24sin(_iq24 A);
2608 extern _iq23 _IQ23sin(_iq23 A);
2609 extern _iq22 _IQ22sin(_iq22 A);
2610 extern _iq21 _IQ21sin(_iq21 A);
2611 extern _iq20 _IQ20sin(_iq20 A);
2612 extern _iq19 _IQ19sin(_iq19 A);
2613 extern _iq18 _IQ18sin(_iq18 A);
2614 extern _iq17 _IQ17sin(_iq17 A);
2615 extern _iq16 _IQ16sin(_iq16 A);
2616 extern _iq15 _IQ15sin(_iq15 A);
2617 extern _iq14 _IQ14sin(_iq14 A);
2618 extern _iq13 _IQ13sin(_iq13 A);
2619 extern _iq12 _IQ12sin(_iq12 A);
2620 extern _iq11 _IQ11sin(_iq11 A);
2621 extern _iq10 _IQ10sin(_iq10 A);
2622 extern _iq9 _IQ9sin(_iq9 A);
2623 extern _iq8 _IQ8sin(_iq8 A);
2624 extern _iq7 _IQ7sin(_iq7 A);
2625 extern _iq6 _IQ6sin(_iq6 A);
2626 extern _iq5 _IQ5sin(_iq5 A);
2627 extern _iq4 _IQ4sin(_iq4 A);
2628 extern _iq3 _IQ3sin(_iq3 A);
2629 extern _iq2 _IQ2sin(_iq2 A);
2630 extern _iq1 _IQ1sin(_iq1 A);
2631 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
2632 
2640 #if GLOBAL_IQ == 29
2641 #define _IQsin(A) _IQ29sin(A)
2642 #endif
2643 #if GLOBAL_IQ == 28
2644 #define _IQsin(A) _IQ28sin(A)
2645 #endif
2646 #if GLOBAL_IQ == 27
2647 #define _IQsin(A) _IQ27sin(A)
2648 #endif
2649 #if GLOBAL_IQ == 26
2650 #define _IQsin(A) _IQ26sin(A)
2651 #endif
2652 #if GLOBAL_IQ == 25
2653 #define _IQsin(A) _IQ25sin(A)
2654 #endif
2655 #if GLOBAL_IQ == 24
2656 #define _IQsin(A) _IQ24sin(A)
2657 #endif
2658 #if GLOBAL_IQ == 23
2659 #define _IQsin(A) _IQ23sin(A)
2660 #endif
2661 #if GLOBAL_IQ == 22
2662 #define _IQsin(A) _IQ22sin(A)
2663 #endif
2664 #if GLOBAL_IQ == 21
2665 #define _IQsin(A) _IQ21sin(A)
2666 #endif
2667 #if GLOBAL_IQ == 20
2668 #define _IQsin(A) _IQ20sin(A)
2669 #endif
2670 #if GLOBAL_IQ == 19
2671 #define _IQsin(A) _IQ19sin(A)
2672 #endif
2673 #if GLOBAL_IQ == 18
2674 #define _IQsin(A) _IQ18sin(A)
2675 #endif
2676 #if GLOBAL_IQ == 17
2677 #define _IQsin(A) _IQ17sin(A)
2678 #endif
2679 #if GLOBAL_IQ == 16
2680 #define _IQsin(A) _IQ16sin(A)
2681 #endif
2682 #if GLOBAL_IQ == 15
2683 #define _IQsin(A) _IQ15sin(A)
2684 #endif
2685 #if GLOBAL_IQ == 14
2686 #define _IQsin(A) _IQ14sin(A)
2687 #endif
2688 #if GLOBAL_IQ == 13
2689 #define _IQsin(A) _IQ13sin(A)
2690 #endif
2691 #if GLOBAL_IQ == 12
2692 #define _IQsin(A) _IQ12sin(A)
2693 #endif
2694 #if GLOBAL_IQ == 11
2695 #define _IQsin(A) _IQ11sin(A)
2696 #endif
2697 #if GLOBAL_IQ == 10
2698 #define _IQsin(A) _IQ10sin(A)
2699 #endif
2700 #if GLOBAL_IQ == 9
2701 #define _IQsin(A) _IQ9sin(A)
2702 #endif
2703 #if GLOBAL_IQ == 8
2704 #define _IQsin(A) _IQ8sin(A)
2705 #endif
2706 #if GLOBAL_IQ == 7
2707 #define _IQsin(A) _IQ7sin(A)
2708 #endif
2709 #if GLOBAL_IQ == 6
2710 #define _IQsin(A) _IQ6sin(A)
2711 #endif
2712 #if GLOBAL_IQ == 5
2713 #define _IQsin(A) _IQ5sin(A)
2714 #endif
2715 #if GLOBAL_IQ == 4
2716 #define _IQsin(A) _IQ4sin(A)
2717 #endif
2718 #if GLOBAL_IQ == 3
2719 #define _IQsin(A) _IQ3sin(A)
2720 #endif
2721 #if GLOBAL_IQ == 2
2722 #define _IQsin(A) _IQ2sin(A)
2723 #endif
2724 #if GLOBAL_IQ == 1
2725 #define _IQsin(A) _IQ1sin(A)
2726 #endif
2727 
2728 //*****************************************************************************
2729 //
2730 // Computes the sin of an IQ number, using cycles per unit instead of radians.
2731 //
2732 //*****************************************************************************
2733 #ifndef DOXYGEN_SHOULD_SKIP_THIS
2734 extern _iq30 _IQ30sinPU(_iq30 A);
2735 extern _iq29 _IQ29sinPU(_iq29 A);
2736 extern _iq28 _IQ28sinPU(_iq28 A);
2737 extern _iq27 _IQ27sinPU(_iq27 A);
2738 extern _iq26 _IQ26sinPU(_iq26 A);
2739 extern _iq25 _IQ25sinPU(_iq25 A);
2740 extern _iq24 _IQ24sinPU(_iq24 A);
2741 extern _iq23 _IQ23sinPU(_iq23 A);
2742 extern _iq22 _IQ22sinPU(_iq22 A);
2743 extern _iq21 _IQ21sinPU(_iq21 A);
2744 extern _iq20 _IQ20sinPU(_iq20 A);
2745 extern _iq19 _IQ19sinPU(_iq19 A);
2746 extern _iq18 _IQ18sinPU(_iq18 A);
2747 extern _iq17 _IQ17sinPU(_iq17 A);
2748 extern _iq16 _IQ16sinPU(_iq16 A);
2749 extern _iq15 _IQ15sinPU(_iq15 A);
2750 extern _iq14 _IQ14sinPU(_iq14 A);
2751 extern _iq13 _IQ13sinPU(_iq13 A);
2752 extern _iq12 _IQ12sinPU(_iq12 A);
2753 extern _iq11 _IQ11sinPU(_iq11 A);
2754 extern _iq10 _IQ10sinPU(_iq10 A);
2755 extern _iq9 _IQ9sinPU(_iq9 A);
2756 extern _iq8 _IQ8sinPU(_iq8 A);
2757 extern _iq7 _IQ7sinPU(_iq7 A);
2758 extern _iq6 _IQ6sinPU(_iq6 A);
2759 extern _iq5 _IQ5sinPU(_iq5 A);
2760 extern _iq4 _IQ4sinPU(_iq4 A);
2761 extern _iq3 _IQ3sinPU(_iq3 A);
2762 extern _iq2 _IQ2sinPU(_iq2 A);
2763 extern _iq1 _IQ1sinPU(_iq1 A);
2764 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
2765 
2773 #if GLOBAL_IQ == 30
2774 #define _IQsinPU(A) _IQ30sinPU(A)
2775 #endif
2776 #if GLOBAL_IQ == 29
2777 #define _IQsinPU(A) _IQ29sinPU(A)
2778 #endif
2779 #if GLOBAL_IQ == 28
2780 #define _IQsinPU(A) _IQ28sinPU(A)
2781 #endif
2782 #if GLOBAL_IQ == 27
2783 #define _IQsinPU(A) _IQ27sinPU(A)
2784 #endif
2785 #if GLOBAL_IQ == 26
2786 #define _IQsinPU(A) _IQ26sinPU(A)
2787 #endif
2788 #if GLOBAL_IQ == 25
2789 #define _IQsinPU(A) _IQ25sinPU(A)
2790 #endif
2791 #if GLOBAL_IQ == 24
2792 #define _IQsinPU(A) _IQ24sinPU(A)
2793 #endif
2794 #if GLOBAL_IQ == 23
2795 #define _IQsinPU(A) _IQ23sinPU(A)
2796 #endif
2797 #if GLOBAL_IQ == 22
2798 #define _IQsinPU(A) _IQ22sinPU(A)
2799 #endif
2800 #if GLOBAL_IQ == 21
2801 #define _IQsinPU(A) _IQ21sinPU(A)
2802 #endif
2803 #if GLOBAL_IQ == 20
2804 #define _IQsinPU(A) _IQ20sinPU(A)
2805 #endif
2806 #if GLOBAL_IQ == 19
2807 #define _IQsinPU(A) _IQ19sinPU(A)
2808 #endif
2809 #if GLOBAL_IQ == 18
2810 #define _IQsinPU(A) _IQ18sinPU(A)
2811 #endif
2812 #if GLOBAL_IQ == 17
2813 #define _IQsinPU(A) _IQ17sinPU(A)
2814 #endif
2815 #if GLOBAL_IQ == 16
2816 #define _IQsinPU(A) _IQ16sinPU(A)
2817 #endif
2818 #if GLOBAL_IQ == 15
2819 #define _IQsinPU(A) _IQ15sinPU(A)
2820 #endif
2821 #if GLOBAL_IQ == 14
2822 #define _IQsinPU(A) _IQ14sinPU(A)
2823 #endif
2824 #if GLOBAL_IQ == 13
2825 #define _IQsinPU(A) _IQ13sinPU(A)
2826 #endif
2827 #if GLOBAL_IQ == 12
2828 #define _IQsinPU(A) _IQ12sinPU(A)
2829 #endif
2830 #if GLOBAL_IQ == 11
2831 #define _IQsinPU(A) _IQ11sinPU(A)
2832 #endif
2833 #if GLOBAL_IQ == 10
2834 #define _IQsinPU(A) _IQ10sinPU(A)
2835 #endif
2836 #if GLOBAL_IQ == 9
2837 #define _IQsinPU(A) _IQ9sinPU(A)
2838 #endif
2839 #if GLOBAL_IQ == 8
2840 #define _IQsinPU(A) _IQ8sinPU(A)
2841 #endif
2842 #if GLOBAL_IQ == 7
2843 #define _IQsinPU(A) _IQ7sinPU(A)
2844 #endif
2845 #if GLOBAL_IQ == 6
2846 #define _IQsinPU(A) _IQ6sinPU(A)
2847 #endif
2848 #if GLOBAL_IQ == 5
2849 #define _IQsinPU(A) _IQ5sinPU(A)
2850 #endif
2851 #if GLOBAL_IQ == 4
2852 #define _IQsinPU(A) _IQ4sinPU(A)
2853 #endif
2854 #if GLOBAL_IQ == 3
2855 #define _IQsinPU(A) _IQ3sinPU(A)
2856 #endif
2857 #if GLOBAL_IQ == 2
2858 #define _IQsinPU(A) _IQ2sinPU(A)
2859 #endif
2860 #if GLOBAL_IQ == 1
2861 #define _IQsinPU(A) _IQ1sinPU(A)
2862 #endif
2863 
2864 //*****************************************************************************
2865 //
2866 // Computes the arcsin of an IQ number.
2867 //
2868 //*****************************************************************************
2869 #ifndef DOXYGEN_SHOULD_SKIP_THIS
2870 extern _iq29 _IQ29asin(_iq29 A);
2871 extern _iq28 _IQ28asin(_iq28 A);
2872 extern _iq27 _IQ27asin(_iq27 A);
2873 extern _iq26 _IQ26asin(_iq26 A);
2874 extern _iq25 _IQ25asin(_iq25 A);
2875 extern _iq24 _IQ24asin(_iq24 A);
2876 extern _iq23 _IQ23asin(_iq23 A);
2877 extern _iq22 _IQ22asin(_iq22 A);
2878 extern _iq21 _IQ21asin(_iq21 A);
2879 extern _iq20 _IQ20asin(_iq20 A);
2880 extern _iq19 _IQ19asin(_iq19 A);
2881 extern _iq18 _IQ18asin(_iq18 A);
2882 extern _iq17 _IQ17asin(_iq17 A);
2883 extern _iq16 _IQ16asin(_iq16 A);
2884 extern _iq15 _IQ15asin(_iq15 A);
2885 extern _iq14 _IQ14asin(_iq14 A);
2886 extern _iq13 _IQ13asin(_iq13 A);
2887 extern _iq12 _IQ12asin(_iq12 A);
2888 extern _iq11 _IQ11asin(_iq11 A);
2889 extern _iq10 _IQ10asin(_iq10 A);
2890 extern _iq9 _IQ9asin(_iq9 A);
2891 extern _iq8 _IQ8asin(_iq8 A);
2892 extern _iq7 _IQ7asin(_iq7 A);
2893 extern _iq6 _IQ6asin(_iq6 A);
2894 extern _iq5 _IQ5asin(_iq5 A);
2895 extern _iq4 _IQ4asin(_iq4 A);
2896 extern _iq3 _IQ3asin(_iq3 A);
2897 extern _iq2 _IQ2asin(_iq2 A);
2898 extern _iq1 _IQ1asin(_iq1 A);
2899 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
2900 
2908 #if GLOBAL_IQ == 29
2909 #define _IQasin(A) _IQ29asin(A)
2910 #endif
2911 #if GLOBAL_IQ == 28
2912 #define _IQasin(A) _IQ28asin(A)
2913 #endif
2914 #if GLOBAL_IQ == 27
2915 #define _IQasin(A) _IQ27asin(A)
2916 #endif
2917 #if GLOBAL_IQ == 26
2918 #define _IQasin(A) _IQ26asin(A)
2919 #endif
2920 #if GLOBAL_IQ == 25
2921 #define _IQasin(A) _IQ25asin(A)
2922 #endif
2923 #if GLOBAL_IQ == 24
2924 #define _IQasin(A) _IQ24asin(A)
2925 #endif
2926 #if GLOBAL_IQ == 23
2927 #define _IQasin(A) _IQ23asin(A)
2928 #endif
2929 #if GLOBAL_IQ == 22
2930 #define _IQasin(A) _IQ22asin(A)
2931 #endif
2932 #if GLOBAL_IQ == 21
2933 #define _IQasin(A) _IQ21asin(A)
2934 #endif
2935 #if GLOBAL_IQ == 20
2936 #define _IQasin(A) _IQ20asin(A)
2937 #endif
2938 #if GLOBAL_IQ == 19
2939 #define _IQasin(A) _IQ19asin(A)
2940 #endif
2941 #if GLOBAL_IQ == 18
2942 #define _IQasin(A) _IQ18asin(A)
2943 #endif
2944 #if GLOBAL_IQ == 17
2945 #define _IQasin(A) _IQ17asin(A)
2946 #endif
2947 #if GLOBAL_IQ == 16
2948 #define _IQasin(A) _IQ16asin(A)
2949 #endif
2950 #if GLOBAL_IQ == 15
2951 #define _IQasin(A) _IQ15asin(A)
2952 #endif
2953 #if GLOBAL_IQ == 14
2954 #define _IQasin(A) _IQ14asin(A)
2955 #endif
2956 #if GLOBAL_IQ == 13
2957 #define _IQasin(A) _IQ13asin(A)
2958 #endif
2959 #if GLOBAL_IQ == 12
2960 #define _IQasin(A) _IQ12asin(A)
2961 #endif
2962 #if GLOBAL_IQ == 11
2963 #define _IQasin(A) _IQ11asin(A)
2964 #endif
2965 #if GLOBAL_IQ == 10
2966 #define _IQasin(A) _IQ10asin(A)
2967 #endif
2968 #if GLOBAL_IQ == 9
2969 #define _IQasin(A) _IQ9asin(A)
2970 #endif
2971 #if GLOBAL_IQ == 8
2972 #define _IQasin(A) _IQ8asin(A)
2973 #endif
2974 #if GLOBAL_IQ == 7
2975 #define _IQasin(A) _IQ7asin(A)
2976 #endif
2977 #if GLOBAL_IQ == 6
2978 #define _IQasin(A) _IQ6asin(A)
2979 #endif
2980 #if GLOBAL_IQ == 5
2981 #define _IQasin(A) _IQ5asin(A)
2982 #endif
2983 #if GLOBAL_IQ == 4
2984 #define _IQasin(A) _IQ4asin(A)
2985 #endif
2986 #if GLOBAL_IQ == 3
2987 #define _IQasin(A) _IQ3asin(A)
2988 #endif
2989 #if GLOBAL_IQ == 2
2990 #define _IQasin(A) _IQ2asin(A)
2991 #endif
2992 #if GLOBAL_IQ == 1
2993 #define _IQasin(A) _IQ1asin(A)
2994 #endif
2995 
2996 //*****************************************************************************
2997 //
2998 // Computes the cos of an IQ number.
2999 //
3000 //*****************************************************************************
3001 #ifndef DOXYGEN_SHOULD_SKIP_THIS
3002 extern _iq29 _IQ29cos(_iq29 A);
3003 extern _iq28 _IQ28cos(_iq28 A);
3004 extern _iq27 _IQ27cos(_iq27 A);
3005 extern _iq26 _IQ26cos(_iq26 A);
3006 extern _iq25 _IQ25cos(_iq25 A);
3007 extern _iq24 _IQ24cos(_iq24 A);
3008 extern _iq23 _IQ23cos(_iq23 A);
3009 extern _iq22 _IQ22cos(_iq22 A);
3010 extern _iq21 _IQ21cos(_iq21 A);
3011 extern _iq20 _IQ20cos(_iq20 A);
3012 extern _iq19 _IQ19cos(_iq19 A);
3013 extern _iq18 _IQ18cos(_iq18 A);
3014 extern _iq17 _IQ17cos(_iq17 A);
3015 extern _iq16 _IQ16cos(_iq16 A);
3016 extern _iq15 _IQ15cos(_iq15 A);
3017 extern _iq14 _IQ14cos(_iq14 A);
3018 extern _iq13 _IQ13cos(_iq13 A);
3019 extern _iq12 _IQ12cos(_iq12 A);
3020 extern _iq11 _IQ11cos(_iq11 A);
3021 extern _iq10 _IQ10cos(_iq10 A);
3022 extern _iq9 _IQ9cos(_iq9 A);
3023 extern _iq8 _IQ8cos(_iq8 A);
3024 extern _iq7 _IQ7cos(_iq7 A);
3025 extern _iq6 _IQ6cos(_iq6 A);
3026 extern _iq5 _IQ5cos(_iq5 A);
3027 extern _iq4 _IQ4cos(_iq4 A);
3028 extern _iq3 _IQ3cos(_iq3 A);
3029 extern _iq2 _IQ2cos(_iq2 A);
3030 extern _iq1 _IQ1cos(_iq1 A);
3031 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
3032 
3040 #if GLOBAL_IQ == 29
3041 #define _IQcos(A) _IQ29cos(A)
3042 #endif
3043 #if GLOBAL_IQ == 28
3044 #define _IQcos(A) _IQ28cos(A)
3045 #endif
3046 #if GLOBAL_IQ == 27
3047 #define _IQcos(A) _IQ27cos(A)
3048 #endif
3049 #if GLOBAL_IQ == 26
3050 #define _IQcos(A) _IQ26cos(A)
3051 #endif
3052 #if GLOBAL_IQ == 25
3053 #define _IQcos(A) _IQ25cos(A)
3054 #endif
3055 #if GLOBAL_IQ == 24
3056 #define _IQcos(A) _IQ24cos(A)
3057 #endif
3058 #if GLOBAL_IQ == 23
3059 #define _IQcos(A) _IQ23cos(A)
3060 #endif
3061 #if GLOBAL_IQ == 22
3062 #define _IQcos(A) _IQ22cos(A)
3063 #endif
3064 #if GLOBAL_IQ == 21
3065 #define _IQcos(A) _IQ21cos(A)
3066 #endif
3067 #if GLOBAL_IQ == 20
3068 #define _IQcos(A) _IQ20cos(A)
3069 #endif
3070 #if GLOBAL_IQ == 19
3071 #define _IQcos(A) _IQ19cos(A)
3072 #endif
3073 #if GLOBAL_IQ == 18
3074 #define _IQcos(A) _IQ18cos(A)
3075 #endif
3076 #if GLOBAL_IQ == 17
3077 #define _IQcos(A) _IQ17cos(A)
3078 #endif
3079 #if GLOBAL_IQ == 16
3080 #define _IQcos(A) _IQ16cos(A)
3081 #endif
3082 #if GLOBAL_IQ == 15
3083 #define _IQcos(A) _IQ15cos(A)
3084 #endif
3085 #if GLOBAL_IQ == 14
3086 #define _IQcos(A) _IQ14cos(A)
3087 #endif
3088 #if GLOBAL_IQ == 13
3089 #define _IQcos(A) _IQ13cos(A)
3090 #endif
3091 #if GLOBAL_IQ == 12
3092 #define _IQcos(A) _IQ12cos(A)
3093 #endif
3094 #if GLOBAL_IQ == 11
3095 #define _IQcos(A) _IQ11cos(A)
3096 #endif
3097 #if GLOBAL_IQ == 10
3098 #define _IQcos(A) _IQ10cos(A)
3099 #endif
3100 #if GLOBAL_IQ == 9
3101 #define _IQcos(A) _IQ9cos(A)
3102 #endif
3103 #if GLOBAL_IQ == 8
3104 #define _IQcos(A) _IQ8cos(A)
3105 #endif
3106 #if GLOBAL_IQ == 7
3107 #define _IQcos(A) _IQ7cos(A)
3108 #endif
3109 #if GLOBAL_IQ == 6
3110 #define _IQcos(A) _IQ6cos(A)
3111 #endif
3112 #if GLOBAL_IQ == 5
3113 #define _IQcos(A) _IQ5cos(A)
3114 #endif
3115 #if GLOBAL_IQ == 4
3116 #define _IQcos(A) _IQ4cos(A)
3117 #endif
3118 #if GLOBAL_IQ == 3
3119 #define _IQcos(A) _IQ3cos(A)
3120 #endif
3121 #if GLOBAL_IQ == 2
3122 #define _IQcos(A) _IQ2cos(A)
3123 #endif
3124 #if GLOBAL_IQ == 1
3125 #define _IQcos(A) _IQ1cos(A)
3126 #endif
3127 
3128 //*****************************************************************************
3129 //
3130 // Computes the cos of an IQ number, using cycles per unit instead of radians.
3131 //
3132 //*****************************************************************************
3133 #ifndef DOXYGEN_SHOULD_SKIP_THIS
3134 extern _iq30 _IQ30cosPU(_iq30 A);
3135 extern _iq29 _IQ29cosPU(_iq29 A);
3136 extern _iq28 _IQ28cosPU(_iq28 A);
3137 extern _iq27 _IQ27cosPU(_iq27 A);
3138 extern _iq26 _IQ26cosPU(_iq26 A);
3139 extern _iq25 _IQ25cosPU(_iq25 A);
3140 extern _iq24 _IQ24cosPU(_iq24 A);
3141 extern _iq23 _IQ23cosPU(_iq23 A);
3142 extern _iq22 _IQ22cosPU(_iq22 A);
3143 extern _iq21 _IQ21cosPU(_iq21 A);
3144 extern _iq20 _IQ20cosPU(_iq20 A);
3145 extern _iq19 _IQ19cosPU(_iq19 A);
3146 extern _iq18 _IQ18cosPU(_iq18 A);
3147 extern _iq17 _IQ17cosPU(_iq17 A);
3148 extern _iq16 _IQ16cosPU(_iq16 A);
3149 extern _iq15 _IQ15cosPU(_iq15 A);
3150 extern _iq14 _IQ14cosPU(_iq14 A);
3151 extern _iq13 _IQ13cosPU(_iq13 A);
3152 extern _iq12 _IQ12cosPU(_iq12 A);
3153 extern _iq11 _IQ11cosPU(_iq11 A);
3154 extern _iq10 _IQ10cosPU(_iq10 A);
3155 extern _iq9 _IQ9cosPU(_iq9 A);
3156 extern _iq8 _IQ8cosPU(_iq8 A);
3157 extern _iq7 _IQ7cosPU(_iq7 A);
3158 extern _iq6 _IQ6cosPU(_iq6 A);
3159 extern _iq5 _IQ5cosPU(_iq5 A);
3160 extern _iq4 _IQ4cosPU(_iq4 A);
3161 extern _iq3 _IQ3cosPU(_iq3 A);
3162 extern _iq2 _IQ2cosPU(_iq2 A);
3163 extern _iq1 _IQ1cosPU(_iq1 A);
3164 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
3165 
3173 #if GLOBAL_IQ == 30
3174 #define _IQcosPU(A) _IQ30cosPU(A)
3175 #endif
3176 #if GLOBAL_IQ == 29
3177 #define _IQcosPU(A) _IQ29cosPU(A)
3178 #endif
3179 #if GLOBAL_IQ == 28
3180 #define _IQcosPU(A) _IQ28cosPU(A)
3181 #endif
3182 #if GLOBAL_IQ == 27
3183 #define _IQcosPU(A) _IQ27cosPU(A)
3184 #endif
3185 #if GLOBAL_IQ == 26
3186 #define _IQcosPU(A) _IQ26cosPU(A)
3187 #endif
3188 #if GLOBAL_IQ == 25
3189 #define _IQcosPU(A) _IQ25cosPU(A)
3190 #endif
3191 #if GLOBAL_IQ == 24
3192 #define _IQcosPU(A) _IQ24cosPU(A)
3193 #endif
3194 #if GLOBAL_IQ == 23
3195 #define _IQcosPU(A) _IQ23cosPU(A)
3196 #endif
3197 #if GLOBAL_IQ == 22
3198 #define _IQcosPU(A) _IQ22cosPU(A)
3199 #endif
3200 #if GLOBAL_IQ == 21
3201 #define _IQcosPU(A) _IQ21cosPU(A)
3202 #endif
3203 #if GLOBAL_IQ == 20
3204 #define _IQcosPU(A) _IQ20cosPU(A)
3205 #endif
3206 #if GLOBAL_IQ == 19
3207 #define _IQcosPU(A) _IQ19cosPU(A)
3208 #endif
3209 #if GLOBAL_IQ == 18
3210 #define _IQcosPU(A) _IQ18cosPU(A)
3211 #endif
3212 #if GLOBAL_IQ == 17
3213 #define _IQcosPU(A) _IQ17cosPU(A)
3214 #endif
3215 #if GLOBAL_IQ == 16
3216 #define _IQcosPU(A) _IQ16cosPU(A)
3217 #endif
3218 #if GLOBAL_IQ == 15
3219 #define _IQcosPU(A) _IQ15cosPU(A)
3220 #endif
3221 #if GLOBAL_IQ == 14
3222 #define _IQcosPU(A) _IQ14cosPU(A)
3223 #endif
3224 #if GLOBAL_IQ == 13
3225 #define _IQcosPU(A) _IQ13cosPU(A)
3226 #endif
3227 #if GLOBAL_IQ == 12
3228 #define _IQcosPU(A) _IQ12cosPU(A)
3229 #endif
3230 #if GLOBAL_IQ == 11
3231 #define _IQcosPU(A) _IQ11cosPU(A)
3232 #endif
3233 #if GLOBAL_IQ == 10
3234 #define _IQcosPU(A) _IQ10cosPU(A)
3235 #endif
3236 #if GLOBAL_IQ == 9
3237 #define _IQcosPU(A) _IQ9cosPU(A)
3238 #endif
3239 #if GLOBAL_IQ == 8
3240 #define _IQcosPU(A) _IQ8cosPU(A)
3241 #endif
3242 #if GLOBAL_IQ == 7
3243 #define _IQcosPU(A) _IQ7cosPU(A)
3244 #endif
3245 #if GLOBAL_IQ == 6
3246 #define _IQcosPU(A) _IQ6cosPU(A)
3247 #endif
3248 #if GLOBAL_IQ == 5
3249 #define _IQcosPU(A) _IQ5cosPU(A)
3250 #endif
3251 #if GLOBAL_IQ == 4
3252 #define _IQcosPU(A) _IQ4cosPU(A)
3253 #endif
3254 #if GLOBAL_IQ == 3
3255 #define _IQcosPU(A) _IQ3cosPU(A)
3256 #endif
3257 #if GLOBAL_IQ == 2
3258 #define _IQcosPU(A) _IQ2cosPU(A)
3259 #endif
3260 #if GLOBAL_IQ == 1
3261 #define _IQcosPU(A) _IQ1cosPU(A)
3262 #endif
3263 
3264 //*****************************************************************************
3265 //
3266 // Computes the arccos of an IQ number.
3267 //
3268 //*****************************************************************************
3276 #define _IQ29acos(A) (_IQ29(1.570796327) - _IQ29asin(A))
3277 
3284 #define _IQ28acos(A) (_IQ28(1.570796327) - _IQ28asin(A))
3285 
3292 #define _IQ27acos(A) (_IQ27(1.570796327) - _IQ27asin(A))
3293 
3300 #define _IQ26acos(A) (_IQ26(1.570796327) - _IQ26asin(A))
3301 
3308 #define _IQ25acos(A) (_IQ25(1.570796327) - _IQ25asin(A))
3309 
3316 #define _IQ24acos(A) (_IQ24(1.570796327) - _IQ24asin(A))
3317 
3324 #define _IQ23acos(A) (_IQ23(1.570796327) - _IQ23asin(A))
3325 
3332 #define _IQ22acos(A) (_IQ22(1.570796327) - _IQ22asin(A))
3333 
3340 #define _IQ21acos(A) (_IQ21(1.570796327) - _IQ21asin(A))
3341 
3348 #define _IQ20acos(A) (_IQ20(1.570796327) - _IQ20asin(A))
3349 
3356 #define _IQ19acos(A) (_IQ19(1.570796327) - _IQ19asin(A))
3357 
3364 #define _IQ18acos(A) (_IQ18(1.570796327) - _IQ18asin(A))
3365 
3372 #define _IQ17acos(A) (_IQ17(1.570796327) - _IQ17asin(A))
3373 
3380 #define _IQ16acos(A) (_IQ16(1.570796327) - _IQ16asin(A))
3381 
3388 #define _IQ15acos(A) (_IQ15(1.570796327) - _IQ15asin(A))
3389 
3396 #define _IQ14acos(A) (_IQ14(1.570796327) - _IQ14asin(A))
3397 
3404 #define _IQ13acos(A) (_IQ13(1.570796327) - _IQ13asin(A))
3405 
3412 #define _IQ12acos(A) (_IQ12(1.570796327) - _IQ12asin(A))
3413 
3420 #define _IQ11acos(A) (_IQ11(1.570796327) - _IQ11asin(A))
3421 
3428 #define _IQ10acos(A) (_IQ10(1.570796327) - _IQ10asin(A))
3429 
3436 #define _IQ9acos(A) (_IQ9(1.570796327) - _IQ9asin(A))
3437 
3444 #define _IQ8acos(A) (_IQ8(1.570796327) - _IQ8asin(A))
3445 
3452 #define _IQ7acos(A) (_IQ7(1.570796327) - _IQ7asin(A))
3453 
3460 #define _IQ6acos(A) (_IQ6(1.570796327) - _IQ6asin(A))
3461 
3468 #define _IQ5acos(A) (_IQ5(1.570796327) - _IQ5asin(A))
3469 
3476 #define _IQ4acos(A) (_IQ4(1.570796327) - _IQ4asin(A))
3477 
3484 #define _IQ3acos(A) (_IQ3(1.570796327) - _IQ3asin(A))
3485 
3492 #define _IQ2acos(A) (_IQ2(1.570796327) - _IQ2asin(A))
3493 
3500 #define _IQ1acos(A) (_IQ1(1.570796327) - _IQ1asin(A))
3501 
3509 #if GLOBAL_IQ == 29
3510 #define _IQacos(A) _IQ29acos(A)
3511 #endif
3512 #if GLOBAL_IQ == 28
3513 #define _IQacos(A) _IQ28acos(A)
3514 #endif
3515 #if GLOBAL_IQ == 27
3516 #define _IQacos(A) _IQ27acos(A)
3517 #endif
3518 #if GLOBAL_IQ == 26
3519 #define _IQacos(A) _IQ26acos(A)
3520 #endif
3521 #if GLOBAL_IQ == 25
3522 #define _IQacos(A) _IQ25acos(A)
3523 #endif
3524 #if GLOBAL_IQ == 24
3525 #define _IQacos(A) _IQ24acos(A)
3526 #endif
3527 #if GLOBAL_IQ == 23
3528 #define _IQacos(A) _IQ23acos(A)
3529 #endif
3530 #if GLOBAL_IQ == 22
3531 #define _IQacos(A) _IQ22acos(A)
3532 #endif
3533 #if GLOBAL_IQ == 21
3534 #define _IQacos(A) _IQ21acos(A)
3535 #endif
3536 #if GLOBAL_IQ == 20
3537 #define _IQacos(A) _IQ20acos(A)
3538 #endif
3539 #if GLOBAL_IQ == 19
3540 #define _IQacos(A) _IQ19acos(A)
3541 #endif
3542 #if GLOBAL_IQ == 18
3543 #define _IQacos(A) _IQ18acos(A)
3544 #endif
3545 #if GLOBAL_IQ == 17
3546 #define _IQacos(A) _IQ17acos(A)
3547 #endif
3548 #if GLOBAL_IQ == 16
3549 #define _IQacos(A) _IQ16acos(A)
3550 #endif
3551 #if GLOBAL_IQ == 15
3552 #define _IQacos(A) _IQ15acos(A)
3553 #endif
3554 #if GLOBAL_IQ == 14
3555 #define _IQacos(A) _IQ14acos(A)
3556 #endif
3557 #if GLOBAL_IQ == 13
3558 #define _IQacos(A) _IQ13acos(A)
3559 #endif
3560 #if GLOBAL_IQ == 12
3561 #define _IQacos(A) _IQ12acos(A)
3562 #endif
3563 #if GLOBAL_IQ == 11
3564 #define _IQacos(A) _IQ11acos(A)
3565 #endif
3566 #if GLOBAL_IQ == 10
3567 #define _IQacos(A) _IQ10acos(A)
3568 #endif
3569 #if GLOBAL_IQ == 9
3570 #define _IQacos(A) _IQ9acos(A)
3571 #endif
3572 #if GLOBAL_IQ == 8
3573 #define _IQacos(A) _IQ8acos(A)
3574 #endif
3575 #if GLOBAL_IQ == 7
3576 #define _IQacos(A) _IQ7acos(A)
3577 #endif
3578 #if GLOBAL_IQ == 6
3579 #define _IQacos(A) _IQ6acos(A)
3580 #endif
3581 #if GLOBAL_IQ == 5
3582 #define _IQacos(A) _IQ5acos(A)
3583 #endif
3584 #if GLOBAL_IQ == 4
3585 #define _IQacos(A) _IQ4acos(A)
3586 #endif
3587 #if GLOBAL_IQ == 3
3588 #define _IQacos(A) _IQ3acos(A)
3589 #endif
3590 #if GLOBAL_IQ == 2
3591 #define _IQacos(A) _IQ2acos(A)
3592 #endif
3593 #if GLOBAL_IQ == 1
3594 #define _IQacos(A) _IQ1acos(A)
3595 #endif
3596 
3597 //*****************************************************************************
3598 //
3599 // Computes the arctan of a coordinate specified by two IQ numbers.
3600 //
3601 //*****************************************************************************
3602 #ifndef DOXYGEN_SHOULD_SKIP_THIS
3603 extern _iq29 _IQ29atan2(_iq29 A, _iq29 B);
3604 extern _iq28 _IQ28atan2(_iq28 A, _iq28 B);
3605 extern _iq27 _IQ27atan2(_iq27 A, _iq27 B);
3606 extern _iq26 _IQ26atan2(_iq26 A, _iq26 B);
3607 extern _iq25 _IQ25atan2(_iq25 A, _iq25 B);
3608 extern _iq24 _IQ24atan2(_iq24 A, _iq24 B);
3609 extern _iq23 _IQ23atan2(_iq23 A, _iq23 B);
3610 extern _iq22 _IQ22atan2(_iq22 A, _iq22 B);
3611 extern _iq21 _IQ21atan2(_iq21 A, _iq21 B);
3612 extern _iq20 _IQ20atan2(_iq20 A, _iq20 B);
3613 extern _iq19 _IQ19atan2(_iq19 A, _iq19 B);
3614 extern _iq18 _IQ18atan2(_iq18 A, _iq18 B);
3615 extern _iq17 _IQ17atan2(_iq17 A, _iq17 B);
3616 extern _iq16 _IQ16atan2(_iq16 A, _iq16 B);
3617 extern _iq15 _IQ15atan2(_iq15 A, _iq15 B);
3618 extern _iq14 _IQ14atan2(_iq14 A, _iq14 B);
3619 extern _iq13 _IQ13atan2(_iq13 A, _iq13 B);
3620 extern _iq12 _IQ12atan2(_iq12 A, _iq12 B);
3621 extern _iq11 _IQ11atan2(_iq11 A, _iq11 B);
3622 extern _iq10 _IQ10atan2(_iq10 A, _iq10 B);
3623 extern _iq9 _IQ9atan2(_iq9 A, _iq9 B);
3624 extern _iq8 _IQ8atan2(_iq8 A, _iq8 B);
3625 extern _iq7 _IQ7atan2(_iq7 A, _iq7 B);
3626 extern _iq6 _IQ6atan2(_iq6 A, _iq6 B);
3627 extern _iq5 _IQ5atan2(_iq5 A, _iq5 B);
3628 extern _iq4 _IQ4atan2(_iq4 A, _iq4 B);
3629 extern _iq3 _IQ3atan2(_iq3 A, _iq3 B);
3630 extern _iq2 _IQ2atan2(_iq2 A, _iq2 B);
3631 extern _iq1 _IQ1atan2(_iq1 A, _iq1 B);
3632 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
3633 
3644 #if GLOBAL_IQ == 29
3645 #define _IQatan2(A, B) _IQ29atan2(A, B)
3646 #endif
3647 #if GLOBAL_IQ == 28
3648 #define _IQatan2(A, B) _IQ28atan2(A, B)
3649 #endif
3650 #if GLOBAL_IQ == 27
3651 #define _IQatan2(A, B) _IQ27atan2(A, B)
3652 #endif
3653 #if GLOBAL_IQ == 26
3654 #define _IQatan2(A, B) _IQ26atan2(A, B)
3655 #endif
3656 #if GLOBAL_IQ == 25
3657 #define _IQatan2(A, B) _IQ25atan2(A, B)
3658 #endif
3659 #if GLOBAL_IQ == 24
3660 #define _IQatan2(A, B) _IQ24atan2(A, B)
3661 #endif
3662 #if GLOBAL_IQ == 23
3663 #define _IQatan2(A, B) _IQ23atan2(A, B)
3664 #endif
3665 #if GLOBAL_IQ == 22
3666 #define _IQatan2(A, B) _IQ22atan2(A, B)
3667 #endif
3668 #if GLOBAL_IQ == 21
3669 #define _IQatan2(A, B) _IQ21atan2(A, B)
3670 #endif
3671 #if GLOBAL_IQ == 20
3672 #define _IQatan2(A, B) _IQ20atan2(A, B)
3673 #endif
3674 #if GLOBAL_IQ == 19
3675 #define _IQatan2(A, B) _IQ19atan2(A, B)
3676 #endif
3677 #if GLOBAL_IQ == 18
3678 #define _IQatan2(A, B) _IQ18atan2(A, B)
3679 #endif
3680 #if GLOBAL_IQ == 17
3681 #define _IQatan2(A, B) _IQ17atan2(A, B)
3682 #endif
3683 #if GLOBAL_IQ == 16
3684 #define _IQatan2(A, B) _IQ16atan2(A, B)
3685 #endif
3686 #if GLOBAL_IQ == 15
3687 #define _IQatan2(A, B) _IQ15atan2(A, B)
3688 #endif
3689 #if GLOBAL_IQ == 14
3690 #define _IQatan2(A, B) _IQ14atan2(A, B)
3691 #endif
3692 #if GLOBAL_IQ == 13
3693 #define _IQatan2(A, B) _IQ13atan2(A, B)
3694 #endif
3695 #if GLOBAL_IQ == 12
3696 #define _IQatan2(A, B) _IQ12atan2(A, B)
3697 #endif
3698 #if GLOBAL_IQ == 11
3699 #define _IQatan2(A, B) _IQ11atan2(A, B)
3700 #endif
3701 #if GLOBAL_IQ == 10
3702 #define _IQatan2(A, B) _IQ10atan2(A, B)
3703 #endif
3704 #if GLOBAL_IQ == 9
3705 #define _IQatan2(A, B) _IQ9atan2(A, B)
3706 #endif
3707 #if GLOBAL_IQ == 8
3708 #define _IQatan2(A, B) _IQ8atan2(A, B)
3709 #endif
3710 #if GLOBAL_IQ == 7
3711 #define _IQatan2(A, B) _IQ7atan2(A, B)
3712 #endif
3713 #if GLOBAL_IQ == 6
3714 #define _IQatan2(A, B) _IQ6atan2(A, B)
3715 #endif
3716 #if GLOBAL_IQ == 5
3717 #define _IQatan2(A, B) _IQ5atan2(A, B)
3718 #endif
3719 #if GLOBAL_IQ == 4
3720 #define _IQatan2(A, B) _IQ4atan2(A, B)
3721 #endif
3722 #if GLOBAL_IQ == 3
3723 #define _IQatan2(A, B) _IQ3atan2(A, B)
3724 #endif
3725 #if GLOBAL_IQ == 2
3726 #define _IQatan2(A, B) _IQ2atan2(A, B)
3727 #endif
3728 #if GLOBAL_IQ == 1
3729 #define _IQatan2(A, B) _IQ1atan2(A, B)
3730 #endif
3731 
3732 //*****************************************************************************
3733 //
3734 // Computes the arctan of a coordinate specified by two IQ numbers, returning
3735 // the value in cycles per unit instead of radians.
3736 //
3737 //*****************************************************************************
3738 #ifndef DOXYGEN_SHOULD_SKIP_THIS
3739 extern _iq30 _IQ30atan2PU(_iq30 A, _iq30 B);
3740 extern _iq29 _IQ29atan2PU(_iq29 A, _iq29 B);
3741 extern _iq28 _IQ28atan2PU(_iq28 A, _iq28 B);
3742 extern _iq27 _IQ27atan2PU(_iq27 A, _iq27 B);
3743 extern _iq26 _IQ26atan2PU(_iq26 A, _iq26 B);
3744 extern _iq25 _IQ25atan2PU(_iq25 A, _iq25 B);
3745 extern _iq24 _IQ24atan2PU(_iq24 A, _iq24 B);
3746 extern _iq23 _IQ23atan2PU(_iq23 A, _iq23 B);
3747 extern _iq22 _IQ22atan2PU(_iq22 A, _iq22 B);
3748 extern _iq21 _IQ21atan2PU(_iq21 A, _iq21 B);
3749 extern _iq20 _IQ20atan2PU(_iq20 A, _iq20 B);
3750 extern _iq19 _IQ19atan2PU(_iq19 A, _iq19 B);
3751 extern _iq18 _IQ18atan2PU(_iq18 A, _iq18 B);
3752 extern _iq17 _IQ17atan2PU(_iq17 A, _iq17 B);
3753 extern _iq16 _IQ16atan2PU(_iq16 A, _iq16 B);
3754 extern _iq15 _IQ15atan2PU(_iq15 A, _iq15 B);
3755 extern _iq14 _IQ14atan2PU(_iq14 A, _iq14 B);
3756 extern _iq13 _IQ13atan2PU(_iq13 A, _iq13 B);
3757 extern _iq12 _IQ12atan2PU(_iq12 A, _iq12 B);
3758 extern _iq11 _IQ11atan2PU(_iq11 A, _iq11 B);
3759 extern _iq10 _IQ10atan2PU(_iq10 A, _iq10 B);
3760 extern _iq9 _IQ9atan2PU(_iq9 A, _iq9 B);
3761 extern _iq8 _IQ8atan2PU(_iq8 A, _iq8 B);
3762 extern _iq7 _IQ7atan2PU(_iq7 A, _iq7 B);
3763 extern _iq6 _IQ6atan2PU(_iq6 A, _iq6 B);
3764 extern _iq5 _IQ5atan2PU(_iq5 A, _iq5 B);
3765 extern _iq4 _IQ4atan2PU(_iq4 A, _iq4 B);
3766 extern _iq3 _IQ3atan2PU(_iq3 A, _iq3 B);
3767 extern _iq2 _IQ2atan2PU(_iq2 A, _iq2 B);
3768 extern _iq1 _IQ1atan2PU(_iq1 A, _iq1 B);
3769 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
3770 
3781 #if GLOBAL_IQ == 30
3782 #define _IQatan2PU(A, B) _IQ30atan2PU(A, B)
3783 #endif
3784 #if GLOBAL_IQ == 29
3785 #define _IQatan2PU(A, B) _IQ29atan2PU(A, B)
3786 #endif
3787 #if GLOBAL_IQ == 28
3788 #define _IQatan2PU(A, B) _IQ28atan2PU(A, B)
3789 #endif
3790 #if GLOBAL_IQ == 27
3791 #define _IQatan2PU(A, B) _IQ27atan2PU(A, B)
3792 #endif
3793 #if GLOBAL_IQ == 26
3794 #define _IQatan2PU(A, B) _IQ26atan2PU(A, B)
3795 #endif
3796 #if GLOBAL_IQ == 25
3797 #define _IQatan2PU(A, B) _IQ25atan2PU(A, B)
3798 #endif
3799 #if GLOBAL_IQ == 24
3800 #define _IQatan2PU(A, B) _IQ24atan2PU(A, B)
3801 #endif
3802 #if GLOBAL_IQ == 23
3803 #define _IQatan2PU(A, B) _IQ23atan2PU(A, B)
3804 #endif
3805 #if GLOBAL_IQ == 22
3806 #define _IQatan2PU(A, B) _IQ22atan2PU(A, B)
3807 #endif
3808 #if GLOBAL_IQ == 21
3809 #define _IQatan2PU(A, B) _IQ21atan2PU(A, B)
3810 #endif
3811 #if GLOBAL_IQ == 20
3812 #define _IQatan2PU(A, B) _IQ20atan2PU(A, B)
3813 #endif
3814 #if GLOBAL_IQ == 19
3815 #define _IQatan2PU(A, B) _IQ19atan2PU(A, B)
3816 #endif
3817 #if GLOBAL_IQ == 18
3818 #define _IQatan2PU(A, B) _IQ18atan2PU(A, B)
3819 #endif
3820 #if GLOBAL_IQ == 17
3821 #define _IQatan2PU(A, B) _IQ17atan2PU(A, B)
3822 #endif
3823 #if GLOBAL_IQ == 16
3824 #define _IQatan2PU(A, B) _IQ16atan2PU(A, B)
3825 #endif
3826 #if GLOBAL_IQ == 15
3827 #define _IQatan2PU(A, B) _IQ15atan2PU(A, B)
3828 #endif
3829 #if GLOBAL_IQ == 14
3830 #define _IQatan2PU(A, B) _IQ14atan2PU(A, B)
3831 #endif
3832 #if GLOBAL_IQ == 13
3833 #define _IQatan2PU(A, B) _IQ13atan2PU(A, B)
3834 #endif
3835 #if GLOBAL_IQ == 12
3836 #define _IQatan2PU(A, B) _IQ12atan2PU(A, B)
3837 #endif
3838 #if GLOBAL_IQ == 11
3839 #define _IQatan2PU(A, B) _IQ11atan2PU(A, B)
3840 #endif
3841 #if GLOBAL_IQ == 10
3842 #define _IQatan2PU(A, B) _IQ10atan2PU(A, B)
3843 #endif
3844 #if GLOBAL_IQ == 9
3845 #define _IQatan2PU(A, B) _IQ9atan2PU(A, B)
3846 #endif
3847 #if GLOBAL_IQ == 8
3848 #define _IQatan2PU(A, B) _IQ8atan2PU(A, B)
3849 #endif
3850 #if GLOBAL_IQ == 7
3851 #define _IQatan2PU(A, B) _IQ7atan2PU(A, B)
3852 #endif
3853 #if GLOBAL_IQ == 6
3854 #define _IQatan2PU(A, B) _IQ6atan2PU(A, B)
3855 #endif
3856 #if GLOBAL_IQ == 5
3857 #define _IQatan2PU(A, B) _IQ5atan2PU(A, B)
3858 #endif
3859 #if GLOBAL_IQ == 4
3860 #define _IQatan2PU(A, B) _IQ4atan2PU(A, B)
3861 #endif
3862 #if GLOBAL_IQ == 3
3863 #define _IQatan2PU(A, B) _IQ3atan2PU(A, B)
3864 #endif
3865 #if GLOBAL_IQ == 2
3866 #define _IQatan2PU(A, B) _IQ2atan2PU(A, B)
3867 #endif
3868 #if GLOBAL_IQ == 1
3869 #define _IQatan2PU(A, B) _IQ1atan2PU(A, B)
3870 #endif
3871 
3872 //*****************************************************************************
3873 //
3874 // Computes the arctan of an IQ number.
3875 //
3876 //*****************************************************************************
3884 #define _IQ29atan(A) _IQ29atan2(A, _IQ29(1.0))
3885 
3892 #define _IQ28atan(A) _IQ28atan2(A, _IQ28(1.0))
3893 
3900 #define _IQ27atan(A) _IQ27atan2(A, _IQ27(1.0))
3901 
3908 #define _IQ26atan(A) _IQ26atan2(A, _IQ26(1.0))
3909 
3916 #define _IQ25atan(A) _IQ25atan2(A, _IQ25(1.0))
3917 
3924 #define _IQ24atan(A) _IQ24atan2(A, _IQ24(1.0))
3925 
3932 #define _IQ23atan(A) _IQ23atan2(A, _IQ23(1.0))
3933 
3940 #define _IQ22atan(A) _IQ22atan2(A, _IQ22(1.0))
3941 
3948 #define _IQ21atan(A) _IQ21atan2(A, _IQ21(1.0))
3949 
3956 #define _IQ20atan(A) _IQ20atan2(A, _IQ20(1.0))
3957 
3964 #define _IQ19atan(A) _IQ19atan2(A, _IQ19(1.0))
3965 
3972 #define _IQ18atan(A) _IQ18atan2(A, _IQ18(1.0))
3973 
3980 #define _IQ17atan(A) _IQ17atan2(A, _IQ17(1.0))
3981 
3988 #define _IQ16atan(A) _IQ16atan2(A, _IQ16(1.0))
3989 
3996 #define _IQ15atan(A) _IQ15atan2(A, _IQ15(1.0))
3997 
4004 #define _IQ14atan(A) _IQ14atan2(A, _IQ14(1.0))
4005 
4012 #define _IQ13atan(A) _IQ13atan2(A, _IQ13(1.0))
4013 
4020 #define _IQ12atan(A) _IQ12atan2(A, _IQ12(1.0))
4021 
4028 #define _IQ11atan(A) _IQ11atan2(A, _IQ11(1.0))
4029 
4036 #define _IQ10atan(A) _IQ10atan2(A, _IQ10(1.0))
4037 
4044 #define _IQ9atan(A) _IQ9atan2(A, _IQ9(1.0))
4045 
4052 #define _IQ8atan(A) _IQ8atan2(A, _IQ8(1.0))
4053 
4060 #define _IQ7atan(A) _IQ7atan2(A, _IQ7(1.0))
4061 
4068 #define _IQ6atan(A) _IQ6atan2(A, _IQ6(1.0))
4069 
4076 #define _IQ5atan(A) _IQ5atan2(A, _IQ5(1.0))
4077 
4084 #define _IQ4atan(A) _IQ4atan2(A, _IQ4(1.0))
4085 
4092 #define _IQ3atan(A) _IQ3atan2(A, _IQ3(1.0))
4093 
4100 #define _IQ2atan(A) _IQ2atan2(A, _IQ2(1.0))
4101 
4108 #define _IQ1atan(A) _IQ1atan2(A, _IQ1(1.0))
4109 
4117 #if GLOBAL_IQ == 29
4118 #define _IQatan(A) _IQ29atan2(A, _IQ29(1.0))
4119 #endif
4120 #if GLOBAL_IQ == 28
4121 #define _IQatan(A) _IQ28atan2(A, _IQ28(1.0))
4122 #endif
4123 #if GLOBAL_IQ == 27
4124 #define _IQatan(A) _IQ27atan2(A, _IQ27(1.0))
4125 #endif
4126 #if GLOBAL_IQ == 26
4127 #define _IQatan(A) _IQ26atan2(A, _IQ26(1.0))
4128 #endif
4129 #if GLOBAL_IQ == 25
4130 #define _IQatan(A) _IQ25atan2(A, _IQ25(1.0))
4131 #endif
4132 #if GLOBAL_IQ == 24
4133 #define _IQatan(A) _IQ24atan2(A, _IQ24(1.0))
4134 #endif
4135 #if GLOBAL_IQ == 23
4136 #define _IQatan(A) _IQ23atan2(A, _IQ23(1.0))
4137 #endif
4138 #if GLOBAL_IQ == 22
4139 #define _IQatan(A) _IQ22atan2(A, _IQ22(1.0))
4140 #endif
4141 #if GLOBAL_IQ == 21
4142 #define _IQatan(A) _IQ21atan2(A, _IQ21(1.0))
4143 #endif
4144 #if GLOBAL_IQ == 20
4145 #define _IQatan(A) _IQ20atan2(A, _IQ20(1.0))
4146 #endif
4147 #if GLOBAL_IQ == 19
4148 #define _IQatan(A) _IQ19atan2(A, _IQ19(1.0))
4149 #endif
4150 #if GLOBAL_IQ == 18
4151 #define _IQatan(A) _IQ18atan2(A, _IQ18(1.0))
4152 #endif
4153 #if GLOBAL_IQ == 17
4154 #define _IQatan(A) _IQ17atan2(A, _IQ17(1.0))
4155 #endif
4156 #if GLOBAL_IQ == 16
4157 #define _IQatan(A) _IQ16atan2(A, _IQ16(1.0))
4158 #endif
4159 #if GLOBAL_IQ == 15
4160 #define _IQatan(A) _IQ15atan2(A, _IQ15(1.0))
4161 #endif
4162 #if GLOBAL_IQ == 14
4163 #define _IQatan(A) _IQ14atan2(A, _IQ14(1.0))
4164 #endif
4165 #if GLOBAL_IQ == 13
4166 #define _IQatan(A) _IQ13atan2(A, _IQ13(1.0))
4167 #endif
4168 #if GLOBAL_IQ == 12
4169 #define _IQatan(A) _IQ12atan2(A, _IQ12(1.0))
4170 #endif
4171 #if GLOBAL_IQ == 11
4172 #define _IQatan(A) _IQ11atan2(A, _IQ11(1.0))
4173 #endif
4174 #if GLOBAL_IQ == 10
4175 #define _IQatan(A) _IQ10atan2(A, _IQ10(1.0))
4176 #endif
4177 #if GLOBAL_IQ == 9
4178 #define _IQatan(A) _IQ9atan2(A, _IQ9(1.0))
4179 #endif
4180 #if GLOBAL_IQ == 8
4181 #define _IQatan(A) _IQ8atan2(A, _IQ8(1.0))
4182 #endif
4183 #if GLOBAL_IQ == 7
4184 #define _IQatan(A) _IQ7atan2(A, _IQ7(1.0))
4185 #endif
4186 #if GLOBAL_IQ == 6
4187 #define _IQatan(A) _IQ6atan2(A, _IQ6(1.0))
4188 #endif
4189 #if GLOBAL_IQ == 5
4190 #define _IQatan(A) _IQ5atan2(A, _IQ5(1.0))
4191 #endif
4192 #if GLOBAL_IQ == 4
4193 #define _IQatan(A) _IQ4atan2(A, _IQ4(1.0))
4194 #endif
4195 #if GLOBAL_IQ == 3
4196 #define _IQatan(A) _IQ3atan2(A, _IQ3(1.0))
4197 #endif
4198 #if GLOBAL_IQ == 2
4199 #define _IQatan(A) _IQ2atan2(A, _IQ2(1.0))
4200 #endif
4201 #if GLOBAL_IQ == 1
4202 #define _IQatan(A) _IQ1atan2(A, _IQ1(1.0))
4203 #endif
4204 
4205 //*****************************************************************************
4206 //
4207 // Computes the square root of an IQ number.
4208 //
4209 //*****************************************************************************
4210 #ifndef DOXYGEN_SHOULD_SKIP_THIS
4211 extern _iq30 _IQ30sqrt(_iq30 A);
4212 extern _iq29 _IQ29sqrt(_iq29 A);
4213 extern _iq28 _IQ28sqrt(_iq28 A);
4214 extern _iq27 _IQ27sqrt(_iq27 A);
4215 extern _iq26 _IQ26sqrt(_iq26 A);
4216 extern _iq25 _IQ25sqrt(_iq25 A);
4217 extern _iq24 _IQ24sqrt(_iq24 A);
4218 extern _iq23 _IQ23sqrt(_iq23 A);
4219 extern _iq22 _IQ22sqrt(_iq22 A);
4220 extern _iq21 _IQ21sqrt(_iq21 A);
4221 extern _iq20 _IQ20sqrt(_iq20 A);
4222 extern _iq19 _IQ19sqrt(_iq19 A);
4223 extern _iq18 _IQ18sqrt(_iq18 A);
4224 extern _iq17 _IQ17sqrt(_iq17 A);
4225 extern _iq16 _IQ16sqrt(_iq16 A);
4226 extern _iq15 _IQ15sqrt(_iq15 A);
4227 extern _iq14 _IQ14sqrt(_iq14 A);
4228 extern _iq13 _IQ13sqrt(_iq13 A);
4229 extern _iq12 _IQ12sqrt(_iq12 A);
4230 extern _iq11 _IQ11sqrt(_iq11 A);
4231 extern _iq10 _IQ10sqrt(_iq10 A);
4232 extern _iq9 _IQ9sqrt(_iq9 A);
4233 extern _iq8 _IQ8sqrt(_iq8 A);
4234 extern _iq7 _IQ7sqrt(_iq7 A);
4235 extern _iq6 _IQ6sqrt(_iq6 A);
4236 extern _iq5 _IQ5sqrt(_iq5 A);
4237 extern _iq4 _IQ4sqrt(_iq4 A);
4238 extern _iq3 _IQ3sqrt(_iq3 A);
4239 extern _iq2 _IQ2sqrt(_iq2 A);
4240 extern _iq1 _IQ1sqrt(_iq1 A);
4241 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
4242 
4250 #if GLOBAL_IQ == 30
4251 #define _IQsqrt(A) _IQ30sqrt(A)
4252 #endif
4253 #if GLOBAL_IQ == 29
4254 #define _IQsqrt(A) _IQ29sqrt(A)
4255 #endif
4256 #if GLOBAL_IQ == 28
4257 #define _IQsqrt(A) _IQ28sqrt(A)
4258 #endif
4259 #if GLOBAL_IQ == 27
4260 #define _IQsqrt(A) _IQ27sqrt(A)
4261 #endif
4262 #if GLOBAL_IQ == 26
4263 #define _IQsqrt(A) _IQ26sqrt(A)
4264 #endif
4265 #if GLOBAL_IQ == 25
4266 #define _IQsqrt(A) _IQ25sqrt(A)
4267 #endif
4268 #if GLOBAL_IQ == 24
4269 #define _IQsqrt(A) _IQ24sqrt(A)
4270 #endif
4271 #if GLOBAL_IQ == 23
4272 #define _IQsqrt(A) _IQ23sqrt(A)
4273 #endif
4274 #if GLOBAL_IQ == 22
4275 #define _IQsqrt(A) _IQ22sqrt(A)
4276 #endif
4277 #if GLOBAL_IQ == 21
4278 #define _IQsqrt(A) _IQ21sqrt(A)
4279 #endif
4280 #if GLOBAL_IQ == 20
4281 #define _IQsqrt(A) _IQ20sqrt(A)
4282 #endif
4283 #if GLOBAL_IQ == 19
4284 #define _IQsqrt(A) _IQ19sqrt(A)
4285 #endif
4286 #if GLOBAL_IQ == 18
4287 #define _IQsqrt(A) _IQ18sqrt(A)
4288 #endif
4289 #if GLOBAL_IQ == 17
4290 #define _IQsqrt(A) _IQ17sqrt(A)
4291 #endif
4292 #if GLOBAL_IQ == 16
4293 #define _IQsqrt(A) _IQ16sqrt(A)
4294 #endif
4295 #if GLOBAL_IQ == 15
4296 #define _IQsqrt(A) _IQ15sqrt(A)
4297 #endif
4298 #if GLOBAL_IQ == 14
4299 #define _IQsqrt(A) _IQ14sqrt(A)
4300 #endif
4301 #if GLOBAL_IQ == 13
4302 #define _IQsqrt(A) _IQ13sqrt(A)
4303 #endif
4304 #if GLOBAL_IQ == 12
4305 #define _IQsqrt(A) _IQ12sqrt(A)
4306 #endif
4307 #if GLOBAL_IQ == 11
4308 #define _IQsqrt(A) _IQ11sqrt(A)
4309 #endif
4310 #if GLOBAL_IQ == 10
4311 #define _IQsqrt(A) _IQ10sqrt(A)
4312 #endif
4313 #if GLOBAL_IQ == 9
4314 #define _IQsqrt(A) _IQ9sqrt(A)
4315 #endif
4316 #if GLOBAL_IQ == 8
4317 #define _IQsqrt(A) _IQ8sqrt(A)
4318 #endif
4319 #if GLOBAL_IQ == 7
4320 #define _IQsqrt(A) _IQ7sqrt(A)
4321 #endif
4322 #if GLOBAL_IQ == 6
4323 #define _IQsqrt(A) _IQ6sqrt(A)
4324 #endif
4325 #if GLOBAL_IQ == 5
4326 #define _IQsqrt(A) _IQ5sqrt(A)
4327 #endif
4328 #if GLOBAL_IQ == 4
4329 #define _IQsqrt(A) _IQ4sqrt(A)
4330 #endif
4331 #if GLOBAL_IQ == 3
4332 #define _IQsqrt(A) _IQ3sqrt(A)
4333 #endif
4334 #if GLOBAL_IQ == 2
4335 #define _IQsqrt(A) _IQ2sqrt(A)
4336 #endif
4337 #if GLOBAL_IQ == 1
4338 #define _IQsqrt(A) _IQ1sqrt(A)
4339 #endif
4340 
4341 //*****************************************************************************
4342 //
4343 // Computes 1 over the square root of an IQ number.
4344 //
4345 //*****************************************************************************
4346 #ifndef DOXYGEN_SHOULD_SKIP_THIS
4347 extern _iq30 _IQ30isqrt(_iq30 A);
4348 extern _iq29 _IQ29isqrt(_iq29 A);
4349 extern _iq28 _IQ28isqrt(_iq28 A);
4350 extern _iq27 _IQ27isqrt(_iq27 A);
4351 extern _iq26 _IQ26isqrt(_iq26 A);
4352 extern _iq25 _IQ25isqrt(_iq25 A);
4353 extern _iq24 _IQ24isqrt(_iq24 A);
4354 extern _iq23 _IQ23isqrt(_iq23 A);
4355 extern _iq22 _IQ22isqrt(_iq22 A);
4356 extern _iq21 _IQ21isqrt(_iq21 A);
4357 extern _iq20 _IQ20isqrt(_iq20 A);
4358 extern _iq19 _IQ19isqrt(_iq19 A);
4359 extern _iq18 _IQ18isqrt(_iq18 A);
4360 extern _iq17 _IQ17isqrt(_iq17 A);
4361 extern _iq16 _IQ16isqrt(_iq16 A);
4362 extern _iq15 _IQ15isqrt(_iq15 A);
4363 extern _iq14 _IQ14isqrt(_iq14 A);
4364 extern _iq13 _IQ13isqrt(_iq13 A);
4365 extern _iq12 _IQ12isqrt(_iq12 A);
4366 extern _iq11 _IQ11isqrt(_iq11 A);
4367 extern _iq10 _IQ10isqrt(_iq10 A);
4368 extern _iq9 _IQ9isqrt(_iq9 A);
4369 extern _iq8 _IQ8isqrt(_iq8 A);
4370 extern _iq7 _IQ7isqrt(_iq7 A);
4371 extern _iq6 _IQ6isqrt(_iq6 A);
4372 extern _iq5 _IQ5isqrt(_iq5 A);
4373 extern _iq4 _IQ4isqrt(_iq4 A);
4374 extern _iq3 _IQ3isqrt(_iq3 A);
4375 extern _iq2 _IQ2isqrt(_iq2 A);
4376 extern _iq1 _IQ1isqrt(_iq1 A);
4377 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
4378 
4386 #if GLOBAL_IQ == 30
4387 #define _IQisqrt(A) _IQ30isqrt(A)
4388 #endif
4389 #if GLOBAL_IQ == 29
4390 #define _IQisqrt(A) _IQ29isqrt(A)
4391 #endif
4392 #if GLOBAL_IQ == 28
4393 #define _IQisqrt(A) _IQ28isqrt(A)
4394 #endif
4395 #if GLOBAL_IQ == 27
4396 #define _IQisqrt(A) _IQ27isqrt(A)
4397 #endif
4398 #if GLOBAL_IQ == 26
4399 #define _IQisqrt(A) _IQ26isqrt(A)
4400 #endif
4401 #if GLOBAL_IQ == 25
4402 #define _IQisqrt(A) _IQ25isqrt(A)
4403 #endif
4404 #if GLOBAL_IQ == 24
4405 #define _IQisqrt(A) _IQ24isqrt(A)
4406 #endif
4407 #if GLOBAL_IQ == 23
4408 #define _IQisqrt(A) _IQ23isqrt(A)
4409 #endif
4410 #if GLOBAL_IQ == 22
4411 #define _IQisqrt(A) _IQ22isqrt(A)
4412 #endif
4413 #if GLOBAL_IQ == 21
4414 #define _IQisqrt(A) _IQ21isqrt(A)
4415 #endif
4416 #if GLOBAL_IQ == 20
4417 #define _IQisqrt(A) _IQ20isqrt(A)
4418 #endif
4419 #if GLOBAL_IQ == 19
4420 #define _IQisqrt(A) _IQ19isqrt(A)
4421 #endif
4422 #if GLOBAL_IQ == 18
4423 #define _IQisqrt(A) _IQ18isqrt(A)
4424 #endif
4425 #if GLOBAL_IQ == 17
4426 #define _IQisqrt(A) _IQ17isqrt(A)
4427 #endif
4428 #if GLOBAL_IQ == 16
4429 #define _IQisqrt(A) _IQ16isqrt(A)
4430 #endif
4431 #if GLOBAL_IQ == 15
4432 #define _IQisqrt(A) _IQ15isqrt(A)
4433 #endif
4434 #if GLOBAL_IQ == 14
4435 #define _IQisqrt(A) _IQ14isqrt(A)
4436 #endif
4437 #if GLOBAL_IQ == 13
4438 #define _IQisqrt(A) _IQ13isqrt(A)
4439 #endif
4440 #if GLOBAL_IQ == 12
4441 #define _IQisqrt(A) _IQ12isqrt(A)
4442 #endif
4443 #if GLOBAL_IQ == 11
4444 #define _IQisqrt(A) _IQ11isqrt(A)
4445 #endif
4446 #if GLOBAL_IQ == 10
4447 #define _IQisqrt(A) _IQ10isqrt(A)
4448 #endif
4449 #if GLOBAL_IQ == 9
4450 #define _IQisqrt(A) _IQ9isqrt(A)
4451 #endif
4452 #if GLOBAL_IQ == 8
4453 #define _IQisqrt(A) _IQ8isqrt(A)
4454 #endif
4455 #if GLOBAL_IQ == 7
4456 #define _IQisqrt(A) _IQ7isqrt(A)
4457 #endif
4458 #if GLOBAL_IQ == 6
4459 #define _IQisqrt(A) _IQ6isqrt(A)
4460 #endif
4461 #if GLOBAL_IQ == 5
4462 #define _IQisqrt(A) _IQ5isqrt(A)
4463 #endif
4464 #if GLOBAL_IQ == 4
4465 #define _IQisqrt(A) _IQ4isqrt(A)
4466 #endif
4467 #if GLOBAL_IQ == 3
4468 #define _IQisqrt(A) _IQ3isqrt(A)
4469 #endif
4470 #if GLOBAL_IQ == 2
4471 #define _IQisqrt(A) _IQ2isqrt(A)
4472 #endif
4473 #if GLOBAL_IQ == 1
4474 #define _IQisqrt(A) _IQ1isqrt(A)
4475 #endif
4476 
4477 //*****************************************************************************
4478 //
4479 // Computes e^x of an IQ number.
4480 //
4481 //*****************************************************************************
4482 #ifndef DOXYGEN_SHOULD_SKIP_THIS
4483 extern _iq30 _IQ30exp(_iq30 A);
4484 extern _iq29 _IQ29exp(_iq29 A);
4485 extern _iq28 _IQ28exp(_iq28 A);
4486 extern _iq27 _IQ27exp(_iq27 A);
4487 extern _iq26 _IQ26exp(_iq26 A);
4488 extern _iq25 _IQ25exp(_iq25 A);
4489 extern _iq24 _IQ24exp(_iq24 A);
4490 extern _iq23 _IQ23exp(_iq23 A);
4491 extern _iq22 _IQ22exp(_iq22 A);
4492 extern _iq21 _IQ21exp(_iq21 A);
4493 extern _iq20 _IQ20exp(_iq20 A);
4494 extern _iq19 _IQ19exp(_iq19 A);
4495 extern _iq18 _IQ18exp(_iq18 A);
4496 extern _iq17 _IQ17exp(_iq17 A);
4497 extern _iq16 _IQ16exp(_iq16 A);
4498 extern _iq15 _IQ15exp(_iq15 A);
4499 extern _iq14 _IQ14exp(_iq14 A);
4500 extern _iq13 _IQ13exp(_iq13 A);
4501 extern _iq12 _IQ12exp(_iq12 A);
4502 extern _iq11 _IQ11exp(_iq11 A);
4503 extern _iq10 _IQ10exp(_iq10 A);
4504 extern _iq9 _IQ9exp(_iq9 A);
4505 extern _iq8 _IQ8exp(_iq8 A);
4506 extern _iq7 _IQ7exp(_iq7 A);
4507 extern _iq6 _IQ6exp(_iq6 A);
4508 extern _iq5 _IQ5exp(_iq5 A);
4509 extern _iq4 _IQ4exp(_iq4 A);
4510 extern _iq3 _IQ3exp(_iq3 A);
4511 extern _iq2 _IQ2exp(_iq2 A);
4512 extern _iq1 _IQ1exp(_iq1 A);
4513 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
4514 
4522 #if GLOBAL_IQ == 30
4523 #define _IQexp(A) _IQ30exp(A)
4524 #endif
4525 #if GLOBAL_IQ == 29
4526 #define _IQexp(A) _IQ29exp(A)
4527 #endif
4528 #if GLOBAL_IQ == 28
4529 #define _IQexp(A) _IQ28exp(A)
4530 #endif
4531 #if GLOBAL_IQ == 27
4532 #define _IQexp(A) _IQ27exp(A)
4533 #endif
4534 #if GLOBAL_IQ == 26
4535 #define _IQexp(A) _IQ26exp(A)
4536 #endif
4537 #if GLOBAL_IQ == 25
4538 #define _IQexp(A) _IQ25exp(A)
4539 #endif
4540 #if GLOBAL_IQ == 24
4541 #define _IQexp(A) _IQ24exp(A)
4542 #endif
4543 #if GLOBAL_IQ == 23
4544 #define _IQexp(A) _IQ23exp(A)
4545 #endif
4546 #if GLOBAL_IQ == 22
4547 #define _IQexp(A) _IQ22exp(A)
4548 #endif
4549 #if GLOBAL_IQ == 21
4550 #define _IQexp(A) _IQ21exp(A)
4551 #endif
4552 #if GLOBAL_IQ == 20
4553 #define _IQexp(A) _IQ20exp(A)
4554 #endif
4555 #if GLOBAL_IQ == 19
4556 #define _IQexp(A) _IQ19exp(A)
4557 #endif
4558 #if GLOBAL_IQ == 18
4559 #define _IQexp(A) _IQ18exp(A)
4560 #endif
4561 #if GLOBAL_IQ == 17
4562 #define _IQexp(A) _IQ17exp(A)
4563 #endif
4564 #if GLOBAL_IQ == 16
4565 #define _IQexp(A) _IQ16exp(A)
4566 #endif
4567 #if GLOBAL_IQ == 15
4568 #define _IQexp(A) _IQ15exp(A)
4569 #endif
4570 #if GLOBAL_IQ == 14
4571 #define _IQexp(A) _IQ14exp(A)
4572 #endif
4573 #if GLOBAL_IQ == 13
4574 #define _IQexp(A) _IQ13exp(A)
4575 #endif
4576 #if GLOBAL_IQ == 12
4577 #define _IQexp(A) _IQ12exp(A)
4578 #endif
4579 #if GLOBAL_IQ == 11
4580 #define _IQexp(A) _IQ11exp(A)
4581 #endif
4582 #if GLOBAL_IQ == 10
4583 #define _IQexp(A) _IQ10exp(A)
4584 #endif
4585 #if GLOBAL_IQ == 9
4586 #define _IQexp(A) _IQ9exp(A)
4587 #endif
4588 #if GLOBAL_IQ == 8
4589 #define _IQexp(A) _IQ8exp(A)
4590 #endif
4591 #if GLOBAL_IQ == 7
4592 #define _IQexp(A) _IQ7exp(A)
4593 #endif
4594 #if GLOBAL_IQ == 6
4595 #define _IQexp(A) _IQ6exp(A)
4596 #endif
4597 #if GLOBAL_IQ == 5
4598 #define _IQexp(A) _IQ5exp(A)
4599 #endif
4600 #if GLOBAL_IQ == 4
4601 #define _IQexp(A) _IQ4exp(A)
4602 #endif
4603 #if GLOBAL_IQ == 3
4604 #define _IQexp(A) _IQ3exp(A)
4605 #endif
4606 #if GLOBAL_IQ == 2
4607 #define _IQexp(A) _IQ2exp(A)
4608 #endif
4609 #if GLOBAL_IQ == 1
4610 #define _IQexp(A) _IQ1exp(A)
4611 #endif
4612 
4613 //*****************************************************************************
4614 //
4615 // Computes log(x) of an IQ number.
4616 //
4617 //*****************************************************************************
4618 #ifndef DOXYGEN_SHOULD_SKIP_THIS
4619 extern _iq30 _IQ30log(_iq30 A);
4620 extern _iq29 _IQ29log(_iq29 A);
4621 extern _iq28 _IQ28log(_iq28 A);
4622 extern _iq27 _IQ27log(_iq27 A);
4623 extern _iq26 _IQ26log(_iq26 A);
4624 extern _iq25 _IQ25log(_iq25 A);
4625 extern _iq24 _IQ24log(_iq24 A);
4626 extern _iq23 _IQ23log(_iq23 A);
4627 extern _iq22 _IQ22log(_iq22 A);
4628 extern _iq21 _IQ21log(_iq21 A);
4629 extern _iq20 _IQ20log(_iq20 A);
4630 extern _iq19 _IQ19log(_iq19 A);
4631 extern _iq18 _IQ18log(_iq18 A);
4632 extern _iq17 _IQ17log(_iq17 A);
4633 extern _iq16 _IQ16log(_iq16 A);
4634 extern _iq15 _IQ15log(_iq15 A);
4635 extern _iq14 _IQ14log(_iq14 A);
4636 extern _iq13 _IQ13log(_iq13 A);
4637 extern _iq12 _IQ12log(_iq12 A);
4638 extern _iq11 _IQ11log(_iq11 A);
4639 extern _iq10 _IQ10log(_iq10 A);
4640 extern _iq9 _IQ9log(_iq9 A);
4641 extern _iq8 _IQ8log(_iq8 A);
4642 extern _iq7 _IQ7log(_iq7 A);
4643 extern _iq6 _IQ6log(_iq6 A);
4644 extern _iq5 _IQ5log(_iq5 A);
4645 extern _iq4 _IQ4log(_iq4 A);
4646 extern _iq3 _IQ3log(_iq3 A);
4647 extern _iq2 _IQ2log(_iq2 A);
4648 extern _iq1 _IQ1log(_iq1 A);
4649 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
4650 
4658 #if GLOBAL_IQ == 30
4659 #define _IQlog(A) _IQ30log(A)
4660 #endif
4661 #if GLOBAL_IQ == 29
4662 #define _IQlog(A) _IQ29log(A)
4663 #endif
4664 #if GLOBAL_IQ == 28
4665 #define _IQlog(A) _IQ28log(A)
4666 #endif
4667 #if GLOBAL_IQ == 27
4668 #define _IQlog(A) _IQ27log(A)
4669 #endif
4670 #if GLOBAL_IQ == 26
4671 #define _IQlog(A) _IQ26log(A)
4672 #endif
4673 #if GLOBAL_IQ == 25
4674 #define _IQlog(A) _IQ25log(A)
4675 #endif
4676 #if GLOBAL_IQ == 24
4677 #define _IQlog(A) _IQ24log(A)
4678 #endif
4679 #if GLOBAL_IQ == 23
4680 #define _IQlog(A) _IQ23log(A)
4681 #endif
4682 #if GLOBAL_IQ == 22
4683 #define _IQlog(A) _IQ22log(A)
4684 #endif
4685 #if GLOBAL_IQ == 21
4686 #define _IQlog(A) _IQ21log(A)
4687 #endif
4688 #if GLOBAL_IQ == 20
4689 #define _IQlog(A) _IQ20log(A)
4690 #endif
4691 #if GLOBAL_IQ == 19
4692 #define _IQlog(A) _IQ19log(A)
4693 #endif
4694 #if GLOBAL_IQ == 18
4695 #define _IQlog(A) _IQ18log(A)
4696 #endif
4697 #if GLOBAL_IQ == 17
4698 #define _IQlog(A) _IQ17log(A)
4699 #endif
4700 #if GLOBAL_IQ == 16
4701 #define _IQlog(A) _IQ16log(A)
4702 #endif
4703 #if GLOBAL_IQ == 15
4704 #define _IQlog(A) _IQ15log(A)
4705 #endif
4706 #if GLOBAL_IQ == 14
4707 #define _IQlog(A) _IQ14log(A)
4708 #endif
4709 #if GLOBAL_IQ == 13
4710 #define _IQlog(A) _IQ13log(A)
4711 #endif
4712 #if GLOBAL_IQ == 12
4713 #define _IQlog(A) _IQ12log(A)
4714 #endif
4715 #if GLOBAL_IQ == 11
4716 #define _IQlog(A) _IQ11log(A)
4717 #endif
4718 #if GLOBAL_IQ == 10
4719 #define _IQlog(A) _IQ10log(A)
4720 #endif
4721 #if GLOBAL_IQ == 9
4722 #define _IQlog(A) _IQ9log(A)
4723 #endif
4724 #if GLOBAL_IQ == 8
4725 #define _IQlog(A) _IQ8log(A)
4726 #endif
4727 #if GLOBAL_IQ == 7
4728 #define _IQlog(A) _IQ7log(A)
4729 #endif
4730 #if GLOBAL_IQ == 6
4731 #define _IQlog(A) _IQ6log(A)
4732 #endif
4733 #if GLOBAL_IQ == 5
4734 #define _IQlog(A) _IQ5log(A)
4735 #endif
4736 #if GLOBAL_IQ == 4
4737 #define _IQlog(A) _IQ4log(A)
4738 #endif
4739 #if GLOBAL_IQ == 3
4740 #define _IQlog(A) _IQ3log(A)
4741 #endif
4742 #if GLOBAL_IQ == 2
4743 #define _IQlog(A) _IQ2log(A)
4744 #endif
4745 #if GLOBAL_IQ == 1
4746 #define _IQlog(A) _IQ1log(A)
4747 #endif
4748 
4749 //*****************************************************************************
4750 //
4751 // Returns the integer portion of an IQ number.
4752 //
4753 //*****************************************************************************
4761 #define _IQ30int(A) ((A) >> 30)
4762 
4769 #define _IQ29int(A) ((A) >> 29)
4770 
4777 #define _IQ28int(A) ((A) >> 28)
4778 
4785 #define _IQ27int(A) ((A) >> 27)
4786 
4793 #define _IQ26int(A) ((A) >> 26)
4794 
4801 #define _IQ25int(A) ((A) >> 25)
4802 
4809 #define _IQ24int(A) ((A) >> 24)
4810 
4817 #define _IQ23int(A) ((A) >> 23)
4818 
4825 #define _IQ22int(A) ((A) >> 22)
4826 
4833 #define _IQ21int(A) ((A) >> 21)
4834 
4841 #define _IQ20int(A) ((A) >> 20)
4842 
4849 #define _IQ19int(A) ((A) >> 19)
4850 
4857 #define _IQ18int(A) ((A) >> 18)
4858 
4865 #define _IQ17int(A) ((A) >> 17)
4866 
4873 #define _IQ16int(A) ((A) >> 16)
4874 
4881 #define _IQ15int(A) ((A) >> 15)
4882 
4889 #define _IQ14int(A) ((A) >> 14)
4890 
4897 #define _IQ13int(A) ((A) >> 13)
4898 
4905 #define _IQ12int(A) ((A) >> 12)
4906 
4913 #define _IQ11int(A) ((A) >> 11)
4914 
4921 #define _IQ10int(A) ((A) >> 10)
4922 
4929 #define _IQ9int(A) ((A) >> 9)
4930 
4937 #define _IQ8int(A) ((A) >> 8)
4938 
4945 #define _IQ7int(A) ((A) >> 7)
4946 
4953 #define _IQ6int(A) ((A) >> 6)
4954 
4961 #define _IQ5int(A) ((A) >> 5)
4962 
4969 #define _IQ4int(A) ((A) >> 4)
4970 
4977 #define _IQ3int(A) ((A) >> 3)
4978 
4985 #define _IQ2int(A) ((A) >> 2)
4986 
4993 #define _IQ1int(A) ((A) >> 1)
4994 
5001 #define _IQint(A) ((A) >> GLOBAL_IQ)
5002 
5003 //*****************************************************************************
5004 //
5005 // Computes the fractional portion of an IQ number.
5006 //
5007 //*****************************************************************************
5008 #ifndef DOXYGEN_SHOULD_SKIP_THIS
5009 extern _iq30 _IQ30frac(_iq30 A);
5010 extern _iq29 _IQ29frac(_iq29 A);
5011 extern _iq28 _IQ28frac(_iq28 A);
5012 extern _iq27 _IQ27frac(_iq27 A);
5013 extern _iq26 _IQ26frac(_iq26 A);
5014 extern _iq25 _IQ25frac(_iq25 A);
5015 extern _iq24 _IQ24frac(_iq24 A);
5016 extern _iq23 _IQ23frac(_iq23 A);
5017 extern _iq22 _IQ22frac(_iq22 A);
5018 extern _iq21 _IQ21frac(_iq21 A);
5019 extern _iq20 _IQ20frac(_iq20 A);
5020 extern _iq19 _IQ19frac(_iq19 A);
5021 extern _iq18 _IQ18frac(_iq18 A);
5022 extern _iq17 _IQ17frac(_iq17 A);
5023 extern _iq16 _IQ16frac(_iq16 A);
5024 extern _iq15 _IQ15frac(_iq15 A);
5025 extern _iq14 _IQ14frac(_iq14 A);
5026 extern _iq13 _IQ13frac(_iq13 A);
5027 extern _iq12 _IQ12frac(_iq12 A);
5028 extern _iq11 _IQ11frac(_iq11 A);
5029 extern _iq10 _IQ10frac(_iq10 A);
5030 extern _iq9 _IQ9frac(_iq9 A);
5031 extern _iq8 _IQ8frac(_iq8 A);
5032 extern _iq7 _IQ7frac(_iq7 A);
5033 extern _iq6 _IQ6frac(_iq6 A);
5034 extern _iq5 _IQ5frac(_iq5 A);
5035 extern _iq4 _IQ4frac(_iq4 A);
5036 extern _iq3 _IQ3frac(_iq3 A);
5037 extern _iq2 _IQ2frac(_iq2 A);
5038 extern _iq1 _IQ1frac(_iq1 A);
5039 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
5040 
5048 #if GLOBAL_IQ == 30
5049 #define _IQfrac(A) _IQ30frac(A)
5050 #endif
5051 #if GLOBAL_IQ == 29
5052 #define _IQfrac(A) _IQ29frac(A)
5053 #endif
5054 #if GLOBAL_IQ == 28
5055 #define _IQfrac(A) _IQ28frac(A)
5056 #endif
5057 #if GLOBAL_IQ == 27
5058 #define _IQfrac(A) _IQ27frac(A)
5059 #endif
5060 #if GLOBAL_IQ == 26
5061 #define _IQfrac(A) _IQ26frac(A)
5062 #endif
5063 #if GLOBAL_IQ == 25
5064 #define _IQfrac(A) _IQ25frac(A)
5065 #endif
5066 #if GLOBAL_IQ == 24
5067 #define _IQfrac(A) _IQ24frac(A)
5068 #endif
5069 #if GLOBAL_IQ == 23
5070 #define _IQfrac(A) _IQ23frac(A)
5071 #endif
5072 #if GLOBAL_IQ == 22
5073 #define _IQfrac(A) _IQ22frac(A)
5074 #endif
5075 #if GLOBAL_IQ == 21
5076 #define _IQfrac(A) _IQ21frac(A)
5077 #endif
5078 #if GLOBAL_IQ == 20
5079 #define _IQfrac(A) _IQ20frac(A)
5080 #endif
5081 #if GLOBAL_IQ == 19
5082 #define _IQfrac(A) _IQ19frac(A)
5083 #endif
5084 #if GLOBAL_IQ == 18
5085 #define _IQfrac(A) _IQ18frac(A)
5086 #endif
5087 #if GLOBAL_IQ == 17
5088 #define _IQfrac(A) _IQ17frac(A)
5089 #endif
5090 #if GLOBAL_IQ == 16
5091 #define _IQfrac(A) _IQ16frac(A)
5092 #endif
5093 #if GLOBAL_IQ == 15
5094 #define _IQfrac(A) _IQ15frac(A)
5095 #endif
5096 #if GLOBAL_IQ == 14
5097 #define _IQfrac(A) _IQ14frac(A)
5098 #endif
5099 #if GLOBAL_IQ == 13
5100 #define _IQfrac(A) _IQ13frac(A)
5101 #endif
5102 #if GLOBAL_IQ == 12
5103 #define _IQfrac(A) _IQ12frac(A)
5104 #endif
5105 #if GLOBAL_IQ == 11
5106 #define _IQfrac(A) _IQ11frac(A)
5107 #endif
5108 #if GLOBAL_IQ == 10
5109 #define _IQfrac(A) _IQ10frac(A)
5110 #endif
5111 #if GLOBAL_IQ == 9
5112 #define _IQfrac(A) _IQ9frac(A)
5113 #endif
5114 #if GLOBAL_IQ == 8
5115 #define _IQfrac(A) _IQ8frac(A)
5116 #endif
5117 #if GLOBAL_IQ == 7
5118 #define _IQfrac(A) _IQ7frac(A)
5119 #endif
5120 #if GLOBAL_IQ == 6
5121 #define _IQfrac(A) _IQ6frac(A)
5122 #endif
5123 #if GLOBAL_IQ == 5
5124 #define _IQfrac(A) _IQ5frac(A)
5125 #endif
5126 #if GLOBAL_IQ == 4
5127 #define _IQfrac(A) _IQ4frac(A)
5128 #endif
5129 #if GLOBAL_IQ == 3
5130 #define _IQfrac(A) _IQ3frac(A)
5131 #endif
5132 #if GLOBAL_IQ == 2
5133 #define _IQfrac(A) _IQ2frac(A)
5134 #endif
5135 #if GLOBAL_IQ == 1
5136 #define _IQfrac(A) _IQ1frac(A)
5137 #endif
5138 
5139 //*****************************************************************************
5140 //
5141 // Multiplies two IQ numbers in the specified iQ formats, returning the result
5142 // in another IQ format.
5143 //
5144 //*****************************************************************************
5145 #ifndef DOXYGEN_SHOULD_SKIP_THIS
5146 extern int32_t _IQ30mpyIQX(int32_t A, int n1, int32_t B, int n2);
5147 extern int32_t _IQ29mpyIQX(int32_t A, int n1, int32_t B, int n2);
5148 extern int32_t _IQ28mpyIQX(int32_t A, int n1, int32_t B, int n2);
5149 extern int32_t _IQ27mpyIQX(int32_t A, int n1, int32_t B, int n2);
5150 extern int32_t _IQ26mpyIQX(int32_t A, int n1, int32_t B, int n2);
5151 extern int32_t _IQ25mpyIQX(int32_t A, int n1, int32_t B, int n2);
5152 extern int32_t _IQ24mpyIQX(int32_t A, int n1, int32_t B, int n2);
5153 extern int32_t _IQ23mpyIQX(int32_t A, int n1, int32_t B, int n2);
5154 extern int32_t _IQ22mpyIQX(int32_t A, int n1, int32_t B, int n2);
5155 extern int32_t _IQ21mpyIQX(int32_t A, int n1, int32_t B, int n2);
5156 extern int32_t _IQ20mpyIQX(int32_t A, int n1, int32_t B, int n2);
5157 extern int32_t _IQ19mpyIQX(int32_t A, int n1, int32_t B, int n2);
5158 extern int32_t _IQ18mpyIQX(int32_t A, int n1, int32_t B, int n2);
5159 extern int32_t _IQ17mpyIQX(int32_t A, int n1, int32_t B, int n2);
5160 extern int32_t _IQ16mpyIQX(int32_t A, int n1, int32_t B, int n2);
5161 extern int32_t _IQ15mpyIQX(int32_t A, int n1, int32_t B, int n2);
5162 extern int32_t _IQ14mpyIQX(int32_t A, int n1, int32_t B, int n2);
5163 extern int32_t _IQ13mpyIQX(int32_t A, int n1, int32_t B, int n2);
5164 extern int32_t _IQ12mpyIQX(int32_t A, int n1, int32_t B, int n2);
5165 extern int32_t _IQ11mpyIQX(int32_t A, int n1, int32_t B, int n2);
5166 extern int32_t _IQ10mpyIQX(int32_t A, int n1, int32_t B, int n2);
5167 extern int32_t _IQ9mpyIQX(int32_t A, int n1, int32_t B, int n2);
5168 extern int32_t _IQ8mpyIQX(int32_t A, int n1, int32_t B, int n2);
5169 extern int32_t _IQ7mpyIQX(int32_t A, int n1, int32_t B, int n2);
5170 extern int32_t _IQ6mpyIQX(int32_t A, int n1, int32_t B, int n2);
5171 extern int32_t _IQ5mpyIQX(int32_t A, int n1, int32_t B, int n2);
5172 extern int32_t _IQ4mpyIQX(int32_t A, int n1, int32_t B, int n2);
5173 extern int32_t _IQ3mpyIQX(int32_t A, int n1, int32_t B, int n2);
5174 extern int32_t _IQ2mpyIQX(int32_t A, int n1, int32_t B, int n2);
5175 extern int32_t _IQ1mpyIQX(int32_t A, int n1, int32_t B, int n2);
5176 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
5177 
5190 #if GLOBAL_IQ == 30
5191 #define _IQmpyIQX(A, n1, B, n2) _IQ30mpyIQX(A, n1, B, n2)
5192 #endif
5193 #if GLOBAL_IQ == 29
5194 #define _IQmpyIQX(A, n1, B, n2) _IQ29mpyIQX(A, n1, B, n2)
5195 #endif
5196 #if GLOBAL_IQ == 28
5197 #define _IQmpyIQX(A, n1, B, n2) _IQ28mpyIQX(A, n1, B, n2)
5198 #endif
5199 #if GLOBAL_IQ == 27
5200 #define _IQmpyIQX(A, n1, B, n2) _IQ27mpyIQX(A, n1, B, n2)
5201 #endif
5202 #if GLOBAL_IQ == 26
5203 #define _IQmpyIQX(A, n1, B, n2) _IQ26mpyIQX(A, n1, B, n2)
5204 #endif
5205 #if GLOBAL_IQ == 25
5206 #define _IQmpyIQX(A, n1, B, n2) _IQ25mpyIQX(A, n1, B, n2)
5207 #endif
5208 #if GLOBAL_IQ == 24
5209 #define _IQmpyIQX(A, n1, B, n2) _IQ24mpyIQX(A, n1, B, n2)
5210 #endif
5211 #if GLOBAL_IQ == 23
5212 #define _IQmpyIQX(A, n1, B, n2) _IQ23mpyIQX(A, n1, B, n2)
5213 #endif
5214 #if GLOBAL_IQ == 22
5215 #define _IQmpyIQX(A, n1, B, n2) _IQ22mpyIQX(A, n1, B, n2)
5216 #endif
5217 #if GLOBAL_IQ == 21
5218 #define _IQmpyIQX(A, n1, B, n2) _IQ21mpyIQX(A, n1, B, n2)
5219 #endif
5220 #if GLOBAL_IQ == 20
5221 #define _IQmpyIQX(A, n1, B, n2) _IQ20mpyIQX(A, n1, B, n2)
5222 #endif
5223 #if GLOBAL_IQ == 19
5224 #define _IQmpyIQX(A, n1, B, n2) _IQ19mpyIQX(A, n1, B, n2)
5225 #endif
5226 #if GLOBAL_IQ == 18
5227 #define _IQmpyIQX(A, n1, B, n2) _IQ18mpyIQX(A, n1, B, n2)
5228 #endif
5229 #if GLOBAL_IQ == 17
5230 #define _IQmpyIQX(A, n1, B, n2) _IQ17mpyIQX(A, n1, B, n2)
5231 #endif
5232 #if GLOBAL_IQ == 16
5233 #define _IQmpyIQX(A, n1, B, n2) _IQ16mpyIQX(A, n1, B, n2)
5234 #endif
5235 #if GLOBAL_IQ == 15
5236 #define _IQmpyIQX(A, n1, B, n2) _IQ15mpyIQX(A, n1, B, n2)
5237 #endif
5238 #if GLOBAL_IQ == 14
5239 #define _IQmpyIQX(A, n1, B, n2) _IQ14mpyIQX(A, n1, B, n2)
5240 #endif
5241 #if GLOBAL_IQ == 13
5242 #define _IQmpyIQX(A, n1, B, n2) _IQ13mpyIQX(A, n1, B, n2)
5243 #endif
5244 #if GLOBAL_IQ == 12
5245 #define _IQmpyIQX(A, n1, B, n2) _IQ12mpyIQX(A, n1, B, n2)
5246 #endif
5247 #if GLOBAL_IQ == 11
5248 #define _IQmpyIQX(A, n1, B, n2) _IQ11mpyIQX(A, n1, B, n2)
5249 #endif
5250 #if GLOBAL_IQ == 10
5251 #define _IQmpyIQX(A, n1, B, n2) _IQ10mpyIQX(A, n1, B, n2)
5252 #endif
5253 #if GLOBAL_IQ == 9
5254 #define _IQmpyIQX(A, n1, B, n2) _IQ9mpyIQX(A, n1, B, n2)
5255 #endif
5256 #if GLOBAL_IQ == 8
5257 #define _IQmpyIQX(A, n1, B, n2) _IQ8mpyIQX(A, n1, B, n2)
5258 #endif
5259 #if GLOBAL_IQ == 7
5260 #define _IQmpyIQX(A, n1, B, n2) _IQ7mpyIQX(A, n1, B, n2)
5261 #endif
5262 #if GLOBAL_IQ == 6
5263 #define _IQmpyIQX(A, n1, B, n2) _IQ6mpyIQX(A, n1, B, n2)
5264 #endif
5265 #if GLOBAL_IQ == 5
5266 #define _IQmpyIQX(A, n1, B, n2) _IQ5mpyIQX(A, n1, B, n2)
5267 #endif
5268 #if GLOBAL_IQ == 4
5269 #define _IQmpyIQX(A, n1, B, n2) _IQ4mpyIQX(A, n1, B, n2)
5270 #endif
5271 #if GLOBAL_IQ == 3
5272 #define _IQmpyIQX(A, n1, B, n2) _IQ3mpyIQX(A, n1, B, n2)
5273 #endif
5274 #if GLOBAL_IQ == 2
5275 #define _IQmpyIQX(A, n1, B, n2) _IQ2mpyIQX(A, n1, B, n2)
5276 #endif
5277 #if GLOBAL_IQ == 1
5278 #define _IQmpyIQX(A, n1, B, n2) _IQ1mpyIQX(A, n1, B, n2)
5279 #endif
5280 
5281 #ifndef DOXYGEN_SHOULD_SKIP_THIS
5282 //*****************************************************************************
5283 //
5284 // Multiplies an IQ number by an integer.
5285 //
5286 //*****************************************************************************
5287 #define _IQ30mpyI32(A, B) ((A) * (B))
5288 #define _IQ29mpyI32(A, B) ((A) * (B))
5289 #define _IQ28mpyI32(A, B) ((A) * (B))
5290 #define _IQ27mpyI32(A, B) ((A) * (B))
5291 #define _IQ26mpyI32(A, B) ((A) * (B))
5292 #define _IQ25mpyI32(A, B) ((A) * (B))
5293 #define _IQ24mpyI32(A, B) ((A) * (B))
5294 #define _IQ23mpyI32(A, B) ((A) * (B))
5295 #define _IQ22mpyI32(A, B) ((A) * (B))
5296 #define _IQ21mpyI32(A, B) ((A) * (B))
5297 #define _IQ20mpyI32(A, B) ((A) * (B))
5298 #define _IQ19mpyI32(A, B) ((A) * (B))
5299 #define _IQ18mpyI32(A, B) ((A) * (B))
5300 #define _IQ17mpyI32(A, B) ((A) * (B))
5301 #define _IQ16mpyI32(A, B) ((A) * (B))
5302 #define _IQ15mpyI32(A, B) ((A) * (B))
5303 #define _IQ14mpyI32(A, B) ((A) * (B))
5304 #define _IQ13mpyI32(A, B) ((A) * (B))
5305 #define _IQ12mpyI32(A, B) ((A) * (B))
5306 #define _IQ11mpyI32(A, B) ((A) * (B))
5307 #define _IQ10mpyI32(A, B) ((A) * (B))
5308 #define _IQ9mpyI32(A, B) ((A) * (B))
5309 #define _IQ8mpyI32(A, B) ((A) * (B))
5310 #define _IQ7mpyI32(A, B) ((A) * (B))
5311 #define _IQ6mpyI32(A, B) ((A) * (B))
5312 #define _IQ5mpyI32(A, B) ((A) * (B))
5313 #define _IQ4mpyI32(A, B) ((A) * (B))
5314 #define _IQ3mpyI32(A, B) ((A) * (B))
5315 #define _IQ2mpyI32(A, B) ((A) * (B))
5316 #define _IQ1mpyI32(A, B) ((A) * (B))
5317 #define _IQmpyI32(A, B) ((A) * (B))
5318 
5319 //*****************************************************************************
5320 //
5321 // Multiplies an IQ number by an integer, and returns the integer portion.
5322 //
5323 //*****************************************************************************
5324 #define _IQ30mpyI32int(A, B) _IQ30int(_IQ30mpyI32(A, B))
5325 #define _IQ29mpyI32int(A, B) _IQ29int(_IQ29mpyI32(A, B))
5326 #define _IQ28mpyI32int(A, B) _IQ28int(_IQ28mpyI32(A, B))
5327 #define _IQ27mpyI32int(A, B) _IQ27int(_IQ27mpyI32(A, B))
5328 #define _IQ26mpyI32int(A, B) _IQ26int(_IQ26mpyI32(A, B))
5329 #define _IQ25mpyI32int(A, B) _IQ25int(_IQ25mpyI32(A, B))
5330 #define _IQ24mpyI32int(A, B) _IQ24int(_IQ24mpyI32(A, B))
5331 #define _IQ23mpyI32int(A, B) _IQ23int(_IQ23mpyI32(A, B))
5332 #define _IQ22mpyI32int(A, B) _IQ22int(_IQ22mpyI32(A, B))
5333 #define _IQ21mpyI32int(A, B) _IQ21int(_IQ21mpyI32(A, B))
5334 #define _IQ20mpyI32int(A, B) _IQ20int(_IQ20mpyI32(A, B))
5335 #define _IQ19mpyI32int(A, B) _IQ19int(_IQ19mpyI32(A, B))
5336 #define _IQ18mpyI32int(A, B) _IQ18int(_IQ18mpyI32(A, B))
5337 #define _IQ17mpyI32int(A, B) _IQ17int(_IQ17mpyI32(A, B))
5338 #define _IQ16mpyI32int(A, B) _IQ16int(_IQ16mpyI32(A, B))
5339 #define _IQ15mpyI32int(A, B) _IQ15int(_IQ15mpyI32(A, B))
5340 #define _IQ14mpyI32int(A, B) _IQ14int(_IQ14mpyI32(A, B))
5341 #define _IQ13mpyI32int(A, B) _IQ13int(_IQ13mpyI32(A, B))
5342 #define _IQ12mpyI32int(A, B) _IQ12int(_IQ12mpyI32(A, B))
5343 #define _IQ11mpyI32int(A, B) _IQ11int(_IQ11mpyI32(A, B))
5344 #define _IQ10mpyI32int(A, B) _IQ10int(_IQ10mpyI32(A, B))
5345 #define _IQ9mpyI32int(A, B) _IQ9int(_IQ9mpyI32(A, B))
5346 #define _IQ8mpyI32int(A, B) _IQ8int(_IQ8mpyI32(A, B))
5347 #define _IQ7mpyI32int(A, B) _IQ7int(_IQ7mpyI32(A, B))
5348 #define _IQ6mpyI32int(A, B) _IQ6int(_IQ6mpyI32(A, B))
5349 #define _IQ5mpyI32int(A, B) _IQ5int(_IQ5mpyI32(A, B))
5350 #define _IQ4mpyI32int(A, B) _IQ4int(_IQ4mpyI32(A, B))
5351 #define _IQ3mpyI32int(A, B) _IQ3int(_IQ3mpyI32(A, B))
5352 #define _IQ2mpyI32int(A, B) _IQ2int(_IQ2mpyI32(A, B))
5353 #define _IQ1mpyI32int(A, B) _IQ1int(_IQ1mpyI32(A, B))
5354 
5355 #if GLOBAL_IQ == 30
5356 #define _IQmpyI32int(A, B) _IQ30mpyI32int(A, B)
5357 #endif
5358 #if GLOBAL_IQ == 29
5359 #define _IQmpyI32int(A, B) _IQ29mpyI32int(A, B)
5360 #endif
5361 #if GLOBAL_IQ == 28
5362 #define _IQmpyI32int(A, B) _IQ28mpyI32int(A, B)
5363 #endif
5364 #if GLOBAL_IQ == 27
5365 #define _IQmpyI32int(A, B) _IQ27mpyI32int(A, B)
5366 #endif
5367 #if GLOBAL_IQ == 26
5368 #define _IQmpyI32int(A, B) _IQ26mpyI32int(A, B)
5369 #endif
5370 #if GLOBAL_IQ == 25
5371 #define _IQmpyI32int(A, B) _IQ25mpyI32int(A, B)
5372 #endif
5373 #if GLOBAL_IQ == 24
5374 #define _IQmpyI32int(A, B) _IQ24mpyI32int(A, B)
5375 #endif
5376 #if GLOBAL_IQ == 23
5377 #define _IQmpyI32int(A, B) _IQ23mpyI32int(A, B)
5378 #endif
5379 #if GLOBAL_IQ == 22
5380 #define _IQmpyI32int(A, B) _IQ22mpyI32int(A, B)
5381 #endif
5382 #if GLOBAL_IQ == 21
5383 #define _IQmpyI32int(A, B) _IQ21mpyI32int(A, B)
5384 #endif
5385 #if GLOBAL_IQ == 20
5386 #define _IQmpyI32int(A, B) _IQ20mpyI32int(A, B)
5387 #endif
5388 #if GLOBAL_IQ == 19
5389 #define _IQmpyI32int(A, B) _IQ19mpyI32int(A, B)
5390 #endif
5391 #if GLOBAL_IQ == 18
5392 #define _IQmpyI32int(A, B) _IQ18mpyI32int(A, B)
5393 #endif
5394 #if GLOBAL_IQ == 17
5395 #define _IQmpyI32int(A, B) _IQ17mpyI32int(A, B)
5396 #endif
5397 #if GLOBAL_IQ == 16
5398 #define _IQmpyI32int(A, B) _IQ16mpyI32int(A, B)
5399 #endif
5400 #if GLOBAL_IQ == 15
5401 #define _IQmpyI32int(A, B) _IQ15mpyI32int(A, B)
5402 #endif
5403 #if GLOBAL_IQ == 14
5404 #define _IQmpyI32int(A, B) _IQ14mpyI32int(A, B)
5405 #endif
5406 #if GLOBAL_IQ == 13
5407 #define _IQmpyI32int(A, B) _IQ13mpyI32int(A, B)
5408 #endif
5409 #if GLOBAL_IQ == 12
5410 #define _IQmpyI32int(A, B) _IQ12mpyI32int(A, B)
5411 #endif
5412 #if GLOBAL_IQ == 11
5413 #define _IQmpyI32int(A, B) _IQ11mpyI32int(A, B)
5414 #endif
5415 #if GLOBAL_IQ == 10
5416 #define _IQmpyI32int(A, B) _IQ10mpyI32int(A, B)
5417 #endif
5418 #if GLOBAL_IQ == 9
5419 #define _IQmpyI32int(A, B) _IQ9mpyI32int(A, B)
5420 #endif
5421 #if GLOBAL_IQ == 8
5422 #define _IQmpyI32int(A, B) _IQ8mpyI32int(A, B)
5423 #endif
5424 #if GLOBAL_IQ == 7
5425 #define _IQmpyI32int(A, B) _IQ7mpyI32int(A, B)
5426 #endif
5427 #if GLOBAL_IQ == 6
5428 #define _IQmpyI32int(A, B) _IQ6mpyI32int(A, B)
5429 #endif
5430 #if GLOBAL_IQ == 5
5431 #define _IQmpyI32int(A, B) _IQ5mpyI32int(A, B)
5432 #endif
5433 #if GLOBAL_IQ == 4
5434 #define _IQmpyI32int(A, B) _IQ4mpyI32int(A, B)
5435 #endif
5436 #if GLOBAL_IQ == 3
5437 #define _IQmpyI32int(A, B) _IQ3mpyI32int(A, B)
5438 #endif
5439 #if GLOBAL_IQ == 2
5440 #define _IQmpyI32int(A, B) _IQ2mpyI32int(A, B)
5441 #endif
5442 #if GLOBAL_IQ == 1
5443 #define _IQmpyI32int(A, B) _IQ1mpyI32int(A, B)
5444 #endif
5445 
5446 //*****************************************************************************
5447 //
5448 // Multiplies an IQ number by an integer, and returns the fractional portion.
5449 //
5450 //*****************************************************************************
5451 #define _IQ30mpyI32frac(A, B) _IQ30frac(_IQ30mpyI32(A, B))
5452 #define _IQ29mpyI32frac(A, B) _IQ29frac(_IQ29mpyI32(A, B))
5453 #define _IQ28mpyI32frac(A, B) _IQ28frac(_IQ28mpyI32(A, B))
5454 #define _IQ27mpyI32frac(A, B) _IQ27frac(_IQ27mpyI32(A, B))
5455 #define _IQ26mpyI32frac(A, B) _IQ26frac(_IQ26mpyI32(A, B))
5456 #define _IQ25mpyI32frac(A, B) _IQ25frac(_IQ25mpyI32(A, B))
5457 #define _IQ24mpyI32frac(A, B) _IQ24frac(_IQ24mpyI32(A, B))
5458 #define _IQ23mpyI32frac(A, B) _IQ23frac(_IQ23mpyI32(A, B))
5459 #define _IQ22mpyI32frac(A, B) _IQ22frac(_IQ22mpyI32(A, B))
5460 #define _IQ21mpyI32frac(A, B) _IQ21frac(_IQ21mpyI32(A, B))
5461 #define _IQ20mpyI32frac(A, B) _IQ20frac(_IQ20mpyI32(A, B))
5462 #define _IQ19mpyI32frac(A, B) _IQ19frac(_IQ19mpyI32(A, B))
5463 #define _IQ18mpyI32frac(A, B) _IQ18frac(_IQ18mpyI32(A, B))
5464 #define _IQ17mpyI32frac(A, B) _IQ17frac(_IQ17mpyI32(A, B))
5465 #define _IQ16mpyI32frac(A, B) _IQ16frac(_IQ16mpyI32(A, B))
5466 #define _IQ15mpyI32frac(A, B) _IQ15frac(_IQ15mpyI32(A, B))
5467 #define _IQ14mpyI32frac(A, B) _IQ14frac(_IQ14mpyI32(A, B))
5468 #define _IQ13mpyI32frac(A, B) _IQ13frac(_IQ13mpyI32(A, B))
5469 #define _IQ12mpyI32frac(A, B) _IQ12frac(_IQ12mpyI32(A, B))
5470 #define _IQ11mpyI32frac(A, B) _IQ11frac(_IQ11mpyI32(A, B))
5471 #define _IQ10mpyI32frac(A, B) _IQ10frac(_IQ10mpyI32(A, B))
5472 #define _IQ9mpyI32frac(A, B) _IQ9frac(_IQ9mpyI32(A, B))
5473 #define _IQ8mpyI32frac(A, B) _IQ8frac(_IQ8mpyI32(A, B))
5474 #define _IQ7mpyI32frac(A, B) _IQ7frac(_IQ7mpyI32(A, B))
5475 #define _IQ6mpyI32frac(A, B) _IQ6frac(_IQ6mpyI32(A, B))
5476 #define _IQ5mpyI32frac(A, B) _IQ5frac(_IQ5mpyI32(A, B))
5477 #define _IQ4mpyI32frac(A, B) _IQ4frac(_IQ4mpyI32(A, B))
5478 #define _IQ3mpyI32frac(A, B) _IQ3frac(_IQ3mpyI32(A, B))
5479 #define _IQ2mpyI32frac(A, B) _IQ2frac(_IQ2mpyI32(A, B))
5480 #define _IQ1mpyI32frac(A, B) _IQ1frac(_IQ1mpyI32(A, B))
5481 
5482 #if GLOBAL_IQ == 30
5483 #define _IQmpyI32frac(A, B) _IQ30mpyI32frac(A, B)
5484 #endif
5485 #if GLOBAL_IQ == 29
5486 #define _IQmpyI32frac(A, B) _IQ29mpyI32frac(A, B)
5487 #endif
5488 #if GLOBAL_IQ == 28
5489 #define _IQmpyI32frac(A, B) _IQ28mpyI32frac(A, B)
5490 #endif
5491 #if GLOBAL_IQ == 27
5492 #define _IQmpyI32frac(A, B) _IQ27mpyI32frac(A, B)
5493 #endif
5494 #if GLOBAL_IQ == 26
5495 #define _IQmpyI32frac(A, B) _IQ26mpyI32frac(A, B)
5496 #endif
5497 #if GLOBAL_IQ == 25
5498 #define _IQmpyI32frac(A, B) _IQ25mpyI32frac(A, B)
5499 #endif
5500 #if GLOBAL_IQ == 24
5501 #define _IQmpyI32frac(A, B) _IQ24mpyI32frac(A, B)
5502 #endif
5503 #if GLOBAL_IQ == 23
5504 #define _IQmpyI32frac(A, B) _IQ23mpyI32frac(A, B)
5505 #endif
5506 #if GLOBAL_IQ == 22
5507 #define _IQmpyI32frac(A, B) _IQ22mpyI32frac(A, B)
5508 #endif
5509 #if GLOBAL_IQ == 21
5510 #define _IQmpyI32frac(A, B) _IQ21mpyI32frac(A, B)
5511 #endif
5512 #if GLOBAL_IQ == 20
5513 #define _IQmpyI32frac(A, B) _IQ20mpyI32frac(A, B)
5514 #endif
5515 #if GLOBAL_IQ == 19
5516 #define _IQmpyI32frac(A, B) _IQ19mpyI32frac(A, B)
5517 #endif
5518 #if GLOBAL_IQ == 18
5519 #define _IQmpyI32frac(A, B) _IQ18mpyI32frac(A, B)
5520 #endif
5521 #if GLOBAL_IQ == 17
5522 #define _IQmpyI32frac(A, B) _IQ17mpyI32frac(A, B)
5523 #endif
5524 #if GLOBAL_IQ == 16
5525 #define _IQmpyI32frac(A, B) _IQ16mpyI32frac(A, B)
5526 #endif
5527 #if GLOBAL_IQ == 15
5528 #define _IQmpyI32frac(A, B) _IQ15mpyI32frac(A, B)
5529 #endif
5530 #if GLOBAL_IQ == 14
5531 #define _IQmpyI32frac(A, B) _IQ14mpyI32frac(A, B)
5532 #endif
5533 #if GLOBAL_IQ == 13
5534 #define _IQmpyI32frac(A, B) _IQ13mpyI32frac(A, B)
5535 #endif
5536 #if GLOBAL_IQ == 12
5537 #define _IQmpyI32frac(A, B) _IQ12mpyI32frac(A, B)
5538 #endif
5539 #if GLOBAL_IQ == 11
5540 #define _IQmpyI32frac(A, B) _IQ11mpyI32frac(A, B)
5541 #endif
5542 #if GLOBAL_IQ == 10
5543 #define _IQmpyI32frac(A, B) _IQ10mpyI32frac(A, B)
5544 #endif
5545 #if GLOBAL_IQ == 9
5546 #define _IQmpyI32frac(A, B) _IQ9mpyI32frac(A, B)
5547 #endif
5548 #if GLOBAL_IQ == 8
5549 #define _IQmpyI32frac(A, B) _IQ8mpyI32frac(A, B)
5550 #endif
5551 #if GLOBAL_IQ == 7
5552 #define _IQmpyI32frac(A, B) _IQ7mpyI32frac(A, B)
5553 #endif
5554 #if GLOBAL_IQ == 6
5555 #define _IQmpyI32frac(A, B) _IQ6mpyI32frac(A, B)
5556 #endif
5557 #if GLOBAL_IQ == 5
5558 #define _IQmpyI32frac(A, B) _IQ5mpyI32frac(A, B)
5559 #endif
5560 #if GLOBAL_IQ == 4
5561 #define _IQmpyI32frac(A, B) _IQ4mpyI32frac(A, B)
5562 #endif
5563 #if GLOBAL_IQ == 3
5564 #define _IQmpyI32frac(A, B) _IQ3mpyI32frac(A, B)
5565 #endif
5566 #if GLOBAL_IQ == 2
5567 #define _IQmpyI32frac(A, B) _IQ2mpyI32frac(A, B)
5568 #endif
5569 #if GLOBAL_IQ == 1
5570 #define _IQmpyI32frac(A, B) _IQ1mpyI32frac(A, B)
5571 #endif
5572 
5573 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
5574 
5575 //*****************************************************************************
5576 //
5577 // Computes the square root of A^2 + B^2 using IQ numbers.
5578 //
5579 //*****************************************************************************
5580 extern int32_t _IQmag(int32_t A, int32_t B);
5589 #define _IQ30mag(A, B) _IQmag(A, B)
5590 
5598 #define _IQ29mag(A, B) _IQmag(A, B)
5599 
5607 #define _IQ28mag(A, B) _IQmag(A, B)
5608 
5616 #define _IQ27mag(A, B) _IQmag(A, B)
5617 
5625 #define _IQ26mag(A, B) _IQmag(A, B)
5626 
5634 #define _IQ25mag(A, B) _IQmag(A, B)
5635 
5643 #define _IQ24mag(A, B) _IQmag(A, B)
5644 
5652 #define _IQ23mag(A, B) _IQmag(A, B)
5653 
5661 #define _IQ22mag(A, B) _IQmag(A, B)
5662 
5670 #define _IQ21mag(A, B) _IQmag(A, B)
5671 
5679 #define _IQ20mag(A, B) _IQmag(A, B)
5680 
5688 #define _IQ19mag(A, B) _IQmag(A, B)
5689 
5697 #define _IQ18mag(A, B) _IQmag(A, B)
5698 
5706 #define _IQ17mag(A, B) _IQmag(A, B)
5707 
5715 #define _IQ16mag(A, B) _IQmag(A, B)
5716 
5724 #define _IQ15mag(A, B) _IQmag(A, B)
5725 
5733 #define _IQ14mag(A, B) _IQmag(A, B)
5734 
5742 #define _IQ13mag(A, B) _IQmag(A, B)
5743 
5751 #define _IQ12mag(A, B) _IQmag(A, B)
5752 
5760 #define _IQ11mag(A, B) _IQmag(A, B)
5761 
5769 #define _IQ10mag(A, B) _IQmag(A, B)
5770 
5778 #define _IQ9mag(A, B) _IQmag(A, B)
5779 
5787 #define _IQ8mag(A, B) _IQmag(A, B)
5788 
5796 #define _IQ7mag(A, B) _IQmag(A, B)
5797 
5805 #define _IQ6mag(A, B) _IQmag(A, B)
5806 
5814 #define _IQ5mag(A, B) _IQmag(A, B)
5815 
5823 #define _IQ4mag(A, B) _IQmag(A, B)
5824 
5832 #define _IQ3mag(A, B) _IQmag(A, B)
5833 
5841 #define _IQ2mag(A, B) _IQmag(A, B)
5842 
5850 #define _IQ1mag(A, B) _IQmag(A, B)
5851 
5852 //*****************************************************************************
5853 //
5854 // Computes the inverse square root of A^2 + B^2 using IQ numbers.
5855 //
5856 //*****************************************************************************
5857 #ifndef DOXYGEN_SHOULD_SKIP_THIS
5858 extern _iq29 _IQ30imag(_iq30 A, _iq30 B);
5859 extern _iq29 _IQ29imag(_iq29 A, _iq29 B);
5860 extern _iq28 _IQ28imag(_iq28 A, _iq28 B);
5861 extern _iq27 _IQ27imag(_iq27 A, _iq27 B);
5862 extern _iq26 _IQ26imag(_iq26 A, _iq26 B);
5863 extern _iq25 _IQ25imag(_iq25 A, _iq25 B);
5864 extern _iq24 _IQ24imag(_iq24 A, _iq24 B);
5865 extern _iq23 _IQ23imag(_iq23 A, _iq23 B);
5866 extern _iq22 _IQ22imag(_iq22 A, _iq22 B);
5867 extern _iq21 _IQ21imag(_iq21 A, _iq21 B);
5868 extern _iq20 _IQ20imag(_iq20 A, _iq20 B);
5869 extern _iq19 _IQ19imag(_iq19 A, _iq19 B);
5870 extern _iq18 _IQ18imag(_iq18 A, _iq18 B);
5871 extern _iq17 _IQ17imag(_iq17 A, _iq17 B);
5872 extern _iq16 _IQ16imag(_iq16 A, _iq16 B);
5873 extern _iq15 _IQ15imag(_iq15 A, _iq15 B);
5874 extern _iq14 _IQ14imag(_iq14 A, _iq14 B);
5875 extern _iq13 _IQ13imag(_iq13 A, _iq13 B);
5876 extern _iq12 _IQ12imag(_iq12 A, _iq12 B);
5877 extern _iq11 _IQ11imag(_iq11 A, _iq11 B);
5878 extern _iq10 _IQ10imag(_iq10 A, _iq10 B);
5879 extern _iq9 _IQ9imag(_iq9 A, _iq9 B);
5880 extern _iq8 _IQ8imag(_iq8 A, _iq8 B);
5881 extern _iq7 _IQ7imag(_iq7 A, _iq7 B);
5882 extern _iq6 _IQ6imag(_iq6 A, _iq6 B);
5883 extern _iq5 _IQ5imag(_iq5 A, _iq5 B);
5884 extern _iq4 _IQ4imag(_iq4 A, _iq4 B);
5885 extern _iq3 _IQ3imag(_iq3 A, _iq3 B);
5886 extern _iq2 _IQ2imag(_iq2 A, _iq2 B);
5887 extern _iq1 _IQ1imag(_iq1 A, _iq1 B);
5888 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
5889 
5899 #if GLOBAL_IQ == 30
5900 #define _IQimag(A, B) _IQ30imag(A, B)
5901 #endif
5902 #if GLOBAL_IQ == 29
5903 #define _IQimag(A, B) _IQ29imag(A, B)
5904 #endif
5905 #if GLOBAL_IQ == 28
5906 #define _IQimag(A, B) _IQ28imag(A, B)
5907 #endif
5908 #if GLOBAL_IQ == 27
5909 #define _IQimag(A, B) _IQ27imag(A, B)
5910 #endif
5911 #if GLOBAL_IQ == 26
5912 #define _IQimag(A, B) _IQ26imag(A, B)
5913 #endif
5914 #if GLOBAL_IQ == 25
5915 #define _IQimag(A, B) _IQ25imag(A, B)
5916 #endif
5917 #if GLOBAL_IQ == 24
5918 #define _IQimag(A, B) _IQ24imag(A, B)
5919 #endif
5920 #if GLOBAL_IQ == 23
5921 #define _IQimag(A, B) _IQ23imag(A, B)
5922 #endif
5923 #if GLOBAL_IQ == 22
5924 #define _IQimag(A, B) _IQ22imag(A, B)
5925 #endif
5926 #if GLOBAL_IQ == 21
5927 #define _IQimag(A, B) _IQ21imag(A, B)
5928 #endif
5929 #if GLOBAL_IQ == 20
5930 #define _IQimag(A, B) _IQ20imag(A, B)
5931 #endif
5932 #if GLOBAL_IQ == 19
5933 #define _IQimag(A, B) _IQ19imag(A, B)
5934 #endif
5935 #if GLOBAL_IQ == 18
5936 #define _IQimag(A, B) _IQ18imag(A, B)
5937 #endif
5938 #if GLOBAL_IQ == 17
5939 #define _IQimag(A, B) _IQ17imag(A, B)
5940 #endif
5941 #if GLOBAL_IQ == 16
5942 #define _IQimag(A, B) _IQ16imag(A, B)
5943 #endif
5944 #if GLOBAL_IQ == 15
5945 #define _IQimag(A, B) _IQ15imag(A, B)
5946 #endif
5947 #if GLOBAL_IQ == 14
5948 #define _IQimag(A, B) _IQ14imag(A, B)
5949 #endif
5950 #if GLOBAL_IQ == 13
5951 #define _IQimag(A, B) _IQ13imag(A, B)
5952 #endif
5953 #if GLOBAL_IQ == 12
5954 #define _IQimag(A, B) _IQ12imag(A, B)
5955 #endif
5956 #if GLOBAL_IQ == 11
5957 #define _IQimag(A, B) _IQ11imag(A, B)
5958 #endif
5959 #if GLOBAL_IQ == 10
5960 #define _IQimag(A, B) _IQ10imag(A, B)
5961 #endif
5962 #if GLOBAL_IQ == 9
5963 #define _IQimag(A, B) _IQ9imag(A, B)
5964 #endif
5965 #if GLOBAL_IQ == 8
5966 #define _IQimag(A, B) _IQ8imag(A, B)
5967 #endif
5968 #if GLOBAL_IQ == 7
5969 #define _IQimag(A, B) _IQ7imag(A, B)
5970 #endif
5971 #if GLOBAL_IQ == 6
5972 #define _IQimag(A, B) _IQ6imag(A, B)
5973 #endif
5974 #if GLOBAL_IQ == 5
5975 #define _IQimag(A, B) _IQ5imag(A, B)
5976 #endif
5977 #if GLOBAL_IQ == 4
5978 #define _IQimag(A, B) _IQ4imag(A, B)
5979 #endif
5980 #if GLOBAL_IQ == 3
5981 #define _IQimag(A, B) _IQ3imag(A, B)
5982 #endif
5983 #if GLOBAL_IQ == 2
5984 #define _IQimag(A, B) _IQ2imag(A, B)
5985 #endif
5986 #if GLOBAL_IQ == 1
5987 #define _IQimag(A, B) _IQ1imag(A, B)
5988 #endif
5989 
5990 //*****************************************************************************
5991 //
5992 // Converts a string into an IQ number.
5993 //
5994 //*****************************************************************************
5995 #ifndef DOXYGEN_SHOULD_SKIP_THIS
5996 extern _iq30 _atoIQ30(const char *A);
5997 extern _iq29 _atoIQ29(const char *A);
5998 extern _iq28 _atoIQ28(const char *A);
5999 extern _iq27 _atoIQ27(const char *A);
6000 extern _iq26 _atoIQ26(const char *A);
6001 extern _iq25 _atoIQ25(const char *A);
6002 extern _iq24 _atoIQ24(const char *A);
6003 extern _iq23 _atoIQ23(const char *A);
6004 extern _iq22 _atoIQ22(const char *A);
6005 extern _iq21 _atoIQ21(const char *A);
6006 extern _iq20 _atoIQ20(const char *A);
6007 extern _iq19 _atoIQ19(const char *A);
6008 extern _iq18 _atoIQ18(const char *A);
6009 extern _iq17 _atoIQ17(const char *A);
6010 extern _iq16 _atoIQ16(const char *A);
6011 extern _iq15 _atoIQ15(const char *A);
6012 extern _iq14 _atoIQ14(const char *A);
6013 extern _iq13 _atoIQ13(const char *A);
6014 extern _iq12 _atoIQ12(const char *A);
6015 extern _iq11 _atoIQ11(const char *A);
6016 extern _iq10 _atoIQ10(const char *A);
6017 extern _iq9 _atoIQ9(const char *A);
6018 extern _iq8 _atoIQ8(const char *A);
6019 extern _iq7 _atoIQ7(const char *A);
6020 extern _iq6 _atoIQ6(const char *A);
6021 extern _iq5 _atoIQ5(const char *A);
6022 extern _iq4 _atoIQ4(const char *A);
6023 extern _iq3 _atoIQ3(const char *A);
6024 extern _iq2 _atoIQ2(const char *A);
6025 extern _iq1 _atoIQ1(const char *A);
6026 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
6027 
6035 #if GLOBAL_IQ == 30
6036 #define _atoIQ(A) _atoIQ30(A)
6037 #endif
6038 #if GLOBAL_IQ == 29
6039 #define _atoIQ(A) _atoIQ29(A)
6040 #endif
6041 #if GLOBAL_IQ == 28
6042 #define _atoIQ(A) _atoIQ28(A)
6043 #endif
6044 #if GLOBAL_IQ == 27
6045 #define _atoIQ(A) _atoIQ27(A)
6046 #endif
6047 #if GLOBAL_IQ == 26
6048 #define _atoIQ(A) _atoIQ26(A)
6049 #endif
6050 #if GLOBAL_IQ == 25
6051 #define _atoIQ(A) _atoIQ25(A)
6052 #endif
6053 #if GLOBAL_IQ == 24
6054 #define _atoIQ(A) _atoIQ24(A)
6055 #endif
6056 #if GLOBAL_IQ == 23
6057 #define _atoIQ(A) _atoIQ23(A)
6058 #endif
6059 #if GLOBAL_IQ == 22
6060 #define _atoIQ(A) _atoIQ22(A)
6061 #endif
6062 #if GLOBAL_IQ == 21
6063 #define _atoIQ(A) _atoIQ21(A)
6064 #endif
6065 #if GLOBAL_IQ == 20
6066 #define _atoIQ(A) _atoIQ20(A)
6067 #endif
6068 #if GLOBAL_IQ == 19
6069 #define _atoIQ(A) _atoIQ19(A)
6070 #endif
6071 #if GLOBAL_IQ == 18
6072 #define _atoIQ(A) _atoIQ18(A)
6073 #endif
6074 #if GLOBAL_IQ == 17
6075 #define _atoIQ(A) _atoIQ17(A)
6076 #endif
6077 #if GLOBAL_IQ == 16
6078 #define _atoIQ(A) _atoIQ16(A)
6079 #endif
6080 #if GLOBAL_IQ == 15
6081 #define _atoIQ(A) _atoIQ15(A)
6082 #endif
6083 #if GLOBAL_IQ == 14
6084 #define _atoIQ(A) _atoIQ14(A)
6085 #endif
6086 #if GLOBAL_IQ == 13
6087 #define _atoIQ(A) _atoIQ13(A)
6088 #endif
6089 #if GLOBAL_IQ == 12
6090 #define _atoIQ(A) _atoIQ12(A)
6091 #endif
6092 #if GLOBAL_IQ == 11
6093 #define _atoIQ(A) _atoIQ11(A)
6094 #endif
6095 #if GLOBAL_IQ == 10
6096 #define _atoIQ(A) _atoIQ10(A)
6097 #endif
6098 #if GLOBAL_IQ == 9
6099 #define _atoIQ(A) _atoIQ9(A)
6100 #endif
6101 #if GLOBAL_IQ == 8
6102 #define _atoIQ(A) _atoIQ8(A)
6103 #endif
6104 #if GLOBAL_IQ == 7
6105 #define _atoIQ(A) _atoIQ7(A)
6106 #endif
6107 #if GLOBAL_IQ == 6
6108 #define _atoIQ(A) _atoIQ6(A)
6109 #endif
6110 #if GLOBAL_IQ == 5
6111 #define _atoIQ(A) _atoIQ5(A)
6112 #endif
6113 #if GLOBAL_IQ == 4
6114 #define _atoIQ(A) _atoIQ4(A)
6115 #endif
6116 #if GLOBAL_IQ == 3
6117 #define _atoIQ(A) _atoIQ3(A)
6118 #endif
6119 #if GLOBAL_IQ == 2
6120 #define _atoIQ(A) _atoIQ2(A)
6121 #endif
6122 #if GLOBAL_IQ == 1
6123 #define _atoIQ(A) _atoIQ1(A)
6124 #endif
6125 
6126 //*****************************************************************************
6127 //
6128 // Converts an IQ number into a string.
6129 //
6130 //*****************************************************************************
6131 #ifndef DOXYGEN_SHOULD_SKIP_THIS
6132 extern int16_t _IQ30toa(char *string, const char *format, _iq30 input);
6133 extern int16_t _IQ29toa(char *string, const char *format, _iq29 input);
6134 extern int16_t _IQ28toa(char *string, const char *format, _iq28 input);
6135 extern int16_t _IQ27toa(char *string, const char *format, _iq27 input);
6136 extern int16_t _IQ26toa(char *string, const char *format, _iq26 input);
6137 extern int16_t _IQ25toa(char *string, const char *format, _iq25 input);
6138 extern int16_t _IQ24toa(char *string, const char *format, _iq24 input);
6139 extern int16_t _IQ23toa(char *string, const char *format, _iq23 input);
6140 extern int16_t _IQ22toa(char *string, const char *format, _iq22 input);
6141 extern int16_t _IQ21toa(char *string, const char *format, _iq21 input);
6142 extern int16_t _IQ20toa(char *string, const char *format, _iq20 input);
6143 extern int16_t _IQ19toa(char *string, const char *format, _iq19 input);
6144 extern int16_t _IQ18toa(char *string, const char *format, _iq18 input);
6145 extern int16_t _IQ17toa(char *string, const char *format, _iq17 input);
6146 extern int16_t _IQ16toa(char *string, const char *format, _iq16 input);
6147 extern int16_t _IQ15toa(char *string, const char *format, _iq15 input);
6148 extern int16_t _IQ14toa(char *string, const char *format, _iq14 input);
6149 extern int16_t _IQ13toa(char *string, const char *format, _iq13 input);
6150 extern int16_t _IQ12toa(char *string, const char *format, _iq12 input);
6151 extern int16_t _IQ11toa(char *string, const char *format, _iq11 input);
6152 extern int16_t _IQ10toa(char *string, const char *format, _iq10 input);
6153 extern int16_t _IQ9toa(char *string, const char *format, _iq9 input);
6154 extern int16_t _IQ8toa(char *string, const char *format, _iq8 input);
6155 extern int16_t _IQ7toa(char *string, const char *format, _iq7 input);
6156 extern int16_t _IQ6toa(char *string, const char *format, _iq6 input);
6157 extern int16_t _IQ5toa(char *string, const char *format, _iq5 input);
6158 extern int16_t _IQ4toa(char *string, const char *format, _iq4 input);
6159 extern int16_t _IQ3toa(char *string, const char *format, _iq3 input);
6160 extern int16_t _IQ2toa(char *string, const char *format, _iq2 input);
6161 extern int16_t _IQ1toa(char *string, const char *format, _iq1 input);
6162 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
6163 
6174 #if GLOBAL_IQ == 30
6175 #define _IQtoa(A, B, C) _IQ30toa(A, B, C)
6176 #endif
6177 #if GLOBAL_IQ == 29
6178 #define _IQtoa(A, B, C) _IQ29toa(A, B, C)
6179 #endif
6180 #if GLOBAL_IQ == 28
6181 #define _IQtoa(A, B, C) _IQ28toa(A, B, C)
6182 #endif
6183 #if GLOBAL_IQ == 27
6184 #define _IQtoa(A, B, C) _IQ27toa(A, B, C)
6185 #endif
6186 #if GLOBAL_IQ == 26
6187 #define _IQtoa(A, B, C) _IQ26toa(A, B, C)
6188 #endif
6189 #if GLOBAL_IQ == 25
6190 #define _IQtoa(A, B, C) _IQ25toa(A, B, C)
6191 #endif
6192 #if GLOBAL_IQ == 24
6193 #define _IQtoa(A, B, C) _IQ24toa(A, B, C)
6194 #endif
6195 #if GLOBAL_IQ == 23
6196 #define _IQtoa(A, B, C) _IQ23toa(A, B, C)
6197 #endif
6198 #if GLOBAL_IQ == 22
6199 #define _IQtoa(A, B, C) _IQ22toa(A, B, C)
6200 #endif
6201 #if GLOBAL_IQ == 21
6202 #define _IQtoa(A, B, C) _IQ21toa(A, B, C)
6203 #endif
6204 #if GLOBAL_IQ == 20
6205 #define _IQtoa(A, B, C) _IQ20toa(A, B, C)
6206 #endif
6207 #if GLOBAL_IQ == 19
6208 #define _IQtoa(A, B, C) _IQ19toa(A, B, C)
6209 #endif
6210 #if GLOBAL_IQ == 18
6211 #define _IQtoa(A, B, C) _IQ18toa(A, B, C)
6212 #endif
6213 #if GLOBAL_IQ == 17
6214 #define _IQtoa(A, B, C) _IQ17toa(A, B, C)
6215 #endif
6216 #if GLOBAL_IQ == 16
6217 #define _IQtoa(A, B, C) _IQ16toa(A, B, C)
6218 #endif
6219 #if GLOBAL_IQ == 15
6220 #define _IQtoa(A, B, C) _IQ15toa(A, B, C)
6221 #endif
6222 #if GLOBAL_IQ == 14
6223 #define _IQtoa(A, B, C) _IQ14toa(A, B, C)
6224 #endif
6225 #if GLOBAL_IQ == 13
6226 #define _IQtoa(A, B, C) _IQ13toa(A, B, C)
6227 #endif
6228 #if GLOBAL_IQ == 12
6229 #define _IQtoa(A, B, C) _IQ12toa(A, B, C)
6230 #endif
6231 #if GLOBAL_IQ == 11
6232 #define _IQtoa(A, B, C) _IQ11toa(A, B, C)
6233 #endif
6234 #if GLOBAL_IQ == 10
6235 #define _IQtoa(A, B, C) _IQ10toa(A, B, C)
6236 #endif
6237 #if GLOBAL_IQ == 9
6238 #define _IQtoa(A, B, C) _IQ9toa(A, B, C)
6239 #endif
6240 #if GLOBAL_IQ == 8
6241 #define _IQtoa(A, B, C) _IQ8toa(A, B, C)
6242 #endif
6243 #if GLOBAL_IQ == 7
6244 #define _IQtoa(A, B, C) _IQ7toa(A, B, C)
6245 #endif
6246 #if GLOBAL_IQ == 6
6247 #define _IQtoa(A, B, C) _IQ6toa(A, B, C)
6248 #endif
6249 #if GLOBAL_IQ == 5
6250 #define _IQtoa(A, B, C) _IQ5toa(A, B, C)
6251 #endif
6252 #if GLOBAL_IQ == 4
6253 #define _IQtoa(A, B, C) _IQ4toa(A, B, C)
6254 #endif
6255 #if GLOBAL_IQ == 3
6256 #define _IQtoa(A, B, C) _IQ3toa(A, B, C)
6257 #endif
6258 #if GLOBAL_IQ == 2
6259 #define _IQtoa(A, B, C) _IQ2toa(A, B, C)
6260 #endif
6261 #if GLOBAL_IQ == 1
6262 #define _IQtoa(A, B, C) _IQ1toa(A, B, C)
6263 #endif
6264 
6265 //*****************************************************************************
6266 //
6267 // Computes the absolute value of an IQ number.
6268 //
6269 //*****************************************************************************
6277 #define _IQ30abs(A) (((A) < 0) ? - (A) : (A))
6278 
6285 #define _IQ29abs(A) (((A) < 0) ? - (A) : (A))
6286 
6293 #define _IQ28abs(A) (((A) < 0) ? - (A) : (A))
6294 
6301 #define _IQ27abs(A) (((A) < 0) ? - (A) : (A))
6302 
6309 #define _IQ26abs(A) (((A) < 0) ? - (A) : (A))
6310 
6317 #define _IQ25abs(A) (((A) < 0) ? - (A) : (A))
6318 
6325 #define _IQ24abs(A) (((A) < 0) ? - (A) : (A))
6326 
6333 #define _IQ23abs(A) (((A) < 0) ? - (A) : (A))
6334 
6341 #define _IQ22abs(A) (((A) < 0) ? - (A) : (A))
6342 
6349 #define _IQ21abs(A) (((A) < 0) ? - (A) : (A))
6350 
6357 #define _IQ20abs(A) (((A) < 0) ? - (A) : (A))
6358 
6365 #define _IQ19abs(A) (((A) < 0) ? - (A) : (A))
6366 
6373 #define _IQ18abs(A) (((A) < 0) ? - (A) : (A))
6374 
6381 #define _IQ17abs(A) (((A) < 0) ? - (A) : (A))
6382 
6389 #define _IQ16abs(A) (((A) < 0) ? - (A) : (A))
6390 
6397 #define _IQ15abs(A) (((A) < 0) ? - (A) : (A))
6398 
6405 #define _IQ14abs(A) (((A) < 0) ? - (A) : (A))
6406 
6413 #define _IQ13abs(A) (((A) < 0) ? - (A) : (A))
6414 
6421 #define _IQ12abs(A) (((A) < 0) ? - (A) : (A))
6422 
6429 #define _IQ11abs(A) (((A) < 0) ? - (A) : (A))
6430 
6437 #define _IQ10abs(A) (((A) < 0) ? - (A) : (A))
6438 
6445 #define _IQ9abs(A) (((A) < 0) ? - (A) : (A))
6446 
6453 #define _IQ8abs(A) (((A) < 0) ? - (A) : (A))
6454 
6461 #define _IQ7abs(A) (((A) < 0) ? - (A) : (A))
6462 
6469 #define _IQ6abs(A) (((A) < 0) ? - (A) : (A))
6470 
6477 #define _IQ5abs(A) (((A) < 0) ? - (A) : (A))
6478 
6485 #define _IQ4abs(A) (((A) < 0) ? - (A) : (A))
6486 
6493 #define _IQ3abs(A) (((A) < 0) ? - (A) : (A))
6494 
6501 #define _IQ2abs(A) (((A) < 0) ? - (A) : (A))
6502 
6509 #define _IQ1abs(A) (((A) < 0) ? - (A) : (A))
6510 
6517 #define _IQabs(A) (((A) < 0) ? - (A) : (A))
6518 
6519 //*****************************************************************************
6520 //
6521 // Mark the end of the C bindings section for C++ compilers.
6522 //
6523 //*****************************************************************************
6524 #ifdef __cplusplus
6525 }
6526 #endif
6527 
6528 #endif // __IQMATHLIB_H__
int32_t _IQ26cosPU(int32_t a)
Computes the cosine of an IQ26 input.
Definition: _IQNsin_cos.c:1441
int32_t _IQ8mpy(int32_t a, int32_t b)
Multiplies two values of IQ8 format.
Definition: _IQNmpy.c:293
int32_t _IQ22atan2(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ22 input and return the result, in radians.
Definition: _IQNatan2.c:415
int32_t _IQ10asin(int32_t a)
Computes the inverse sine of the IQ10 input.
Definition: _IQNasin_acos.c:410
int32_t _IQ11atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ11 input and return the result.
Definition: _IQNatan2.c:963
int32_t _IQ6frac(int32_t a)
Return the fractional portion of an IQ6 input.
Definition: _IQNfrac.c:305
int32_t _IQ1cosPU(int32_t a)
Computes the cosine of an IQ1 input.
Definition: _IQNsin_cos.c:1716
float _IQ3toF(int32_t a)
Converts input to floating point using IQ3 format.
Definition: _IQNtoF.c:374
int32_t _IQ10imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1667
int16_t _IQ28toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ28 number to a string.
Definition: _IQNtoa.c:228
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.
Definition: _IQNmpyIQX.c:470
int32_t _IQ9div(int32_t a, int32_t b)
Divides two values of IQ9 format.
Definition: _IQNdiv.c:277
int32_t _IQ21imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1535
int32_t _IQ29exp(int32_t a)
Computes the exponential of an IQ29 input.
Definition: _IQNexp.c:158
int16_t _IQ24toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ24 number to a string.
Definition: _IQNtoa.c:284
int32_t _IQ10cos(int32_t a)
Computes the cosine of an IQ10 input.
Definition: _IQNsin_cos.c:931
int32_t _IQ23atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ23 input and return the result.
Definition: _IQNatan2.c:807
int32_t _IQ3cosPU(int32_t a)
Computes the cosine of an IQ3 input.
Definition: _IQNsin_cos.c:1694
int32_t _IQ7mpy(int32_t a, int32_t b)
Multiplies two values of IQ7 format.
Definition: _IQNmpy.c:305
int32_t _IQ19rmpy(int32_t a, int32_t b)
Multiply two values of IQ19 type, with rounding.
Definition: _IQNrmpy.c:192
int32_t _atoIQ8(const char *string)
Converts string to IQ8 number.
Definition: _atoIQN.c:402
float _IQ25toF(int32_t a)
Converts input to floating point using IQ25 format.
Definition: _IQNtoF.c:132
int32_t _IQ27rsmpy(int32_t a, int32_t b)
Multiplies two IQ27 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:105
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.
Definition: _IQNmpyIQX.c:335
int32_t _IQ13atan2(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ13 input and return the result, in radians.
Definition: _IQNatan2.c:532
int32_t _IQ20mpy(int32_t a, int32_t b)
Multiplies two values of IQ20 format.
Definition: _IQNmpy.c:149
float _IQ9toF(int32_t a)
Converts input to floating point using IQ9 format.
Definition: _IQNtoF.c:308
int32_t _IQ26rmpy(int32_t a, int32_t b)
Multiply two values of IQ26 type, with rounding.
Definition: _IQNrmpy.c:108
int32_t _IQ4mpy(int32_t a, int32_t b)
Multiplies two values of IQ4 format.
Definition: _IQNmpy.c:341
int32_t _IQ5rsmpy(int32_t a, int32_t b)
Multiplies two IQ5 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:369
int32_t _IQ5sinPU(int32_t a)
Computes the sine of an IQ5 input.
Definition: _IQNsin_cos.c:1329
int32_t _IQ14isqrt(int32_t a)
Calculate inverse square root of an IQ14 input.
Definition: _IQNsqrt.c:1256
int32_t _IQ14cosPU(int32_t a)
Computes the cosine of an IQ14 input.
Definition: _IQNsin_cos.c:1573
int32_t _IQ15sqrt(int32_t a)
Calculate square root of an IQ15 input.
Definition: _IQNsqrt.c:547
int32_t _IQ9sqrt(int32_t a)
Calculate square root of an IQ9 input.
Definition: _IQNsqrt.c:613
int32_t _IQ23cosPU(int32_t a)
Computes the cosine of an IQ23 input.
Definition: _IQNsin_cos.c:1474
int32_t _IQ7sinPU(int32_t a)
Computes the sine of an IQ7 input.
Definition: _IQNsin_cos.c:1307
int32_t _IQ9exp(int32_t a)
Computes the exponential of an IQ9 input.
Definition: _IQNexp.c:378
int32_t _IQ30log(int32_t a)
Computes the base-e logarithm of an IQ30 input.
Definition: _IQNlog.c:130
int32_t _IQ9frac(int32_t a)
Return the fractional portion of an IQ9 input.
Definition: _IQNfrac.c:272
int32_t _IQ28atan2(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ28 input and return the result, in radians.
Definition: _IQNatan2.c:337
int32_t _IQ4div(int32_t a, int32_t b)
Divides two values of IQ4 format.
Definition: _IQNdiv.c:337
int32_t _IQ18cosPU(int32_t a)
Computes the cosine of an IQ18 input.
Definition: _IQNsin_cos.c:1529
int32_t _IQ16imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1595
int32_t _IQ11atan2(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ11 input and return the result, in radians.
Definition: _IQNatan2.c:558
int32_t _IQ28cosPU(int32_t a)
Computes the cosine of an IQ28 input.
Definition: _IQNsin_cos.c:1419
int32_t _IQ11exp(int32_t a)
Computes the exponential of an IQ11 input.
Definition: _IQNexp.c:356
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.
Definition: _IQNmpyIQX.c:515
int32_t _IQ1rmpy(int32_t a, int32_t b)
Multiply two values of IQ1 type, with rounding.
Definition: _IQNrmpy.c:408
int32_t _IQ5frac(int32_t a)
Return the fractional portion of an IQ5 input.
Definition: _IQNfrac.c:316
int32_t _atoIQ24(const char *string)
Converts string to IQ24 number.
Definition: _atoIQN.c:226
int32_t _IQ8rmpy(int32_t a, int32_t b)
Multiply two values of IQ8 type, with rounding.
Definition: _IQNrmpy.c:324
int32_t _IQ28div(int32_t a, int32_t b)
Divides two values of IQ28 format.
Definition: _IQNdiv.c:49
int16_t _IQ17toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ17 number to a string.
Definition: _IQNtoa.c:382
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.
Definition: _IQNmpyIQX.c:245
int32_t _IQ26div(int32_t a, int32_t b)
Divides two values of IQ26 format.
Definition: _IQNdiv.c:73
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.
Definition: _IQNmpyIQX.c:455
int32_t _IQ28log(int32_t a)
Computes the base-e logarithm of an IQ28 input.
Definition: _IQNlog.c:152
int32_t _IQ5rmpy(int32_t a, int32_t b)
Multiply two values of IQ5 type, with rounding.
Definition: _IQNrmpy.c:360
int32_t _IQ21cosPU(int32_t a)
Computes the cosine of an IQ21 input.
Definition: _IQNsin_cos.c:1496
int32_t _IQ10frac(int32_t a)
Return the fractional portion of an IQ10 input.
Definition: _IQNfrac.c:261
int32_t _IQ8cosPU(int32_t a)
Computes the cosine of an IQ8 input.
Definition: _IQNsin_cos.c:1639
int32_t _IQ3atan2(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ3 input and return the result, in radians.
Definition: _IQNatan2.c:662
int32_t _IQ2rsmpy(int32_t a, int32_t b)
Multiplies two IQ2 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:405
int32_t _IQ21mpy(int32_t a, int32_t b)
Multiplies two values of IQ21 format.
Definition: _IQNmpy.c:137
int32_t _IQ23atan2(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ23 input and return the result, in radians.
Definition: _IQNatan2.c:402
int16_t _IQ4toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ4 number to a string.
Definition: _IQNtoa.c:564
int32_t _IQ26cos(int32_t a)
Computes the cosine of an IQ26 input.
Definition: _IQNsin_cos.c:755
int32_t _IQ30atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ30 input and return the result.
Definition: _IQNatan2.c:716
int32_t _IQ14atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ14 input and return the result.
Definition: _IQNatan2.c:924
int32_t _IQ6asin(int32_t a)
Computes the inverse sine of the IQ6 input.
Definition: _IQNasin_acos.c:454
int16_t _IQ9toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ9 number to a string.
Definition: _IQNtoa.c:494
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.
Definition: _IQNmpyIQX.c:125
int32_t _IQ17imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1583
int32_t _IQ13atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ13 input and return the result.
Definition: _IQNatan2.c:937
int32_t _IQ3frac(int32_t a)
Return the fractional portion of an IQ3 input.
Definition: _IQNfrac.c:338
int32_t _IQ23exp(int32_t a)
Computes the exponential of an IQ23 input.
Definition: _IQNexp.c:224
int32_t _IQ7isqrt(int32_t a)
Calculate inverse square root of an IQ7 input.
Definition: _IQNsqrt.c:1333
int32_t _IQ4imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1739
int32_t _IQ10rsmpy(int32_t a, int32_t b)
Multiplies two IQ10 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:309
int32_t _IQ12exp(int32_t a)
Computes the exponential of an IQ12 input.
Definition: _IQNexp.c:345
int32_t _IQ25mpy(int32_t a, int32_t b)
Multiplies two values of IQ25 format.
Definition: _IQNmpy.c:89
int32_t _IQ14exp(int32_t a)
Computes the exponential of an IQ14 input.
Definition: _IQNexp.c:323
int32_t _IQ5imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1727
int32_t _IQ10rmpy(int32_t a, int32_t b)
Multiply two values of IQ10 type, with rounding.
Definition: _IQNrmpy.c:300
float _IQ21toF(int32_t a)
Converts input to floating point using IQ21 format.
Definition: _IQNtoF.c:176
int32_t _IQ7sqrt(int32_t a)
Calculate square root of an IQ7 input.
Definition: _IQNsqrt.c:635
int32_t _IQ27cos(int32_t a)
Computes the cosine of an IQ27 input.
Definition: _IQNsin_cos.c:744
int32_t _IQ8sqrt(int32_t a)
Calculate square root of an IQ8 input.
Definition: _IQNsqrt.c:624
int32_t _IQ26frac(int32_t a)
Return the fractional portion of an IQ26 input.
Definition: _IQNfrac.c:85
int32_t _atoIQ15(const char *string)
Converts string to IQ15 number.
Definition: _atoIQN.c:325
int32_t _IQ1asin(int32_t a)
Computes the inverse sine of the IQ1 input.
Definition: _IQNasin_acos.c:509
int32_t _IQ17atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ17 input and return the result.
Definition: _IQNatan2.c:885
int32_t _IQ19sqrt(int32_t a)
Calculate square root of an IQ19 input.
Definition: _IQNsqrt.c:503
int32_t _IQ28imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1451
int32_t _IQ5cos(int32_t a)
Computes the cosine of an IQ5 input.
Definition: _IQNsin_cos.c:986
int32_t _IQ19mpy(int32_t a, int32_t b)
Multiplies two values of IQ19 format.
Definition: _IQNmpy.c:161
int32_t _atoIQ5(const char *string)
Converts string to IQ5 number.
Definition: _atoIQN.c:435
int32_t _IQ26asin(int32_t a)
Computes the inverse sine of the IQ26 input.
Definition: _IQNasin_acos.c:234
int32_t _IQ28sin(int32_t a)
Computes the sine of an IQ28 input.
Definition: _IQNsin_cos.c:412
int32_t _IQ3imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1751
int32_t _IQ7cos(int32_t a)
Computes the cosine of an IQ7 input.
Definition: _IQNsin_cos.c:964
int32_t _IQ16rmpy(int32_t a, int32_t b)
Multiply two values of IQ16 type, with rounding.
Definition: _IQNrmpy.c:228
int32_t _IQ16cosPU(int32_t a)
Computes the cosine of an IQ16 input.
Definition: _IQNsin_cos.c:1551
float _IQ13toF(int32_t a)
Converts input to floating point using IQ13 format.
Definition: _IQNtoF.c:264
int32_t _IQ8isqrt(int32_t a)
Calculate inverse square root of an IQ8 input.
Definition: _IQNsqrt.c:1322
int32_t _IQ27cosPU(int32_t a)
Computes the cosine of an IQ27 input.
Definition: _IQNsin_cos.c:1430
int32_t _atoIQ25(const char *string)
Converts string to IQ25 number.
Definition: _atoIQN.c:215
int32_t _IQ26atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ26 input and return the result.
Definition: _IQNatan2.c:768
int32_t _atoIQ4(const char *string)
Converts string to IQ4 number.
Definition: _atoIQN.c:446
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.
Definition: _IQNmpyIQX.c:215
int32_t _IQ11imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1655
int32_t _IQ13sqrt(int32_t a)
Calculate square root of an IQ13 input.
Definition: _IQNsqrt.c:569
int32_t _IQ14rmpy(int32_t a, int32_t b)
Multiply two values of IQ14 type, with rounding.
Definition: _IQNrmpy.c:252
int32_t _IQ18sin(int32_t a)
Computes the sine of an IQ18 input.
Definition: _IQNsin_cos.c:522
int32_t _IQ25rmpy(int32_t a, int32_t b)
Multiply two values of IQ25 type, with rounding.
Definition: _IQNrmpy.c:120
int32_t _IQ12sinPU(int32_t a)
Computes the sine of an IQ12 input.
Definition: _IQNsin_cos.c:1252
int32_t _IQ23cos(int32_t a)
Computes the cosine of an IQ23 input.
Definition: _IQNsin_cos.c:788
int32_t _IQ19imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1559
int32_t _IQ22atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ22 input and return the result.
Definition: _IQNatan2.c:820
int32_t _IQ21sinPU(int32_t a)
Computes the sine of an IQ21 input.
Definition: _IQNsin_cos.c:1153
int32_t _IQ12sqrt(int32_t a)
Calculate square root of an IQ12 input.
Definition: _IQNsqrt.c:580
int32_t _IQ16atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ16 input and return the result.
Definition: _IQNatan2.c:898
int32_t _IQ8atan2(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ8 input and return the result, in radians.
Definition: _IQNatan2.c:597
int32_t _IQ15log(int32_t a)
Computes the base-e logarithm of an IQ15 input.
Definition: _IQNlog.c:295
int32_t _IQ6sqrt(int32_t a)
Calculate square root of an IQ6 input.
Definition: _IQNsqrt.c:646
int32_t _IQ22sinPU(int32_t a)
Computes the sine of an IQ22 input.
Definition: _IQNsin_cos.c:1142
int32_t _IQ26atan2(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ26 input and return the result, in radians.
Definition: _IQNatan2.c:363
int32_t _IQ17sinPU(int32_t a)
Computes the sine of an IQ17 input.
Definition: _IQNsin_cos.c:1197
int32_t _IQ1cos(int32_t a)
Computes the cosine of an IQ1 input.
Definition: _IQNsin_cos.c:1030
int32_t _IQ11cos(int32_t a)
Computes the cosine of an IQ11 input.
Definition: _IQNsin_cos.c:920
int32_t _IQ6rmpy(int32_t a, int32_t b)
Multiply two values of IQ6 type, with rounding.
Definition: _IQNrmpy.c:348
int32_t _IQ12mpy(int32_t a, int32_t b)
Multiplies two values of IQ12 format.
Definition: _IQNmpy.c:245
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.
Definition: _IQNmpyIQX.c:425
int32_t _atoIQ14(const char *string)
Converts string to IQ14 number.
Definition: _atoIQN.c:336
int32_t _IQ11rsmpy(int32_t a, int32_t b)
Multiplies two IQ11 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:297
int32_t _IQ15isqrt(int32_t a)
Calculate inverse square root of an IQ15 input.
Definition: _IQNsqrt.c:1245
int32_t _IQ17sin(int32_t a)
Computes the sine of an IQ17 input.
Definition: _IQNsin_cos.c:533
int32_t _IQ5isqrt(int32_t a)
Calculate inverse square root of an IQ5 input.
Definition: _IQNsqrt.c:1355
int32_t _IQ14asin(int32_t a)
Computes the inverse sine of the IQ14 input.
Definition: _IQNasin_acos.c:366
int32_t _IQ24rmpy(int32_t a, int32_t b)
Multiply two values of IQ24 type, with rounding.
Definition: _IQNrmpy.c:132
int32_t _IQ29atan2(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ29 input and return the result, in radians.
Definition: _IQNatan2.c:324
float _IQ19toF(int32_t a)
Converts input to floating point using IQ19 format.
Definition: _IQNtoF.c:198
int32_t _IQ27asin(int32_t a)
Computes the inverse sine of the IQ27 input.
Definition: _IQNasin_acos.c:223
int32_t _IQ4rsmpy(int32_t a, int32_t b)
Multiplies two IQ4 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:381
float _IQ26toF(int32_t a)
Converts input to floating point using IQ26 format.
Definition: _IQNtoF.c:121
int32_t _IQ20cosPU(int32_t a)
Computes the cosine of an IQ20 input.
Definition: _IQNsin_cos.c:1507
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.
Definition: _IQNmpyIQX.c:290
int32_t _IQ27sinPU(int32_t a)
Computes the sine of an IQ27 input.
Definition: _IQNsin_cos.c:1087
int32_t _IQ4frac(int32_t a)
Return the fractional portion of an IQ4 input.
Definition: _IQNfrac.c:327
int32_t _IQ30sqrt(int32_t a)
Calculate square root of an IQ30 input.
Definition: _IQNsqrt.c:382
int32_t _IQ6cosPU(int32_t a)
Computes the cosine of an IQ6 input.
Definition: _IQNsin_cos.c:1661
int32_t _IQ16log(int32_t a)
Computes the base-e logarithm of an IQ16 input.
Definition: _IQNlog.c:284
int32_t _IQ13frac(int32_t a)
Return the fractional portion of an IQ13 input.
Definition: _IQNfrac.c:228
int32_t _IQ1div(int32_t a, int32_t b)
Divides two values of IQ1 format.
Definition: _IQNdiv.c:373
int16_t _IQ16toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ16 number to a string.
Definition: _IQNtoa.c:396
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.
Definition: _IQNmpyIQX.c:365
int32_t _IQ15div(int32_t a, int32_t b)
Divides two values of IQ15 format.
Definition: _IQNdiv.c:205
int32_t _IQ8frac(int32_t a)
Return the fractional portion of an IQ8 input.
Definition: _IQNfrac.c:283
float _IQ6toF(int32_t a)
Converts input to floating point using IQ6 format.
Definition: _IQNtoF.c:341
int32_t _IQ6sin(int32_t a)
Computes the sine of an IQ6 input.
Definition: _IQNsin_cos.c:654
int32_t _IQ9log(int32_t a)
Computes the base-e logarithm of an IQ9 input.
Definition: _IQNlog.c:361
int16_t _IQ1toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ1 number to a string.
Definition: _IQNtoa.c:606
int32_t _IQ20log(int32_t a)
Computes the base-e logarithm of an IQ20 input.
Definition: _IQNlog.c:240
int32_t _IQ25cosPU(int32_t a)
Computes the cosine of an IQ25 input.
Definition: _IQNsin_cos.c:1452
int32_t _IQ28cos(int32_t a)
Computes the cosine of an IQ28 input.
Definition: _IQNsin_cos.c:733
int32_t _IQ7div(int32_t a, int32_t b)
Divides two values of IQ7 format.
Definition: _IQNdiv.c:301
int32_t _IQ21sqrt(int32_t a)
Calculate square root of an IQ21 input.
Definition: _IQNsqrt.c:481
int32_t _IQ8imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1691
int32_t _IQ4atan2(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ4 input and return the result, in radians.
Definition: _IQNatan2.c:649
int32_t _IQ6div(int32_t a, int32_t b)
Divides two values of IQ6 format.
Definition: _IQNdiv.c:313
int32_t _IQ24sinPU(int32_t a)
Computes the sine of an IQ24 input.
Definition: _IQNsin_cos.c:1120
int32_t _IQ10mpy(int32_t a, int32_t b)
Multiplies two values of IQ10 format.
Definition: _IQNmpy.c:269
int32_t _IQ22rmpy(int32_t a, int32_t b)
Multiply two values of IQ22 type, with rounding.
Definition: _IQNrmpy.c:156
int32_t _IQ2sin(int32_t a)
Computes the sine of an IQ2 input.
Definition: _IQNsin_cos.c:698
int32_t _IQ18div(int32_t a, int32_t b)
Divides two values of IQ18 format.
Definition: _IQNdiv.c:169
int32_t _IQ4isqrt(int32_t a)
Calculate inverse square root of an IQ4 input.
Definition: _IQNsqrt.c:1366
float _IQ29toF(int32_t a)
Converts input to floating point using IQ29 format.
Definition: _IQNtoF.c:88
int32_t _IQ24atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ24 input and return the result.
Definition: _IQNatan2.c:794
int32_t _IQ28rmpy(int32_t a, int32_t b)
Multiply two values of IQ28 type, with rounding.
Definition: _IQNrmpy.c:84
int32_t _IQ17rsmpy(int32_t a, int32_t b)
Multiplies two IQ17 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:225
int32_t _IQ5cosPU(int32_t a)
Computes the cosine of an IQ5 input.
Definition: _IQNsin_cos.c:1672
float _IQ5toF(int32_t a)
Converts input to floating point using IQ5 format.
Definition: _IQNtoF.c:352
int32_t _IQ7frac(int32_t a)
Return the fractional portion of an IQ7 input.
Definition: _IQNfrac.c:294
float _IQ20toF(int32_t a)
Converts input to floating point using IQ20 format.
Definition: _IQNtoF.c:187
int32_t _IQ20rsmpy(int32_t a, int32_t b)
Multiplies two IQ20 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:189
int32_t _IQ24log(int32_t a)
Computes the base-e logarithm of an IQ24 input.
Definition: _IQNlog.c:196
int32_t _IQ14div(int32_t a, int32_t b)
Divides two values of IQ14 format.
Definition: _IQNdiv.c:217
int32_t _IQ28frac(int32_t a)
Return the fractional portion of an IQ28 input.
Definition: _IQNfrac.c:63
int32_t _IQ10cosPU(int32_t a)
Computes the cosine of an IQ10 input.
Definition: _IQNsin_cos.c:1617
int32_t _IQ17exp(int32_t a)
Computes the exponential of an IQ17 input.
Definition: _IQNexp.c:290
int32_t _IQ25imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1487
int32_t _IQ14sinPU(int32_t a)
Computes the sine of an IQ14 input.
Definition: _IQNsin_cos.c:1230
float _IQ1toF(int32_t a)
Converts input to floating point using IQ1 format.
Definition: _IQNtoF.c:396
int32_t _IQ9cosPU(int32_t a)
Computes the cosine of an IQ9 input.
Definition: _IQNsin_cos.c:1628
int32_t _IQ2imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1763
int16_t _IQ11toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ11 number to a string.
Definition: _IQNtoa.c:466
int32_t _IQ26mpy(int32_t a, int32_t b)
Multiplies two values of IQ26 format.
Definition: _IQNmpy.c:77
int32_t _IQ18exp(int32_t a)
Computes the exponential of an IQ18 input.
Definition: _IQNexp.c:279
int32_t _IQ3isqrt(int32_t a)
Calculate inverse square root of an IQ3 input.
Definition: _IQNsqrt.c:1377
int32_t _IQ18asin(int32_t a)
Computes the inverse sine of the IQ18 input.
Definition: _IQNasin_acos.c:322
int32_t _IQ22asin(int32_t a)
Computes the inverse sine of the IQ22 input.
Definition: _IQNasin_acos.c:278
int32_t _IQ30cosPU(int32_t a)
Computes the cosine of an IQ30 input.
Definition: _IQNsin_cos.c:1397
float _IQ28toF(int32_t a)
Converts input to floating point using IQ28 format.
Definition: _IQNtoF.c:99
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.
Definition: _IQNmpyIQX.c:380
int32_t _atoIQ27(const char *string)
Converts string to IQ27 number.
Definition: _atoIQN.c:193
int32_t _IQ9atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ9 input and return the result.
Definition: _IQNatan2.c:989
int32_t _atoIQ23(const char *string)
Converts string to IQ23 number.
Definition: _atoIQN.c:237
int32_t _IQ13div(int32_t a, int32_t b)
Divides two values of IQ13 format.
Definition: _IQNdiv.c:229
int32_t _IQ9rmpy(int32_t a, int32_t b)
Multiply two values of IQ9 type, with rounding.
Definition: _IQNrmpy.c:312
int32_t _IQ25sinPU(int32_t a)
Computes the sine of an IQ25 input.
Definition: _IQNsin_cos.c:1109
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.
Definition: _IQNmpyIQX.c:320
int32_t _IQ1frac(int32_t a)
Return the fractional portion of an IQ1 input.
Definition: _IQNfrac.c:360
int32_t _atoIQ22(const char *string)
Converts string to IQ22 number.
Definition: _atoIQN.c:248
int32_t _atoIQ26(const char *string)
Converts string to IQ26 number.
Definition: _atoIQN.c:204
int32_t _IQ1mpy(int32_t a, int32_t b)
Multiplies two values of IQ1 format.
Definition: _IQNmpy.c:377
int32_t _IQ29cosPU(int32_t a)
Computes the cosine of an IQ29 input.
Definition: _IQNsin_cos.c:1408
int32_t _IQ28exp(int32_t a)
Computes the exponential of an IQ28 input.
Definition: _IQNexp.c:169
int32_t _IQ24mpy(int32_t a, int32_t b)
Multiplies two values of IQ24 format.
Definition: _IQNmpy.c:101
int32_t _IQ6log(int32_t a)
Computes the base-e logarithm of an IQ6 input.
Definition: _IQNlog.c:394
int32_t _IQ20imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1547
int32_t _IQ13sinPU(int32_t a)
Computes the sine of an IQ13 input.
Definition: _IQNsin_cos.c:1241
int32_t _IQ17log(int32_t a)
Computes the base-e logarithm of an IQ17 input.
Definition: _IQNlog.c:273
int32_t _IQ12log(int32_t a)
Computes the base-e logarithm of an IQ12 input.
Definition: _IQNlog.c:328
int32_t _IQ12atan2(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ12 input and return the result, in radians.
Definition: _IQNatan2.c:545
int32_t _IQ15atan2(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ15 input and return the result, in radians.
Definition: _IQNatan2.c:506
int32_t _IQ15sin(int32_t a)
Computes the sine of an IQ15 input.
Definition: _IQNsin_cos.c:555
float _IQ27toF(int32_t a)
Converts input to floating point using IQ27 format.
Definition: _IQNtoF.c:110
int32_t _IQ11isqrt(int32_t a)
Calculate inverse square root of an IQ11 input.
Definition: _IQNsqrt.c:1289
int32_t _IQ27sin(int32_t a)
Computes the sine of an IQ27 input.
Definition: _IQNsin_cos.c:423
int32_t _IQ4rmpy(int32_t a, int32_t b)
Multiply two values of IQ4 type, with rounding.
Definition: _IQNrmpy.c:372
int32_t _IQ12cos(int32_t a)
Computes the cosine of an IQ12 input.
Definition: _IQNsin_cos.c:909
int32_t _IQ24exp(int32_t a)
Computes the exponential of an IQ24 input.
Definition: _IQNexp.c:213
float _IQ10toF(int32_t a)
Converts input to floating point using IQ10 format.
Definition: _IQNtoF.c:297
int32_t _IQ27atan2(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ27 input and return the result, in radians.
Definition: _IQNatan2.c:350
int32_t _IQ19cosPU(int32_t a)
Computes the cosine of an IQ19 input.
Definition: _IQNsin_cos.c:1518
int16_t _IQ20toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ20 number to a string.
Definition: _IQNtoa.c:340
int32_t _IQ22exp(int32_t a)
Computes the exponential of an IQ22 input.
Definition: _IQNexp.c:235
int32_t _IQ14cos(int32_t a)
Computes the cosine of an IQ14 input.
Definition: _IQNsin_cos.c:887
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.
Definition: _IQNmpyIQX.c:140
int32_t _IQ30imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1427
int32_t _IQ22frac(int32_t a)
Return the fractional portion of an IQ22 input.
Definition: _IQNfrac.c:129
int32_t _IQ8sin(int32_t a)
Computes the sine of an IQ8 input.
Definition: _IQNsin_cos.c:632
int32_t _IQ20asin(int32_t a)
Computes the inverse sine of the IQ20 input.
Definition: _IQNasin_acos.c:300
int32_t _IQ22isqrt(int32_t a)
Calculate inverse square root of an IQ22 input.
Definition: _IQNsqrt.c:1168
int32_t _IQ1rsmpy(int32_t a, int32_t b)
Multiplies two IQ1 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:417
int32_t _IQ17cos(int32_t a)
Computes the cosine of an IQ17 input.
Definition: _IQNsin_cos.c:854
int32_t _IQ24cos(int32_t a)
Computes the cosine of an IQ24 input.
Definition: _IQNsin_cos.c:777
int32_t _IQ23asin(int32_t a)
Computes the inverse sine of the IQ23 input.
Definition: _IQNasin_acos.c:267
float _IQ18toF(int32_t a)
Converts input to floating point using IQ18 format.
Definition: _IQNtoF.c:209
int32_t _IQ2exp(int32_t a)
Computes the exponential of an IQ2 input.
Definition: _IQNexp.c:455
int32_t _IQ7sin(int32_t a)
Computes the sine of an IQ7 input.
Definition: _IQNsin_cos.c:643
int32_t _IQ4atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ4 input and return the result.
Definition: _IQNatan2.c:1054
int32_t _IQ14imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1619
int32_t _IQ28asin(int32_t a)
Computes the inverse sine of the IQ28 input.
Definition: _IQNasin_acos.c:212
int32_t _IQ13exp(int32_t a)
Computes the exponential of an IQ13 input.
Definition: _IQNexp.c:334
int32_t _IQ17sqrt(int32_t a)
Calculate square root of an IQ17 input.
Definition: _IQNsqrt.c:525
int32_t _IQ25sqrt(int32_t a)
Calculate square root of an IQ25 input.
Definition: _IQNsqrt.c:437
int32_t _IQ3rmpy(int32_t a, int32_t b)
Multiply two values of IQ3 type, with rounding.
Definition: _IQNrmpy.c:384
int32_t _IQ24sin(int32_t a)
Computes the sine of an IQ24 input.
Definition: _IQNsin_cos.c:456
int32_t _IQ2cos(int32_t a)
Computes the cosine of an IQ2 input.
Definition: _IQNsin_cos.c:1019
int32_t _IQ24cosPU(int32_t a)
Computes the cosine of an IQ24 input.
Definition: _IQNsin_cos.c:1463
int32_t _IQ19exp(int32_t a)
Computes the exponential of an IQ19 input.
Definition: _IQNexp.c:268
int32_t _IQ21atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ21 input and return the result.
Definition: _IQNatan2.c:833
int32_t _IQ1sinPU(int32_t a)
Computes the sine of an IQ1 input.
Definition: _IQNsin_cos.c:1373
int32_t _IQ6mpy(int32_t a, int32_t b)
Multiplies two values of IQ6 format.
Definition: _IQNmpy.c:317
int32_t _IQ19div(int32_t a, int32_t b)
Divides two values of IQ19 format.
Definition: _IQNdiv.c:157
int32_t _IQ27atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ27 input and return the result.
Definition: _IQNatan2.c:755
int32_t _IQ6imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1715
int32_t _IQ16rsmpy(int32_t a, int32_t b)
Multiplies two IQ16 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:237
int32_t _IQ10exp(int32_t a)
Computes the exponential of an IQ10 input.
Definition: _IQNexp.c:367
int32_t _IQ7atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ7 input and return the result.
Definition: _IQNatan2.c:1015
int32_t _IQ16isqrt(int32_t a)
Calculate inverse square root of an IQ16 input.
Definition: _IQNsqrt.c:1234
int32_t _IQ3sin(int32_t a)
Computes the sine of an IQ3 input.
Definition: _IQNsin_cos.c:687
int32_t _IQ29sqrt(int32_t a)
Calculate square root of an IQ29 input.
Definition: _IQNsqrt.c:393
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.
Definition: _IQNmpyIQX.c:350
int32_t _IQ24div(int32_t a, int32_t b)
Divides two values of IQ24 format.
Definition: _IQNdiv.c:97
int32_t _IQ14log(int32_t a)
Computes the base-e logarithm of an IQ14 input.
Definition: _IQNlog.c:306
int32_t _IQ7imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1703
int32_t _IQ3div(int32_t a, int32_t b)
Divides two values of IQ3 format.
Definition: _IQNdiv.c:349
int32_t _IQ7cosPU(int32_t a)
Computes the cosine of an IQ7 input.
Definition: _IQNsin_cos.c:1650
int32_t _IQ19sinPU(int32_t a)
Computes the sine of an IQ19 input.
Definition: _IQNsin_cos.c:1175
int32_t _IQ22cos(int32_t a)
Computes the cosine of an IQ22 input.
Definition: _IQNsin_cos.c:799
int32_t _IQ8rsmpy(int32_t a, int32_t b)
Multiplies two IQ8 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:333
int32_t _IQ7atan2(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ7 input and return the result, in radians.
Definition: _IQNatan2.c:610
int32_t _IQ12sin(int32_t a)
Computes the sine of an IQ12 input.
Definition: _IQNsin_cos.c:588
int32_t _IQ28atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ28 input and return the result.
Definition: _IQNatan2.c:742
float _IQ22toF(int32_t a)
Converts input to floating point using IQ22 format.
Definition: _IQNtoF.c:165
int32_t _IQ23mpy(int32_t a, int32_t b)
Multiplies two values of IQ23 format.
Definition: _IQNmpy.c:113
int32_t _IQ16cos(int32_t a)
Computes the cosine of an IQ16 input.
Definition: _IQNsin_cos.c:865
int32_t _atoIQ6(const char *string)
Converts string to IQ6 number.
Definition: _atoIQN.c:424
int32_t _IQ30frac(int32_t a)
Return the fractional portion of an IQ30 input.
Definition: _IQNfrac.c:41
int32_t _IQ2sinPU(int32_t a)
Computes the sine of an IQ2 input.
Definition: _IQNsin_cos.c:1362
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.
Definition: _IQNmpyIQX.c:395
int32_t _IQ23frac(int32_t a)
Return the fractional portion of an IQ23 input.
Definition: _IQNfrac.c:118
int32_t _IQ1sin(int32_t a)
Computes the sine of an IQ1 input.
Definition: _IQNsin_cos.c:709
int32_t _IQ22mpy(int32_t a, int32_t b)
Multiplies two values of IQ22 format.
Definition: _IQNmpy.c:125
int32_t _IQ26rsmpy(int32_t a, int32_t b)
Multiplies two IQ26 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:117
int32_t _IQ22sin(int32_t a)
Computes the sine of an IQ22 input.
Definition: _IQNsin_cos.c:478
int32_t _IQ10atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ10 input and return the result.
Definition: _IQNatan2.c:976
int32_t _IQ12asin(int32_t a)
Computes the inverse sine of the IQ12 input.
Definition: _IQNasin_acos.c:388
int32_t _IQ21atan2(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ21 input and return the result, in radians.
Definition: _IQNatan2.c:428
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.
Definition: _IQNmpyIQX.c:275
int32_t _IQ2rmpy(int32_t a, int32_t b)
Multiply two values of IQ2 type, with rounding.
Definition: _IQNrmpy.c:396
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.
Definition: _IQNmpyIQX.c:305
int32_t _IQ9isqrt(int32_t a)
Calculate inverse square root of an IQ9 input.
Definition: _IQNsqrt.c:1311
int32_t _atoIQ21(const char *string)
Converts string to IQ21 number.
Definition: _atoIQN.c:259
int32_t _IQ18mpy(int32_t a, int32_t b)
Multiplies two values of IQ18 format.
Definition: _IQNmpy.c:173
int32_t _IQ16atan2(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ16 input and return the result, in radians.
Definition: _IQNatan2.c:493
int32_t _IQ15rmpy(int32_t a, int32_t b)
Multiply two values of IQ15 type, with rounding.
Definition: _IQNrmpy.c:240
int32_t _atoIQ1(const char *string)
Converts string to IQ1 number.
Definition: _atoIQN.c:479
int32_t _IQ18imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1571
int32_t _IQ11cosPU(int32_t a)
Computes the cosine of an IQ11 input.
Definition: _IQNsin_cos.c:1606
int32_t _IQ1log(int32_t a)
Computes the base-e logarithm of an IQ1 input.
Definition: _IQNlog.c:449
int32_t _IQ19log(int32_t a)
Computes the base-e logarithm of an IQ19 input.
Definition: _IQNlog.c:251
int32_t _IQ29sin(int32_t a)
Computes the cosine of an IQ29 input.
Definition: _IQNsin_cos.c:401
int32_t _IQ24rsmpy(int32_t a, int32_t b)
Multiplies two IQ24 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:141
int32_t _IQ8exp(int32_t a)
Computes the exponential of an IQ8 input.
Definition: _IQNexp.c:389
int32_t _IQ29cos(int32_t a)
Computes the cosine of an IQ29 input.
Definition: _IQNsin_cos.c:722
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.
Definition: _IQNmpyIQX.c:230
int32_t _IQ19atan2(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ19 input and return the result, in radians.
Definition: _IQNatan2.c:454
int16_t _IQ14toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ14 number to a string.
Definition: _IQNtoa.c:424
int32_t _IQ4sin(int32_t a)
Computes the sine of an IQ4 input.
Definition: _IQNsin_cos.c:676
int32_t _IQ12rmpy(int32_t a, int32_t b)
Multiply two values of IQ12 type, with rounding.
Definition: _IQNrmpy.c:276
int32_t _IQ23isqrt(int32_t a)
Calculate inverse square root of an IQ23 input.
Definition: _IQNsqrt.c:1157
int32_t _IQ27log(int32_t a)
Computes the base-e logarithm of an IQ27 input.
Definition: _IQNlog.c:163
int16_t _IQ21toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ21 number to a string.
Definition: _IQNtoa.c:326
int32_t _atoIQ20(const char *string)
Converts string to IQ20 number.
Definition: _atoIQN.c:270
int32_t _IQ22div(int32_t a, int32_t b)
Divides two values of IQ22 format.
Definition: _IQNdiv.c:121
int32_t _IQ26sinPU(int32_t a)
Computes the sine of an IQ26 input.
Definition: _IQNsin_cos.c:1098
int32_t _IQ14atan2(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ14 input and return the result, in radians.
Definition: _IQNatan2.c:519
int32_t _IQ12imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1643
int32_t _IQ6sinPU(int32_t a)
Computes the sine of an IQ6 input.
Definition: _IQNsin_cos.c:1318
int32_t _IQ26exp(int32_t a)
Computes the exponential of an IQ26 input.
Definition: _IQNexp.c:191
int32_t _IQ24atan2(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ24 input and return the result, in radians.
Definition: _IQNatan2.c:389
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.
Definition: _IQNmpyIQX.c:410
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.
Definition: _IQNmpyIQX.c:110
int32_t _IQ1atan2(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ1 input and return the result, in radians.
Definition: _IQNatan2.c:688
int32_t _IQ25atan2(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ25 input and return the result, in radians.
Definition: _IQNatan2.c:376
int32_t _IQ28sqrt(int32_t a)
Calculate square root of an IQ28 input.
Definition: _IQNsqrt.c:404
int32_t _IQ3rsmpy(int32_t a, int32_t b)
Multiplies two IQ3 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:393
int32_t _IQ26isqrt(int32_t a)
Calculate inverse square root of an IQ26 input.
Definition: _IQNsqrt.c:1124
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.
Definition: _IQNmpyIQX.c:260
int32_t _IQ2log(int32_t a)
Computes the base-e logarithm of an IQ2 input.
Definition: _IQNlog.c:438
int32_t _IQ2asin(int32_t a)
Computes the inverse sine of the IQ2 input.
Definition: _IQNasin_acos.c:498
int32_t _IQ11asin(int32_t a)
Computes the inverse sine of the IQ11 input.
Definition: _IQNasin_acos.c:399
int32_t _IQ7log(int32_t a)
Computes the base-e logarithm of an IQ7 input.
Definition: _IQNlog.c:383
int16_t _IQ25toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ25 number to a string.
Definition: _IQNtoa.c:270
int32_t _IQ30rsmpy(int32_t a, int32_t b)
Multiplies two IQ30 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:69
int32_t _IQ29mpy(int32_t a, int32_t b)
Multiplies two values of IQ29 format.
Definition: _IQNmpy.c:41
int32_t _IQ20exp(int32_t a)
Computes the exponential of an IQ20 input.
Definition: _IQNexp.c:257
int32_t _IQ14frac(int32_t a)
Return the fractional portion of an IQ14 input.
Definition: _IQNfrac.c:217
int32_t _IQ11sinPU(int32_t a)
Computes the sine of an IQ11 input.
Definition: _IQNsin_cos.c:1263
int32_t _IQ26log(int32_t a)
Computes the base-e logarithm of an IQ26 input.
Definition: _IQNlog.c:174
int32_t _IQ9mpy(int32_t a, int32_t b)
Multiplies two values of IQ9 format.
Definition: _IQNmpy.c:281
int32_t _IQ20frac(int32_t a)
Return the fractional portion of an IQ20 input.
Definition: _IQNfrac.c:151
int32_t _IQ21exp(int32_t a)
Computes the exponential of an IQ21 input.
Definition: _IQNexp.c:246
int32_t _IQ20rmpy(int32_t a, int32_t b)
Multiply two values of IQ20 type, with rounding.
Definition: _IQNrmpy.c:180
int32_t _IQ18rmpy(int32_t a, int32_t b)
Multiply two values of IQ18 type, with rounding.
Definition: _IQNrmpy.c:204
int16_t _IQ3toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ3 number to a string.
Definition: _IQNtoa.c:578
int32_t _IQ11frac(int32_t a)
Return the fractional portion of an IQ11 input.
Definition: _IQNfrac.c:250
int32_t _IQ25sin(int32_t a)
Computes the sine of an IQ25 input.
Definition: _IQNsin_cos.c:445
int32_t _IQ13cosPU(int32_t a)
Computes the cosine of an IQ13 input.
Definition: _IQNsin_cos.c:1584
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.
Definition: _IQNmpyIQX.c:200
float _IQ30toF(int32_t a)
Converts input to floating point using IQ30 format.
Definition: _IQNtoF.c:77
int32_t _IQ1imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1775
int32_t _IQ4sinPU(int32_t a)
Computes the sine of an IQ4 input.
Definition: _IQNsin_cos.c:1340
int32_t _IQ16sinPU(int32_t a)
Computes the sine of an IQ16 input.
Definition: _IQNsin_cos.c:1208
int32_t _IQ21rsmpy(int32_t a, int32_t b)
Multiplies two IQ21 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:177
int32_t _IQ21cos(int32_t a)
Computes the cosine of an IQ21 input.
Definition: _IQNsin_cos.c:810
int32_t _IQ17frac(int32_t a)
Return the fractional portion of an IQ17 input.
Definition: _IQNfrac.c:184
int32_t _IQ1isqrt(int32_t a)
Calculate inverse square root of an IQ1 input.
Definition: _IQNsqrt.c:1399
int32_t _IQ5sqrt(int32_t a)
Calculate square root of an IQ5 input.
Definition: _IQNsqrt.c:657
int32_t _IQ2mpy(int32_t a, int32_t b)
Multiplies two values of IQ2 format.
Definition: _IQNmpy.c:365
int32_t _IQ3exp(int32_t a)
Computes the exponential of an IQ3 input.
Definition: _IQNexp.c:444
int32_t _IQ29log(int32_t a)
Computes the base-e logarithm of an IQ29 input.
Definition: _IQNlog.c:141
int32_t _IQ9sinPU(int32_t a)
Computes the sine of an IQ9 input.
Definition: _IQNsin_cos.c:1285
int32_t _IQ22cosPU(int32_t a)
Computes the cosine of an IQ22 input.
Definition: _IQNsin_cos.c:1485
int32_t _IQ14mpy(int32_t a, int32_t b)
Multiplies two values of IQ14 format.
Definition: _IQNmpy.c:221
int32_t _IQ2frac(int32_t a)
Return the fractional portion of an IQ2 input.
Definition: _IQNfrac.c:349
int32_t _IQ12cosPU(int32_t a)
Computes the cosine of an IQ12 input.
Definition: _IQNsin_cos.c:1595
int32_t _IQ13rmpy(int32_t a, int32_t b)
Multiply two values of IQ13 type, with rounding.
Definition: _IQNrmpy.c:264
int32_t _IQ25isqrt(int32_t a)
Calculate inverse square root of an IQ25 input.
Definition: _IQNsqrt.c:1135
int32_t _IQ23imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1511
int32_t _IQ11mpy(int32_t a, int32_t b)
Multiplies two values of IQ11 format.
Definition: _IQNmpy.c:257
int16_t _IQ8toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ8 number to a string.
Definition: _IQNtoa.c:508
int32_t _IQ25cos(int32_t a)
Computes the cosine of an IQ25 input.
Definition: _IQNsin_cos.c:766
int32_t _IQ13asin(int32_t a)
Computes the inverse sine of the IQ13 input.
Definition: _IQNasin_acos.c:377
int32_t _IQ23sqrt(int32_t a)
Calculate square root of an IQ23 input.
Definition: _IQNsqrt.c:459
int32_t _IQ23sin(int32_t a)
Computes the sine of an IQ23 input.
Definition: _IQNsin_cos.c:467
int32_t _IQ2div(int32_t a, int32_t b)
Divides two values of IQ2 format.
Definition: _IQNdiv.c:361
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.
Definition: _IQNmpyIQX.c:440
int32_t _IQ7exp(int32_t a)
Computes the exponential of an IQ7 input.
Definition: _IQNexp.c:400
int32_t _IQ16div(int32_t a, int32_t b)
Divides two values of IQ16 format.
Definition: _IQNdiv.c:193
int32_t _IQ19cos(int32_t a)
Computes the cosine of an IQ19 input.
Definition: _IQNsin_cos.c:832
int32_t _IQ11log(int32_t a)
Computes the base-e logarithm of an IQ11 input.
Definition: _IQNlog.c:339
int32_t _IQ13isqrt(int32_t a)
Calculate inverse square root of an IQ13 input.
Definition: _IQNsqrt.c:1267
int32_t _IQ20sqrt(int32_t a)
Calculate square root of an IQ20 input.
Definition: _IQNsqrt.c:492
int32_t _IQ10sin(int32_t a)
Computes the sine of an IQ10 input.
Definition: _IQNsin_cos.c:610
int32_t _IQ3cos(int32_t a)
Computes the cosine of an IQ3 input.
Definition: _IQNsin_cos.c:1008
int32_t _IQ17asin(int32_t a)
Computes the inverse sine of the IQ17 input.
Definition: _IQNasin_acos.c:333
int32_t _IQ6atan2(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ6 input and return the result, in radians.
Definition: _IQNatan2.c:623
int32_t _IQ10log(int32_t a)
Computes the base-e logarithm of an IQ10 input.
Definition: _IQNlog.c:350
int32_t _IQ18cos(int32_t a)
Computes the cosine of an IQ18 input.
Definition: _IQNsin_cos.c:843
int32_t _IQ6rsmpy(int32_t a, int32_t b)
Multiplies two IQ6 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:357
int32_t _IQ25frac(int32_t a)
Return the fractional portion of an IQ25 input.
Definition: _IQNfrac.c:96
float _IQ7toF(int32_t a)
Converts input to floating point using IQ7 format.
Definition: _IQNtoF.c:330
int32_t _IQ12isqrt(int32_t a)
Calculate inverse square root of an IQ12 input.
Definition: _IQNsqrt.c:1278
int32_t _IQ4exp(int32_t a)
Computes the exponential of an IQ4 input.
Definition: _IQNexp.c:433
int16_t _IQ22toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ22 number to a string.
Definition: _IQNtoa.c:312
int32_t _IQ17rmpy(int32_t a, int32_t b)
Multiply two values of IQ17 type, with rounding.
Definition: _IQNrmpy.c:216
int32_t _IQ14sqrt(int32_t a)
Calculate square root of an IQ14 input.
Definition: _IQNsqrt.c:558
int32_t _IQ25atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ25 input and return the result.
Definition: _IQNatan2.c:781
int32_t _IQ11rmpy(int32_t a, int32_t b)
Multiply two values of IQ11 type, with rounding.
Definition: _IQNrmpy.c:288
int32_t _IQ18isqrt(int32_t a)
Calculate inverse square root of an IQ18 input.
Definition: _IQNsqrt.c:1212
int32_t _IQ8log(int32_t a)
Computes the base-e logarithm of an IQ8 input.
Definition: _IQNlog.c:372
int32_t _IQ22imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1523
int32_t _IQ3log(int32_t a)
Computes the base-e logarithm of an IQ3 input.
Definition: _IQNlog.c:427
int32_t _IQ17cosPU(int32_t a)
Computes the cosine of an IQ17 input.
Definition: _IQNsin_cos.c:1540
int32_t _IQ3sinPU(int32_t a)
Computes the sine of an IQ3 input.
Definition: _IQNsin_cos.c:1351
int32_t _IQ22log(int32_t a)
Computes the base-e logarithm of an IQ22 input.
Definition: _IQNlog.c:218
int32_t _IQ9cos(int32_t a)
Computes the cosine of an IQ9 input.
Definition: _IQNsin_cos.c:942
int32_t _IQ27rmpy(int32_t a, int32_t b)
Multiply two values of IQ27 type, with rounding.
Definition: _IQNrmpy.c:96
int32_t _IQ17isqrt(int32_t a)
Calculate inverse square root of an IQ17 input.
Definition: _IQNsqrt.c:1223
int32_t _IQ15cos(int32_t a)
Computes the cosine of an IQ15 input.
Definition: _IQNsin_cos.c:876
int32_t _IQ16exp(int32_t a)
Computes the exponential of an IQ16 input.
Definition: _IQNexp.c:301
int32_t _IQ29imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1439
int32_t _atoIQ16(const char *string)
Converts string to IQ16 number.
Definition: _atoIQN.c:314
int32_t _IQ16mpy(int32_t a, int32_t b)
Multiplies two values of IQ16 format.
Definition: _IQNmpy.c:197
int32_t _IQ26sin(int32_t a)
Computes the sine of an IQ26 input.
Definition: _IQNsin_cos.c:434
int32_t _IQ16sqrt(int32_t a)
Calculate square root of an IQ16 input.
Definition: _IQNsqrt.c:536
int32_t _IQ24sqrt(int32_t a)
Calculate square root of an IQ24 input.
Definition: _IQNsqrt.c:448
int32_t _IQ30exp(int32_t a)
Computes the exponential of an IQ30 input.
Definition: _IQNexp.c:147
int32_t _IQ29frac(int32_t a)
Return the fractional portion of an IQ29 input.
Definition: _IQNfrac.c:52
int32_t _IQ15sinPU(int32_t a)
Computes the sine of an IQ15 input.
Definition: _IQNsin_cos.c:1219
int32_t _IQ21frac(int32_t a)
Return the fractional portion of an IQ21 input.
Definition: _IQNfrac.c:140
int16_t _IQ15toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ15 number to a string.
Definition: _IQNtoa.c:410
int32_t _IQ21sin(int32_t a)
Computes the sine of an IQ21 input.
Definition: _IQNsin_cos.c:489
int16_t _IQ6toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ6 number to a string.
Definition: _IQNtoa.c:536
int16_t _IQ23toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ23 number to a string.
Definition: _IQNtoa.c:298
int32_t _atoIQ19(const char *string)
Converts string to IQ19 number.
Definition: _atoIQN.c:281
int32_t _IQ9rsmpy(int32_t a, int32_t b)
Multiplies two IQ9 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:321
int32_t _IQ2atan2(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ2 input and return the result, in radians.
Definition: _IQNatan2.c:675
int32_t _IQ5sin(int32_t a)
Computes the sine of an IQ5 input.
Definition: _IQNsin_cos.c:665
int32_t _atoIQ11(const char *string)
Converts string to IQ11 number.
Definition: _atoIQN.c:369
int32_t _IQ12atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ12 input and return the result.
Definition: _IQNatan2.c:950
int32_t _IQ5log(int32_t a)
Computes the base-e logarithm of an IQ5 input.
Definition: _IQNlog.c:405
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.
Definition: _IQNmpyIQX.c:485
int32_t _IQ5atan2(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ5 input and return the result, in radians.
Definition: _IQNatan2.c:636
int32_t _IQ21asin(int32_t a)
Computes the inverse sine of the IQ21 input.
Definition: _IQNasin_acos.c:289
int32_t _IQ19isqrt(int32_t a)
Calculate inverse square root of an IQ19 input.
Definition: _IQNsqrt.c:1201
int16_t _IQ29toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ29 number to a string.
Definition: _IQNtoa.c:214
int32_t _IQ15mpy(int32_t a, int32_t b)
Multiplies two values of IQ15 format.
Definition: _IQNmpy.c:209
int32_t _IQ5asin(int32_t a)
Computes the inverse sine of the IQ5 input.
Definition: _IQNasin_acos.c:465
int32_t _IQ8cos(int32_t a)
Computes the cosine of an IQ8 input.
Definition: _IQNsin_cos.c:953
int16_t _IQ27toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ27 number to a string.
Definition: _IQNtoa.c:242
float _IQ14toF(int32_t a)
Converts input to floating point using IQ14 format.
Definition: _IQNtoF.c:253
int32_t _IQ24isqrt(int32_t a)
Calculate inverse square root of an IQ24 input.
Definition: _IQNsqrt.c:1146
int32_t _IQ12frac(int32_t a)
Return the fractional portion of an IQ12 input.
Definition: _IQNfrac.c:239
int32_t _IQ10atan2(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ10 input and return the result, in radians.
Definition: _IQNatan2.c:571
int32_t _IQ13mpy(int32_t a, int32_t b)
Multiplies two values of IQ13 format.
Definition: _IQNmpy.c:233
int32_t _IQ20cos(int32_t a)
Computes the cosine of an IQ20 input.
Definition: _IQNsin_cos.c:821
int32_t _IQ27imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1463
int32_t _atoIQ10(const char *string)
Converts string to IQ10 number.
Definition: _atoIQN.c:380
int32_t _atoIQ2(const char *string)
Converts string to IQ2 number.
Definition: _atoIQN.c:468
int32_t _atoIQ7(const char *string)
Converts string to IQ7 number.
Definition: _atoIQN.c:413
int32_t _IQmag(int32_t A, int32_t B)
Calculate the magnitude of two IQ31 inputs.
Definition: _IQNsqrt.c:1413
int32_t _IQ24asin(int32_t a)
Computes the inverse sine of the IQ24 input.
Definition: _IQNasin_acos.c:256
int32_t _IQ16frac(int32_t a)
Return the fractional portion of an IQ16 input.
Definition: _IQNfrac.c:195
int32_t _IQ17mpy(int32_t a, int32_t b)
Multiplies two values of IQ17 format.
Definition: _IQNmpy.c:185
float _IQ16toF(int32_t a)
Converts input to floating point using IQ16 format.
Definition: _IQNtoF.c:231
int32_t _IQ24imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1499
int32_t _IQ6atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ6 input and return the result.
Definition: _IQNatan2.c:1028
int32_t _atoIQ29(const char *string)
Converts string to IQ29 number.
Definition: _atoIQN.c:171
int32_t _IQ30mpy(int32_t a, int32_t b)
Multiplies two values of IQ30 format.
Definition: _IQNmpy.c:29
int32_t _IQ25rsmpy(int32_t a, int32_t b)
Multiplies two IQ25 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:129
int32_t _IQ8atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ8 input and return the result.
Definition: _IQNatan2.c:1002
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.
Definition: _IQNmpyIQX.c:500
int32_t _IQ29div(int32_t a, int32_t b)
Divides two values of IQ29 format.
Definition: _IQNdiv.c:37
int16_t _IQ19toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ19 number to a string.
Definition: _IQNtoa.c:354
int32_t _IQ18sqrt(int32_t a)
Calculate square root of an IQ18 input.
Definition: _IQNsqrt.c:514
int32_t _IQ14sin(int32_t a)
Computes the sine of an IQ14 input.
Definition: _IQNsin_cos.c:566
int32_t _IQ10isqrt(int32_t a)
Calculate inverse square root of an IQ10 input.
Definition: _IQNsqrt.c:1300
int32_t _IQ4sqrt(int32_t a)
Calculate square root of an IQ4 input.
Definition: _IQNsqrt.c:668
int16_t _IQ7toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ7 number to a string.
Definition: _IQNtoa.c:522
int32_t _IQ22sqrt(int32_t a)
Calculate square root of an IQ22 input.
Definition: _IQNsqrt.c:470
int32_t _IQ30rmpy(int32_t a, int32_t b)
Multiply two values of IQ30 type, with rounding.
Definition: _IQNrmpy.c:60
float _IQ4toF(int32_t a)
Converts input to floating point using IQ4 format.
Definition: _IQNtoF.c:363
int32_t _IQ16asin(int32_t a)
Computes the inverse sine of the IQ16 input.
Definition: _IQNasin_acos.c:344
int32_t _atoIQ12(const char *string)
Converts string to IQ12 number.
Definition: _atoIQN.c:358
int16_t _IQ12toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ12 number to a string.
Definition: _IQNtoa.c:452
int32_t _IQ28sinPU(int32_t a)
Computes the sine of an IQ28 input.
Definition: _IQNsin_cos.c:1076
int32_t _IQ20sin(int32_t a)
Computes the sine of an IQ20 input.
Definition: _IQNsin_cos.c:500
int32_t _IQ2atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ2 input and return the result.
Definition: _IQNatan2.c:1080
int32_t _IQ9asin(int32_t a)
Computes the inverse sine of the IQ9 input.
Definition: _IQNasin_acos.c:421
int32_t _IQ29atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ29 input and return the result.
Definition: _IQNatan2.c:729
int32_t _IQ11sin(int32_t a)
Computes the sine of an IQ11 input.
Definition: _IQNsin_cos.c:599
int32_t _IQ19rsmpy(int32_t a, int32_t b)
Multiplies two IQ19 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:201
int32_t _IQ3asin(int32_t a)
Computes the inverse sine of the IQ3 input.
Definition: _IQNasin_acos.c:487
int32_t _atoIQ28(const char *string)
Converts string to IQ28 number.
Definition: _atoIQN.c:182
int32_t _IQ6exp(int32_t a)
Computes the exponential of an IQ6 input.
Definition: _IQNexp.c:411
int16_t _IQ26toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ26 number to a string.
Definition: _IQNtoa.c:256
int32_t _IQ1sqrt(int32_t a)
Calculate square root of an IQ1 input.
Definition: _IQNsqrt.c:701
int32_t _IQ4cosPU(int32_t a)
Computes the cosine of an IQ4 input.
Definition: _IQNsin_cos.c:1683
int32_t _IQ8asin(int32_t a)
Computes the inverse sine of the IQ8 input.
Definition: _IQNasin_acos.c:432
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.
Definition: _IQNmpyIQX.c:170
int32_t _IQ15frac(int32_t a)
Return the fractional portion of an IQ15 input.
Definition: _IQNfrac.c:206
int32_t _IQ23log(int32_t a)
Computes the base-e logarithm of an IQ23 input.
Definition: _IQNlog.c:207
int32_t _IQ4log(int32_t a)
Computes the base-e logarithm of an IQ4 input.
Definition: _IQNlog.c:416
int32_t _atoIQ3(const char *string)
Converts string to IQ3 number.
Definition: _atoIQN.c:457
int32_t _IQ3mpy(int32_t a, int32_t b)
Multiplies two values of IQ3 format.
Definition: _IQNmpy.c:353
int32_t _IQ19atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ19 input and return the result.
Definition: _IQNatan2.c:859
int32_t _IQ7rsmpy(int32_t a, int32_t b)
Multiplies two IQ7 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:345
int32_t _IQ9sin(int32_t a)
Computes the sine of an IQ9 input.
Definition: _IQNsin_cos.c:621
int32_t _IQ15cosPU(int32_t a)
Computes the cosine of an IQ15 input.
Definition: _IQNsin_cos.c:1562
int32_t _IQ12rsmpy(int32_t a, int32_t b)
Multiplies two IQ12 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:285
float _IQ11toF(int32_t a)
Converts input to floating point using IQ11 format.
Definition: _IQNtoF.c:286
int32_t _IQ23rmpy(int32_t a, int32_t b)
Multiply two values of IQ23 type, with rounding.
Definition: _IQNrmpy.c:144
int32_t _IQ26imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1475
int32_t _IQ19asin(int32_t a)
Computes the inverse sine of the IQ19 input.
Definition: _IQNasin_acos.c:311
int32_t _IQ29rsmpy(int32_t a, int32_t b)
Multiplies two IQ29 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:81
int32_t _IQ29rmpy(int32_t a, int32_t b)
Multiply two values of IQ29 type, with rounding.
Definition: _IQNrmpy.c:72
int32_t _IQ27isqrt(int32_t a)
Calculate inverse square root of an IQ27 input.
Definition: _IQNsqrt.c:1113
int32_t _IQ9atan2(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ9 input and return the result, in radians.
Definition: _IQNatan2.c:584
int16_t _IQ5toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ5 number to a string.
Definition: _IQNtoa.c:550
int32_t _IQ8sinPU(int32_t a)
Computes the sine of an IQ8 input.
Definition: _IQNsin_cos.c:1296
int32_t _IQ12div(int32_t a, int32_t b)
Divides two values of IQ12 format.
Definition: _IQNdiv.c:241
int32_t _IQ13cos(int32_t a)
Computes the cosine of an IQ13 input.
Definition: _IQNsin_cos.c:898
int16_t _IQ2toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ2 number to a string.
Definition: _IQNtoa.c:592
int32_t _IQ23rsmpy(int32_t a, int32_t b)
Multiplies two IQ23 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:153
int32_t _IQ18atan2(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ18 input and return the result, in radians.
Definition: _IQNatan2.c:467
int32_t _IQ5mpy(int32_t a, int32_t b)
Multiplies two values of IQ5 format.
Definition: _IQNmpy.c:329
int32_t _IQ29isqrt(int32_t a)
Calculate inverse square root of an IQ29 input.
Definition: _IQNsqrt.c:1091
int32_t _IQ2sqrt(int32_t a)
Calculate square root of an IQ2 input.
Definition: _IQNsqrt.c:690
int32_t _IQ13log(int32_t a)
Computes the base-e logarithm of an IQ13 input.
Definition: _IQNlog.c:317
int32_t _IQ5exp(int32_t a)
Computes the exponential of an IQ5 input.
Definition: _IQNexp.c:422
int32_t _IQ7asin(int32_t a)
Computes the inverse sine of the IQ7 input.
Definition: _IQNasin_acos.c:443
int32_t _IQ27frac(int32_t a)
Return the fractional portion of an IQ27 input.
Definition: _IQNfrac.c:74
int32_t _IQ25exp(int32_t a)
Computes the exponential of an IQ25 input.
Definition: _IQNexp.c:202
int32_t _IQ11sqrt(int32_t a)
Calculate square root of an IQ11 input.
Definition: _IQNsqrt.c:591
int32_t _IQ21log(int32_t a)
Computes the base-e logarithm of an IQ21 input.
Definition: _IQNlog.c:229
int32_t _IQ2isqrt(int32_t a)
Calculate inverse square root of an IQ2 input.
Definition: _IQNsqrt.c:1388
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.
Definition: _IQNmpyIQX.c:155
int32_t _IQ25asin(int32_t a)
Computes the inverse sine of the IQ25 input.
Definition: _IQNasin_acos.c:245
int32_t _IQ28mpy(int32_t a, int32_t b)
Multiplies two values of IQ28 format.
Definition: _IQNmpy.c:53
int32_t _IQ15rsmpy(int32_t a, int32_t b)
Multiplies two IQ15 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:249
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.
Definition: _IQNmpyIQX.c:80
int32_t _IQ6isqrt(int32_t a)
Calculate inverse square root of an IQ6 input.
Definition: _IQNsqrt.c:1344
float _IQ23toF(int32_t a)
Converts input to floating point using IQ23 format.
Definition: _IQNtoF.c:154
int16_t _IQ30toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ30 number to a string.
Definition: _IQNtoa.c:200
int32_t _IQ13sin(int32_t a)
Computes the sine of an IQ13 input.
Definition: _IQNsin_cos.c:577
int32_t _IQ19frac(int32_t a)
Return the fractional portion of an IQ19 input.
Definition: _IQNfrac.c:162
int32_t _IQ1atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ1 input and return the result.
Definition: _IQNatan2.c:1093
int32_t _IQ11div(int32_t a, int32_t b)
Divides two values of IQ11 format.
Definition: _IQNdiv.c:253
int32_t _IQ30div(int32_t a, int32_t b)
Divides two values of IQ30 format.
Definition: _IQNdiv.c:25
int32_t _atoIQ18(const char *string)
Converts string to IQ18 number.
Definition: _atoIQN.c:292
int32_t _IQ29sinPU(int32_t a)
Computes the sine of an IQ29 input.
Definition: _IQNsin_cos.c:1065
int32_t _IQ23div(int32_t a, int32_t b)
Divides two values of IQ23 format.
Definition: _IQNdiv.c:109
int32_t _atoIQ9(const char *string)
Converts string to IQ9 number.
Definition: _atoIQN.c:391
int32_t _IQ2cosPU(int32_t a)
Computes the cosine of an IQ2 input.
Definition: _IQNsin_cos.c:1705
int32_t _IQ21div(int32_t a, int32_t b)
Divides two values of IQ21 format.
Definition: _IQNdiv.c:133
int32_t _IQ17atan2(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ17 input and return the result, in radians.
Definition: _IQNatan2.c:480
int32_t _IQ13rsmpy(int32_t a, int32_t b)
Multiplies two IQ13 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:273
int32_t _IQ4asin(int32_t a)
Computes the inverse sine of the IQ4 input.
Definition: _IQNasin_acos.c:476
int32_t _IQ19sin(int32_t a)
Computes the sine of an IQ19 input.
Definition: _IQNsin_cos.c:511
int32_t _atoIQ30(const char *string)
Converts string to IQ30 number.
Definition: _atoIQN.c:160
int32_t _IQ28rsmpy(int32_t a, int32_t b)
Multiplies two IQ28 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:93
int32_t _IQ15atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ15 input and return the result.
Definition: _IQNatan2.c:911
int32_t _IQ20isqrt(int32_t a)
Calculate inverse square root of an IQ20 input.
Definition: _IQNsqrt.c:1190
int32_t _IQ18log(int32_t a)
Computes the base-e logarithm of an IQ18 input.
Definition: _IQNlog.c:262
int32_t _IQ15imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1607
int32_t _IQ4cos(int32_t a)
Computes the cosine of an IQ4 input.
Definition: _IQNsin_cos.c:997
int32_t _IQ10div(int32_t a, int32_t b)
Divides two values of IQ10 format.
Definition: _IQNdiv.c:265
int32_t _IQ20div(int32_t a, int32_t b)
Divides two values of IQ20 format.
Definition: _IQNdiv.c:145
int32_t _IQ24frac(int32_t a)
Return the fractional portion of an IQ24 input.
Definition: _IQNfrac.c:107
int16_t _IQ13toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ13 number to a string.
Definition: _IQNtoa.c:438
int32_t _IQ8div(int32_t a, int32_t b)
Divides two values of IQ8 format.
Definition: _IQNdiv.c:289
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.
Definition: _IQNmpyIQX.c:185
int32_t _IQ29asin(int32_t a)
Computes the inverse sine of the IQ29 input.
Definition: _IQNasin_acos.c:201
int32_t _IQ15asin(int32_t a)
Computes the inverse sine of the IQ15 input.
Definition: _IQNasin_acos.c:355
float _IQ2toF(int32_t a)
Converts input to floating point using IQ2 format.
Definition: _IQNtoF.c:385
int32_t _atoIQ17(const char *string)
Converts string to IQ17 number.
Definition: _atoIQN.c:303
int32_t _IQ26sqrt(int32_t a)
Calculate square root of an IQ26 input.
Definition: _IQNsqrt.c:426
int32_t _IQ28isqrt(int32_t a)
Calculate inverse square root of an IQ28 input.
Definition: _IQNsqrt.c:1102
int32_t _IQ3atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ3 input and return the result.
Definition: _IQNatan2.c:1067
int32_t _IQ16sin(int32_t a)
Computes the sine of an IQ16 input.
Definition: _IQNsin_cos.c:544
int32_t _IQ20atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ20 input and return the result.
Definition: _IQNatan2.c:846
int32_t _IQ17div(int32_t a, int32_t b)
Divides two values of IQ17 format.
Definition: _IQNdiv.c:181
int32_t _IQ22rsmpy(int32_t a, int32_t b)
Multiplies two IQ22 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:165
int32_t _IQ20atan2(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ20 input and return the result, in radians.
Definition: _IQNatan2.c:441
float _IQ15toF(int32_t a)
Converts input to floating point using IQ15 format.
Definition: _IQNtoF.c:242
int32_t _IQ14rsmpy(int32_t a, int32_t b)
Multiplies two IQ14 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:261
int32_t _IQ21rmpy(int32_t a, int32_t b)
Multiply two values of IQ21 type, with rounding.
Definition: _IQNrmpy.c:168
int32_t _IQ25div(int32_t a, int32_t b)
Divides two values of IQ25 format.
Definition: _IQNdiv.c:85
int32_t _IQ10sinPU(int32_t a)
Computes the sine of an IQ10 input.
Definition: _IQNsin_cos.c:1274
int32_t _IQ7rmpy(int32_t a, int32_t b)
Multiply two values of IQ7 type, with rounding.
Definition: _IQNrmpy.c:336
int32_t _IQ27exp(int32_t a)
Computes the exponential of an IQ27 input.
Definition: _IQNexp.c:180
int32_t _IQ18atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ18 input and return the result.
Definition: _IQNatan2.c:872
int32_t _IQ30isqrt(int32_t a)
Calculate inverse square root of an IQ30 input.
Definition: _IQNsqrt.c:1080
int32_t _IQ6cos(int32_t a)
Computes the cosine of an IQ6 input.
Definition: _IQNsin_cos.c:975
int16_t _IQ18toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ18 number to a string.
Definition: _IQNtoa.c:368
int32_t _IQ5atan2PU(int32_t y, int32_t x)
Compute the 4-quadrant arctangent of the IQ5 input and return the result.
Definition: _IQNatan2.c:1041
int32_t _IQ20sinPU(int32_t a)
Computes the sine of an IQ20 input.
Definition: _IQNsin_cos.c:1164
int32_t _IQ1exp(int32_t a)
Computes the exponential of an IQ1 input.
Definition: _IQNexp.c:466
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.
Definition: _IQNmpyIQX.c:95
float _IQ8toF(int32_t a)
Converts input to floating point using IQ8 format.
Definition: _IQNtoF.c:319
int32_t _IQ15exp(int32_t a)
Computes the exponential of an IQ15 input.
Definition: _IQNexp.c:312
int32_t _IQ30sinPU(int32_t a)
Computes the sine of an IQ30 input.
Definition: _IQNsin_cos.c:1054
int32_t _IQ23sinPU(int32_t a)
Computes the sine of an IQ23 input.
Definition: _IQNsin_cos.c:1131
int32_t _IQ5div(int32_t a, int32_t b)
Divides two values of IQ5 format.
Definition: _IQNdiv.c:325
int32_t _IQ25log(int32_t a)
Computes the base-e logarithm of an IQ25 input.
Definition: _IQNlog.c:185
int32_t _IQ3sqrt(int32_t a)
Calculate square root of an IQ3 input.
Definition: _IQNsqrt.c:679
int32_t _IQ18rsmpy(int32_t a, int32_t b)
Multiplies two IQ18 numbers, with rounding and saturation.
Definition: _IQNrsmpy.c:213
int32_t _IQ21isqrt(int32_t a)
Calculate inverse square root of an IQ21 input.
Definition: _IQNsqrt.c:1179
int32_t _atoIQ13(const char *string)
Converts string to IQ13 number.
Definition: _atoIQN.c:347
int32_t _IQ18sinPU(int32_t a)
Computes the sine of an IQ18 input.
Definition: _IQNsin_cos.c:1186
int32_t _IQ27mpy(int32_t a, int32_t b)
Multiplies two values of IQ27 format.
Definition: _IQNmpy.c:65
int16_t _IQ10toa(char *string, const char *format, int32_t iqNInput)
Convert an IQ10 number to a string.
Definition: _IQNtoa.c:480
int32_t _IQ27sqrt(int32_t a)
Calculate square root of an IQ27 input.
Definition: _IQNsqrt.c:415
int32_t _IQ10sqrt(int32_t a)
Calculate square root of an IQ10 input.
Definition: _IQNsqrt.c:602
int32_t _IQ9imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1679
int32_t _IQ27div(int32_t a, int32_t b)
Divides two values of IQ27 format.
Definition: _IQNdiv.c:61
float _IQ17toF(int32_t a)
Converts input to floating point using IQ17 format.
Definition: _IQNtoF.c:220
int32_t _IQ18frac(int32_t a)
Return the fractional portion of an IQ18 input.
Definition: _IQNfrac.c:173
float _IQ24toF(int32_t a)
Converts input to floating point using IQ24 format.
Definition: _IQNtoF.c:143
int32_t _IQ13imag(int32_t a, int32_t b)
Calculate inverse magnitude of two inputs.
Definition: _IQNsqrt.c:1631
float _IQ12toF(int32_t a)
Converts input to floating point using IQ12 format.
Definition: _IQNtoF.c:275
© Copyright 1995-2023, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale