MotorWare f2806x Module API Documentation

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

32b/IQmathLib.h
Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
2 * Copyright (c) 2012, Texas Instruments Incorporated
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * * Neither the name of Texas Instruments Incorporated nor the names of
17 * its contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 * --/COPYRIGHT--*/
32 #ifndef _IQMATHLIB_H_
33 #define _IQMATHLIB_H_
34
35
36 // TI File $Revision: /main/3 $
37 // Checkin $Date: July 8, 2008 16:58:38 $
38 //###########################################################################
39 //
40 // FILE: IQmathLib.h
41 //
42 // TITLE: IQ Math library functions definitions.
43 //
44 //###########################################################################
45 //
46 // Ver | dd-mmm-yyyy | Who | Description of changes
47 // =====|=============|=======|==============================================
48 // 1.3 | 19 Nov 2001 | A. T. | Original Release.
49 // -----|-------------|-------|----------------------------------------------
50 // 1.4 | 17 May 2002 | A. T. | Added new functions and support for
51 // | | | intrinsics IQmpy, IQxmpy, IQsat.
52 // -----|-------------|-------|----------------------------------------------
53 // 1.4a| 12 Jun 2002 | A. T. | Fixed problem with _IQ() operation on
54 // | | | variables.
55 // -----|-------------|-------|----------------------------------------------
56 // 1.4b| 18 Jun 2002 | A. T. | Fixed bug with _IQtoIQN() and _IQNtoIQ()
57 // | | | operations.
58 // -----|-------------|-------|----------------------------------------------
59 // 1.4d| 30 Mar 2003 | DA/SD | 1. Added macro parameters in parentheses
60 // | | | in number of places where it matters
61 // | | | 2. Added macro definition to include header
62 // | | | file multiple times in the program.
63 // -----|-------------|-------|----------------------------------------------
64 // 1.4e| 17 Jun 2004 | AT/DA | Added IQexp function.
65 // | | | Added IQasin & IQacos functions (thanks DA).
66 // -----|-------------|-------|----------------------------------------------
67 // 1.4f| 10 Mar 2005 | AT | Fixed Bug In IQexp function.
68 // -----|-------------|-------|----------------------------------------------
69 // 1.5 | 30 Jan 2008 | LH | 1. Changed the definion of the _IQatan2PU(A,B)
70 // | | | macro for FLOAT_MATH so that a call to
71 // | | | divide will not occur.
72 // | | | 2. If MATH_TYPE == FLOAT_MATH, then include the
73 // | | | following standard headers: math.h
74 // | | | stdlib.h.
75 // | | | 3. Added missing #defines for the non-global
76 // | | | _IQatanN() function
77 // | | | 4. Adding missing definitions for absolute
78 // | | | value when MATH_TYPE == FLOAT_MATH
79 // | | | 5. Included limits.h and changed the definition
80 // | | | of MAX_IQ_NEG to LONG_MIN and MAX_IQ_POS
81 // | | | to LONG_MAX
82 // -----|-------------|-------|----------------------------------------------
83 // 1.5c| 8 June 2010 | LH | Changes made to improve porting between IQ and
84 // | | | and float.
85 // | | |
86 // | | | 1. Added left shift and right shift #defines
87 // | | | for multiplying and dividing by power of
88 // | | | 2 (up to 64) for IQ_MATH
89 // | | |
90 // | | | 2. Added corresponding multiply/divide #defines
91 // | | | for powers of 2 (up to 64) for FLOAT_MATH
92 // | | |
93 // | | | 3. FLOAT_MATH: Corrected the #defines for
94 // | | | conversion from IQ to Q15
95 // | | |
96 // | | | a) removed the L on the constant to avoid
97 // | | | the 64-bit float multiply call to the
98 // | | | runtime support library.
99 // | | | b) removed the conversion from float to
100 // | | | int before the multiply. This prevented
101 // | | | native floating point from being used.
102 // | | |
103 // | | | 4. FLOAT_MATH: Modified IQdiv and IQNdiv macros t
104 // | | | such that the arguments are cast to float before
105 // | | | he division.
106 // | | |
107 // | | | In some cases the IQ_MATH verion was used to
108 // | | | divide an _iq type by an int32, which works fine.
109 // | | |
110 // | | | This change will allow the FLOAT_TYPE macros to
111 // | | | to also be used with integer types, and not
112 // | | | just "_iq" (i.e. float) types.
113 // | | |
114 // | | | 5. FLOAT_MATH: Changed the definition of sat for float
115 // | | | math. This new definition uses compiler intrinsics and
116 // | | | requires codegen tools V5.2.2 or later
117 // | | | The previous definition can be uncommented
118 // | | | if needed for previous versions of the codegen tools
119 // | | | however it will not be efficient.
120 //###########################################################################
121 // $TI Release: Release 1.5c $
122 // $Release Date: June 8, 2010 $
123 //###########################################################################
124 //
125 // User needs to configure "MATH_TYPE" and "GLOBAL_Q" values:
126 //
127 //---------------------------------------------------------------------------
128 // Select math type, IQ_MATH or FLOAT_MATH:
129 //
130
131 // **************************************************************************
132 // the includes
133
138
139
140 // Include the algorithm overview defined in modules/<module>/docs/doxygen/doxygen.h
142
143 #ifdef __cplusplus
144 extern "C" {
145 #endif
146
147
148 // **************************************************************************
149 // the defines
150
151 #define FLOAT_MATH 1
152 #define IQ_MATH 0
153
154 #ifndef MATH_TYPE
155 #define MATH_TYPE IQ_MATH
156 #endif
157
158 //---------------------------------------------------------------------------
159 // Select global Q value and scaling. The Q value is limited to the
160 // following range for all functions:
161 //
162 // 30 <= GLOBAL_Q <= 1
163 //
164 #ifndef GLOBAL_Q
165 #define GLOBAL_Q 24
166 #endif
167
168 //---------------------------------------------------------------------------
169 // If using FLOAT_MATH, include standard headers to avoid conversion issues
170 //
171 #if MATH_TYPE == FLOAT_MATH
172 #include <math.h>
173 #include <stdlib.h>
174 #endif
175 #include <limits.h>
176
177 //---------------------------------------------------------------------------
178 // Various Usefull Constant Definitions:
179 //
180 #define QG GLOBAL_Q
181 #define Q30 30
182 #define Q29 29
183 #define Q28 28
184 #define Q27 27
185 #define Q26 26
186 #define Q25 25
187 #define Q24 24
188 #define Q23 23
189 #define Q22 22
190 #define Q21 21
191 #define Q20 20
192 #define Q19 19
193 #define Q18 18
194 #define Q17 17
195 #define Q16 16
196 #define Q15 15
197 #define Q14 14
198 #define Q13 13
199 #define Q12 12
200 #define Q11 11
201 #define Q10 10
202 #define Q9 9
203 #define Q8 8
204 #define Q7 7
205 #define Q6 6
206 #define Q5 5
207 #define Q4 4
208 #define Q3 3
209 #define Q2 2
210 #define Q1 1
211
212 #define MAX_IQ_POS LONG_MAX
213 #define MAX_IQ_NEG LONG_MIN
214 #define MIN_IQ_POS 1
215 #define MIN_IQ_NEG -1
216
217 //###########################################################################
218 #if MATH_TYPE == IQ_MATH
219 //###########################################################################
220 // If IQ_MATH is used, the following IQmath library function definitions
221 // are used:
222 //===========================================================================
223 typedef long _iq;
224 typedef long _iq30;
225 typedef long _iq29;
226 typedef long _iq28;
227 typedef long _iq27;
228 typedef long _iq26;
229 typedef long _iq25;
230 typedef long _iq24;
231 typedef long _iq23;
232 typedef long _iq22;
233 typedef long _iq21;
234 typedef long _iq20;
235 typedef long _iq19;
236 typedef long _iq18;
237 typedef long _iq17;
238 typedef long _iq16;
239 typedef long _iq15;
240 typedef long _iq14;
241 typedef long _iq13;
242 typedef long _iq12;
243 typedef long _iq11;
244 typedef long _iq10;
245 typedef long _iq9;
246 typedef long _iq8;
247 typedef long _iq7;
248 typedef long _iq6;
249 typedef long _iq5;
250 typedef long _iq4;
251 typedef long _iq3;
252 typedef long _iq2;
253 typedef long _iq1;
254 //---------------------------------------------------------------------------
255 #define _IQmpy2(A) ((A)<<1)
256 #define _IQmpy4(A) ((A)<<2)
257 #define _IQmpy8(A) ((A)<<3)
258 #define _IQmpy16(A) ((A)<<4)
259 #define _IQmpy32(A) ((A)<<5)
260 #define _IQmpy64(A) ((A)<<6)
261
262 #define _IQdiv2(A) ((A)>>1)
263 #define _IQdiv4(A) ((A)>>2)
264 #define _IQdiv8(A) ((A)>>3)
265 #define _IQdiv16(A) ((A)>>4)
266 #define _IQdiv32(A) ((A)>>5)
267 #define _IQdiv64(A) ((A)>>6)
268 //---------------------------------------------------------------------------
269 #define _IQ30(A) (long) ((A) * 1073741824.0L)
270 #define _IQ29(A) (long) ((A) * 536870912.0L)
271 #define _IQ28(A) (long) ((A) * 268435456.0L)
272 #define _IQ27(A) (long) ((A) * 134217728.0L)
273 #define _IQ26(A) (long) ((A) * 67108864.0L)
274 #define _IQ25(A) (long) ((A) * 33554432.0L)
275 #define _IQ24(A) (long) ((A) * 16777216.0L)
276 #define _IQ23(A) (long) ((A) * 8388608.0L)
277 #define _IQ22(A) (long) ((A) * 4194304.0L)
278 #define _IQ21(A) (long) ((A) * 2097152.0L)
279 #define _IQ20(A) (long) ((A) * 1048576.0L)
280 #define _IQ19(A) (long) ((A) * 524288.0L)
281 #define _IQ18(A) (long) ((A) * 262144.0L)
282 #define _IQ17(A) (long) ((A) * 131072.0L)
283 #define _IQ16(A) (long) ((A) * 65536.0L)
284 #define _IQ15(A) (long) ((A) * 32768.0L)
285 #define _IQ14(A) (long) ((A) * 16384.0L)
286 #define _IQ13(A) (long) ((A) * 8192.0L)
287 #define _IQ12(A) (long) ((A) * 4096.0L)
288 #define _IQ11(A) (long) ((A) * 2048.0L)
289 #define _IQ10(A) (long) ((A) * 1024.0L)
290 #define _IQ9(A) (long) ((A) * 512.0L)
291 #define _IQ8(A) (long) ((A) * 256.0L)
292 #define _IQ7(A) (long) ((A) * 128.0L)
293 #define _IQ6(A) (long) ((A) * 64.0L)
294 #define _IQ5(A) (long) ((A) * 32.0L)
295 #define _IQ4(A) (long) ((A) * 16.0L)
296 #define _IQ3(A) (long) ((A) * 8.0L)
297 #define _IQ2(A) (long) ((A) * 4.0L)
298 #define _IQ1(A) (long) ((A) * 2.0L)
299
300 #if GLOBAL_Q == 30
301 #define _IQ(A) _IQ30(A)
302 #endif
303 #if GLOBAL_Q == 29
304 #define _IQ(A) _IQ29(A)
305 #endif
306 #if GLOBAL_Q == 28
307 #define _IQ(A) _IQ28(A)
308 #endif
309 #if GLOBAL_Q == 27
310 #define _IQ(A) _IQ27(A)
311 #endif
312 #if GLOBAL_Q == 26
313 #define _IQ(A) _IQ26(A)
314 #endif
315 #if GLOBAL_Q == 25
316 #define _IQ(A) _IQ25(A)
317 #endif
318 #if GLOBAL_Q == 24
319 #define _IQ(A) _IQ24(A)
320 #endif
321 #if GLOBAL_Q == 23
322 #define _IQ(A) _IQ23(A)
323 #endif
324 #if GLOBAL_Q == 22
325 #define _IQ(A) _IQ22(A)
326 #endif
327 #if GLOBAL_Q == 21
328 #define _IQ(A) _IQ21(A)
329 #endif
330 #if GLOBAL_Q == 20
331 #define _IQ(A) _IQ20(A)
332 #endif
333 #if GLOBAL_Q == 19
334 #define _IQ(A) _IQ19(A)
335 #endif
336 #if GLOBAL_Q == 18
337 #define _IQ(A) _IQ18(A)
338 #endif
339 #if GLOBAL_Q == 17
340 #define _IQ(A) _IQ17(A)
341 #endif
342 #if GLOBAL_Q == 16
343 #define _IQ(A) _IQ16(A)
344 #endif
345 #if GLOBAL_Q == 15
346 #define _IQ(A) _IQ15(A)
347 #endif
348 #if GLOBAL_Q == 14
349 #define _IQ(A) _IQ14(A)
350 #endif
351 #if GLOBAL_Q == 13
352 #define _IQ(A) _IQ13(A)
353 #endif
354 #if GLOBAL_Q == 12
355 #define _IQ(A) _IQ12(A)
356 #endif
357 #if GLOBAL_Q == 11
358 #define _IQ(A) _IQ11(A)
359 #endif
360 #if GLOBAL_Q == 10
361 #define _IQ(A) _IQ10(A)
362 #endif
363 #if GLOBAL_Q == 9
364 #define _IQ(A) _IQ9(A)
365 #endif
366 #if GLOBAL_Q == 8
367 #define _IQ(A) _IQ8(A)
368 #endif
369 #if GLOBAL_Q == 7
370 #define _IQ(A) _IQ7(A)
371 #endif
372 #if GLOBAL_Q == 6
373 #define _IQ(A) _IQ6(A)
374 #endif
375 #if GLOBAL_Q == 5
376 #define _IQ(A) _IQ5(A)
377 #endif
378 #if GLOBAL_Q == 4
379 #define _IQ(A) _IQ4(A)
380 #endif
381 #if GLOBAL_Q == 3
382 #define _IQ(A) _IQ3(A)
383 #endif
384 #if GLOBAL_Q == 2
385 #define _IQ(A) _IQ2(A)
386 #endif
387 #if GLOBAL_Q == 1
388 #define _IQ(A) _IQ1(A)
389 #endif
390 //---------------------------------------------------------------------------
391 extern float _IQ30toF(long A);
392 extern float _IQ29toF(long A);
393 extern float _IQ28toF(long A);
394 extern float _IQ27toF(long A);
395 extern float _IQ26toF(long A);
396 extern float _IQ25toF(long A);
397 extern float _IQ24toF(long A);
398 extern float _IQ23toF(long A);
399 extern float _IQ22toF(long A);
400 extern float _IQ21toF(long A);
401 extern float _IQ20toF(long A);
402 extern float _IQ19toF(long A);
403 extern float _IQ18toF(long A);
404 extern float _IQ17toF(long A);
405 extern float _IQ16toF(long A);
406 extern float _IQ15toF(long A);
407 extern float _IQ14toF(long A);
408 extern float _IQ13toF(long A);
409 extern float _IQ12toF(long A);
410 extern float _IQ11toF(long A);
411 extern float _IQ10toF(long A);
412 extern float _IQ9toF(long A);
413 extern float _IQ8toF(long A);
414 extern float _IQ7toF(long A);
415 extern float _IQ6toF(long A);
416 extern float _IQ5toF(long A);
417 extern float _IQ4toF(long A);
418 extern float _IQ3toF(long A);
419 extern float _IQ2toF(long A);
420 extern float _IQ1toF(long A);
421
422 #if GLOBAL_Q == 30
423 #define _IQtoF(A) _IQ30toF(A)
424 #endif
425 #if GLOBAL_Q == 29
426 #define _IQtoF(A) _IQ29toF(A)
427 #endif
428 #if GLOBAL_Q == 28
429 #define _IQtoF(A) _IQ28toF(A)
430 #endif
431 #if GLOBAL_Q == 27
432 #define _IQtoF(A) _IQ27toF(A)
433 #endif
434 #if GLOBAL_Q == 26
435 #define _IQtoF(A) _IQ26toF(A)
436 #endif
437 #if GLOBAL_Q == 25
438 #define _IQtoF(A) _IQ25toF(A)
439 #endif
440 #if GLOBAL_Q == 24
441 #define _IQtoF(A) _IQ24toF(A)
442 #endif
443 #if GLOBAL_Q == 23
444 #define _IQtoF(A) _IQ23toF(A)
445 #endif
446 #if GLOBAL_Q == 22
447 #define _IQtoF(A) _IQ22toF(A)
448 #endif
449 #if GLOBAL_Q == 21
450 #define _IQtoF(A) _IQ21toF(A)
451 #endif
452 #if GLOBAL_Q == 20
453 #define _IQtoF(A) _IQ20toF(A)
454 #endif
455 #if GLOBAL_Q == 19
456 #define _IQtoF(A) _IQ19toF(A)
457 #endif
458 #if GLOBAL_Q == 18
459 #define _IQtoF(A) _IQ18toF(A)
460 #endif
461 #if GLOBAL_Q == 17
462 #define _IQtoF(A) _IQ17toF(A)
463 #endif
464 #if GLOBAL_Q == 16
465 #define _IQtoF(A) _IQ16toF(A)
466 #endif
467 #if GLOBAL_Q == 15
468 #define _IQtoF(A) _IQ15toF(A)
469 #endif
470 #if GLOBAL_Q == 14
471 #define _IQtoF(A) _IQ14toF(A)
472 #endif
473 #if GLOBAL_Q == 13
474 #define _IQtoF(A) _IQ13toF(A)
475 #endif
476 #if GLOBAL_Q == 12
477 #define _IQtoF(A) _IQ12toF(A)
478 #endif
479 #if GLOBAL_Q == 11
480 #define _IQtoF(A) _IQ11toF(A)
481 #endif
482 #if GLOBAL_Q == 10
483 #define _IQtoF(A) _IQ10toF(A)
484 #endif
485 #if GLOBAL_Q == 9
486 #define _IQtoF(A) _IQ9toF(A)
487 #endif
488 #if GLOBAL_Q == 8
489 #define _IQtoF(A) _IQ8toF(A)
490 #endif
491 #if GLOBAL_Q == 7
492 #define _IQtoF(A) _IQ7toF(A)
493 #endif
494 #if GLOBAL_Q == 6
495 #define _IQtoF(A) _IQ6toF(A)
496 #endif
497 #if GLOBAL_Q == 5
498 #define _IQtoF(A) _IQ5toF(A)
499 #endif
500 #if GLOBAL_Q == 4
501 #define _IQtoF(A) _IQ4toF(A)
502 #endif
503 #if GLOBAL_Q == 3
504 #define _IQtoF(A) _IQ3toF(A)
505 #endif
506 #if GLOBAL_Q == 2
507 #define _IQtoF(A) _IQ2toF(A)
508 #endif
509 #if GLOBAL_Q == 1
510 #define _IQtoF(A) _IQ1toF(A)
511 #endif
512 //---------------------------------------------------------------------------
513 #define _IQsat(A, Pos, Neg) __IQsat(A, Pos, Neg)
514 //---------------------------------------------------------------------------
515 #define _IQtoIQ30(A) ((long) (A) << (30 - GLOBAL_Q))
516 #define _IQ30toIQ(A) ((long) (A) >> (30 - GLOBAL_Q))
517
518 #if (GLOBAL_Q >= 29)
519 #define _IQtoIQ29(A) ((long) (A) >> (GLOBAL_Q - 29))
520 #define _IQ29toIQ(A) ((long) (A) << (GLOBAL_Q - 29))
521 #else
522 #define _IQtoIQ29(A) ((long) (A) << (29 - GLOBAL_Q))
523 #define _IQ29toIQ(A) ((long) (A) >> (29 - GLOBAL_Q))
524 #endif
525
526 #if (GLOBAL_Q >= 28)
527 #define _IQtoIQ28(A) ((long) (A) >> (GLOBAL_Q - 28))
528 #define _IQ28toIQ(A) ((long) (A) << (GLOBAL_Q - 28))
529 #else
530 #define _IQtoIQ28(A) ((long) (A) << (28 - GLOBAL_Q))
531 #define _IQ28toIQ(A) ((long) (A) >> (28 - GLOBAL_Q))
532 #endif
533
534 #if (GLOBAL_Q >= 27)
535 #define _IQtoIQ27(A) ((long) (A) >> (GLOBAL_Q - 27))
536 #define _IQ27toIQ(A) ((long) (A) << (GLOBAL_Q - 27))
537 #else
538 #define _IQtoIQ27(A) ((long) (A) << (27 - GLOBAL_Q))
539 #define _IQ27toIQ(A) ((long) (A) >> (27 - GLOBAL_Q))
540 #endif
541
542 #if (GLOBAL_Q >= 26)
543 #define _IQtoIQ26(A) ((long) (A) >> (GLOBAL_Q - 26))
544 #define _IQ26toIQ(A) ((long) (A) << (GLOBAL_Q - 26))
545 #else
546 #define _IQtoIQ26(A) ((long) (A) << (26 - GLOBAL_Q))
547 #define _IQ26toIQ(A) ((long) (A) >> (26 - GLOBAL_Q))
548 #endif
549
550 #if (GLOBAL_Q >= 25)
551 #define _IQtoIQ25(A) ((long) (A) >> (GLOBAL_Q - 25))
552 #define _IQ25toIQ(A) ((long) (A) << (GLOBAL_Q - 25))
553 #else
554 #define _IQtoIQ25(A) ((long) (A) << (25 - GLOBAL_Q))
555 #define _IQ25toIQ(A) ((long) (A) >> (25 - GLOBAL_Q))
556 #endif
557
558 #if (GLOBAL_Q >= 24)
559 #define _IQtoIQ24(A) ((long) (A) >> (GLOBAL_Q - 24))
560 #define _IQ24toIQ(A) ((long) (A) << (GLOBAL_Q - 24))
561 #else
562 #define _IQtoIQ24(A) ((long) (A) << (24 - GLOBAL_Q))
563 #define _IQ24toIQ(A) ((long) (A) >> (24 - GLOBAL_Q))
564 #endif
565
566 #if (GLOBAL_Q >= 23)
567 #define _IQtoIQ23(A) ((long) (A) >> (GLOBAL_Q - 23))
568 #define _IQ23toIQ(A) ((long) (A) << (GLOBAL_Q - 23))
569 #else
570 #define _IQtoIQ23(A) ((long) (A) << (23 - GLOBAL_Q))
571 #define _IQ23toIQ(A) ((long) (A) >> (23 - GLOBAL_Q))
572 #endif
573
574 #if (GLOBAL_Q >= 22)
575 #define _IQtoIQ22(A) ((long) (A) >> (GLOBAL_Q - 22))
576 #define _IQ22toIQ(A) ((long) (A) << (GLOBAL_Q - 22))
577 #else
578 #define _IQtoIQ22(A) ((long) (A) << (22 - GLOBAL_Q))
579 #define _IQ22toIQ(A) ((long) (A) >> (22 - GLOBAL_Q))
580 #endif
581
582 #if (GLOBAL_Q >= 21)
583 #define _IQtoIQ21(A) ((long) (A) >> (GLOBAL_Q - 21))
584 #define _IQ21toIQ(A) ((long) (A) << (GLOBAL_Q - 21))
585 #else
586 #define _IQtoIQ21(A) ((long) (A) << (21 - GLOBAL_Q))
587 #define _IQ21toIQ(A) ((long) (A) >> (21 - GLOBAL_Q))
588 #endif
589
590 #if (GLOBAL_Q >= 20)
591 #define _IQtoIQ20(A) ((long) (A) >> (GLOBAL_Q - 20))
592 #define _IQ20toIQ(A) ((long) (A) << (GLOBAL_Q - 20))
593 #else
594 #define _IQtoIQ20(A) ((long) (A) << (20 - GLOBAL_Q))
595 #define _IQ20toIQ(A) ((long) (A) >> (20 - GLOBAL_Q))
596 #endif
597
598 #if (GLOBAL_Q >= 19)
599 #define _IQtoIQ19(A) ((long) (A) >> (GLOBAL_Q - 19))
600 #define _IQ19toIQ(A) ((long) (A) << (GLOBAL_Q - 19))
601 #else
602 #define _IQtoIQ19(A) ((long) (A) << (19 - GLOBAL_Q))
603 #define _IQ19toIQ(A) ((long) (A) >> (19 - GLOBAL_Q))
604 #endif
605
606 #if (GLOBAL_Q >= 18)
607 #define _IQtoIQ18(A) ((long) (A) >> (GLOBAL_Q - 18))
608 #define _IQ18toIQ(A) ((long) (A) << (GLOBAL_Q - 18))
609 #else
610 #define _IQtoIQ18(A) ((long) (A) << (18 - GLOBAL_Q))
611 #define _IQ18toIQ(A) ((long) (A) >> (18 - GLOBAL_Q))
612 #endif
613
614 #if (GLOBAL_Q >= 17)
615 #define _IQtoIQ17(A) ((long) (A) >> (GLOBAL_Q - 17))
616 #define _IQ17toIQ(A) ((long) (A) << (GLOBAL_Q - 17))
617 #else
618 #define _IQtoIQ17(A) ((long) (A) << (17 - GLOBAL_Q))
619 #define _IQ17toIQ(A) ((long) (A) >> (17 - GLOBAL_Q))
620 #endif
621
622 #if (GLOBAL_Q >= 16)
623 #define _IQtoIQ16(A) ((long) (A) >> (GLOBAL_Q - 16))
624 #define _IQ16toIQ(A) ((long) (A) << (GLOBAL_Q - 16))
625 #else
626 #define _IQtoIQ16(A) ((long) (A) << (16 - GLOBAL_Q))
627 #define _IQ16toIQ(A) ((long) (A) >> (16 - GLOBAL_Q))
628 #endif
629
630 #if (GLOBAL_Q >= 15)
631 #define _IQtoIQ15(A) ((long) (A) >> (GLOBAL_Q - 15))
632 #define _IQ15toIQ(A) ((long) (A) << (GLOBAL_Q - 15))
633 #define _IQtoQ15(A) ((long) (A) >> (GLOBAL_Q - 15))
634 #define _Q15toIQ(A) ((long) (A) << (GLOBAL_Q - 15))
635 #else
636 #define _IQtoIQ15(A) ((long) (A) << (15 - GLOBAL_Q))
637 #define _IQ15toIQ(A) ((long) (A) >> (15 - GLOBAL_Q))
638 #define _IQtoQ15(A) ((long) (A) << (15 - GLOBAL_Q))
639 #define _Q15toIQ(A) ((long) (A) >> (15 - GLOBAL_Q))
640 #endif
641
642 #if (GLOBAL_Q >= 14)
643 #define _IQtoIQ14(A) ((long) (A) >> (GLOBAL_Q - 14))
644 #define _IQ14toIQ(A) ((long) (A) << (GLOBAL_Q - 14))
645 #define _IQtoQ14(A) ((long) (A) >> (GLOBAL_Q - 14))
646 #define _Q14toIQ(A) ((long) (A) << (GLOBAL_Q - 14))
647 #else
648 #define _IQtoIQ14(A) ((long) (A) << (14 - GLOBAL_Q))
649 #define _IQ14toIQ(A) ((long) (A) >> (14 - GLOBAL_Q))
650 #define _IQtoQ14(A) ((long) (A) << (14 - GLOBAL_Q))
651 #define _Q14toIQ(A) ((long) (A) >> (14 - GLOBAL_Q))
652 #endif
653
654 #if (GLOBAL_Q >= 13)
655 #define _IQtoIQ13(A) ((long) (A) >> (GLOBAL_Q - 13))
656 #define _IQ13toIQ(A) ((long) (A) << (GLOBAL_Q - 13))
657 #define _IQtoQ13(A) ((long) (A) >> (GLOBAL_Q - 13))
658 #define _Q13toIQ(A) ((long) (A) << (GLOBAL_Q - 13))
659 #else
660 #define _IQtoIQ13(A) ((long) (A) << (13 - GLOBAL_Q))
661 #define _IQ13toIQ(A) ((long) (A) >> (13 - GLOBAL_Q))
662 #define _IQtoQ13(A) ((long) (A) << (13 - GLOBAL_Q))
663 #define _Q13toIQ(A) ((long) (A) >> (13 - GLOBAL_Q))
664 #endif
665
666 #if (GLOBAL_Q >= 12)
667 #define _IQtoIQ12(A) ((long) (A) >> (GLOBAL_Q - 12))
668 #define _IQ12toIQ(A) ((long) (A) << (GLOBAL_Q - 12))
669 #define _IQtoQ12(A) ((long) (A) >> (GLOBAL_Q - 12))
670 #define _Q12toIQ(A) ((long) (A) << (GLOBAL_Q - 12))
671 #else
672 #define _IQtoIQ12(A) ((long) (A) << (12 - GLOBAL_Q))
673 #define _IQ12toIQ(A) ((long) (A) >> (12 - GLOBAL_Q))
674 #define _IQtoQ12(A) ((long) (A) << (12 - GLOBAL_Q))
675 #define _Q12toIQ(A) ((long) (A) >> (12 - GLOBAL_Q))
676 #endif
677
678 #if (GLOBAL_Q >= 11)
679 #define _IQtoIQ11(A) ((long) (A) >> (GLOBAL_Q - 11))
680 #define _IQ11toIQ(A) ((long) (A) << (GLOBAL_Q - 11))
681 #define _IQtoQ11(A) ((long) (A) >> (GLOBAL_Q - 11))
682 #define _Q11toIQ(A) ((long) (A) << (GLOBAL_Q - 11))
683 #else
684 #define _IQtoIQ11(A) ((long) (A) << (11 - GLOBAL_Q))
685 #define _IQ11toIQ(A) ((long) (A) >> (11 - GLOBAL_Q))
686 #define _IQtoQ11(A) ((long) (A) << (11 - GLOBAL_Q))
687 #define _Q11toIQ(A) ((long) (A) >> (11 - GLOBAL_Q))
688 #endif
689
690 #if (GLOBAL_Q >= 10)
691 #define _IQtoIQ10(A) ((long) (A) >> (GLOBAL_Q - 10))
692 #define _IQ10toIQ(A) ((long) (A) << (GLOBAL_Q - 10))
693 #define _IQtoQ10(A) ((long) (A) >> (GLOBAL_Q - 10))
694 #define _Q10toIQ(A) ((long) (A) << (GLOBAL_Q - 10))
695 #else
696 #define _IQtoIQ10(A) ((long) (A) << (10 - GLOBAL_Q))
697 #define _IQ10toIQ(A) ((long) (A) >> (10 - GLOBAL_Q))
698 #define _IQtoQ10(A) ((long) (A) << (10 - GLOBAL_Q))
699 #define _Q10toIQ(A) ((long) (A) >> (10 - GLOBAL_Q))
700 #endif
701
702 #if (GLOBAL_Q >= 9)
703 #define _IQtoIQ9(A) ((long) (A) >> (GLOBAL_Q - 9))
704 #define _IQ9toIQ(A) ((long) (A) << (GLOBAL_Q - 9))
705 #define _IQtoQ9(A) ((long) (A) >> (GLOBAL_Q - 9))
706 #define _Q9toIQ(A) ((long) (A) << (GLOBAL_Q - 9))
707 #else
708 #define _IQtoIQ9(A) ((long) (A) << (9 - GLOBAL_Q))
709 #define _IQ9toIQ(A) ((long) (A) >> (9 - GLOBAL_Q))
710 #define _IQtoQ9(A) ((long) (A) << (9 - GLOBAL_Q))
711 #define _Q9toIQ(A) ((long) (A) >> (9 - GLOBAL_Q))
712 #endif
713
714 #if (GLOBAL_Q >= 8)
715 #define _IQtoIQ8(A) ((long) (A) >> (GLOBAL_Q - 8))
716 #define _IQ8toIQ(A) ((long) (A) << (GLOBAL_Q - 8))
717 #define _IQtoQ8(A) ((long) (A) >> (GLOBAL_Q - 8))
718 #define _Q8toIQ(A) ((long) (A) << (GLOBAL_Q - 8))
719 #else
720 #define _IQtoIQ8(A) ((long) (A) << (8 - GLOBAL_Q))
721 #define _IQ8toIQ(A) ((long) (A) >> (8 - GLOBAL_Q))
722 #define _IQtoQ8(A) ((long) (A) << (8 - GLOBAL_Q))
723 #define _Q8toIQ(A) ((long) (A) >> (8 - GLOBAL_Q))
724 #endif
725
726 #if (GLOBAL_Q >= 7)
727 #define _IQtoIQ7(A) ((long) (A) >> (GLOBAL_Q - 7))
728 #define _IQ7toIQ(A) ((long) (A) << (GLOBAL_Q - 7))
729 #define _IQtoQ7(A) ((long) (A) >> (GLOBAL_Q - 7))
730 #define _Q7toIQ(A) ((long) (A) << (GLOBAL_Q - 7))
731 #else
732 #define _IQtoIQ7(A) ((long) (A) << (7 - GLOBAL_Q))
733 #define _IQ7toIQ(A) ((long) (A) >> (7 - GLOBAL_Q))
734 #define _IQtoQ7(A) ((long) (A) << (7 - GLOBAL_Q))
735 #define _Q7toIQ(A) ((long) (A) >> (7 - GLOBAL_Q))
736 #endif
737
738 #if (GLOBAL_Q >= 6)
739 #define _IQtoIQ6(A) ((long) (A) >> (GLOBAL_Q - 6))
740 #define _IQ6toIQ(A) ((long) (A) << (GLOBAL_Q - 6))
741 #define _IQtoQ6(A) ((long) (A) >> (GLOBAL_Q - 6))
742 #define _Q6toIQ(A) ((long) (A) << (GLOBAL_Q - 6))
743 #else
744 #define _IQtoIQ6(A) ((long) (A) << (6 - GLOBAL_Q))
745 #define _IQ6toIQ(A) ((long) (A) >> (6 - GLOBAL_Q))
746 #define _IQtoQ6(A) ((long) (A) << (6 - GLOBAL_Q))
747 #define _Q6toIQ(A) ((long) (A) >> (6 - GLOBAL_Q))
748 #endif
749
750 #if (GLOBAL_Q >= 5)
751 #define _IQtoIQ5(A) ((long) (A) >> (GLOBAL_Q - 5))
752 #define _IQ5toIQ(A) ((long) (A) << (GLOBAL_Q - 5))
753 #define _IQtoQ5(A) ((long) (A) >> (GLOBAL_Q - 5))
754 #define _Q5toIQ(A) ((long) (A) << (GLOBAL_Q - 5))
755 #else
756 #define _IQtoIQ5(A) ((long) (A) << (5 - GLOBAL_Q))
757 #define _IQ5toIQ(A) ((long) (A) >> (5 - GLOBAL_Q))
758 #define _IQtoQ5(A) ((long) (A) << (5 - GLOBAL_Q))
759 #define _Q5toIQ(A) ((long) (A) >> (5 - GLOBAL_Q))
760 #endif
761
762 #if (GLOBAL_Q >= 4)
763 #define _IQtoIQ4(A) ((long) (A) >> (GLOBAL_Q - 4))
764 #define _IQ4toIQ(A) ((long) (A) << (GLOBAL_Q - 4))
765 #define _IQtoQ4(A) ((long) (A) >> (GLOBAL_Q - 4))
766 #define _Q4toIQ(A) ((long) (A) << (GLOBAL_Q - 4))
767 #else
768 #define _IQtoIQ4(A) ((long) (A) << (4 - GLOBAL_Q))
769 #define _IQ4toIQ(A) ((long) (A) >> (4 - GLOBAL_Q))
770 #define _IQtoQ4(A) ((long) (A) << (4 - GLOBAL_Q))
771 #define _Q4toIQ(A) ((long) (A) >> (4 - GLOBAL_Q))
772 #endif
773
774 #if (GLOBAL_Q >= 3)
775 #define _IQtoIQ3(A) ((long) (A) >> (GLOBAL_Q - 3))
776 #define _IQ3toIQ(A) ((long) (A) << (GLOBAL_Q - 3))
777 #define _IQtoQ3(A) ((long) (A) >> (GLOBAL_Q - 3))
778 #define _Q3toIQ(A) ((long) (A) << (GLOBAL_Q - 3))
779 #else
780 #define _IQtoIQ3(A) ((long) (A) << (3 - GLOBAL_Q))
781 #define _IQ3toIQ(A) ((long) (A) >> (3 - GLOBAL_Q))
782 #define _IQtoQ3(A) ((long) (A) << (3 - GLOBAL_Q))
783 #define _Q3toIQ(A) ((long) (A) >> (3 - GLOBAL_Q))
784 #endif
785
786 #if (GLOBAL_Q >= 2)
787 #define _IQtoIQ2(A) ((long) (A) >> (GLOBAL_Q - 2))
788 #define _IQ2toIQ(A) ((long) (A) << (GLOBAL_Q - 2))
789 #define _IQtoQ2(A) ((long) (A) >> (GLOBAL_Q - 2))
790 #define _Q2toIQ(A) ((long) (A) << (GLOBAL_Q - 2))
791 #else
792 #define _IQtoIQ2(A) ((long) (A) << (2 - GLOBAL_Q))
793 #define _IQ2toIQ(A) ((long) (A) >> (2 - GLOBAL_Q))
794 #define _IQtoQ2(A) ((long) (A) << (2 - GLOBAL_Q))
795 #define _Q2toIQ(A) ((long) (A) >> (2 - GLOBAL_Q))
796 #endif
797
798 #if (GLOBAL_Q >= 1)
799 #define _IQtoQ1(A) ((long) (A) >> (GLOBAL_Q - 1))
800 #define _Q1toIQ(A) ((long) (A) << (GLOBAL_Q - 1))
801 #else
802 #define _IQtoQ1(A) ((long) (A) << (1 - GLOBAL_Q))
803 #define _Q1toIQ(A) ((long) (A) >> (1 - GLOBAL_Q))
804 #endif
805
806 #define _IQtoIQ1(A) ((long) (A) >> (GLOBAL_Q - 1))
807 #define _IQ1toIQ(A) ((long) (A) << (GLOBAL_Q - 1))
808 //---------------------------------------------------------------------------
809 #define _IQmpy(A,B) __IQmpy(A,B,GLOBAL_Q)
810 #define _IQ30mpy(A,B) __IQmpy(A,B,30)
811 #define _IQ29mpy(A,B) __IQmpy(A,B,29)
812 #define _IQ28mpy(A,B) __IQmpy(A,B,28)
813 #define _IQ27mpy(A,B) __IQmpy(A,B,27)
814 #define _IQ26mpy(A,B) __IQmpy(A,B,26)
815 #define _IQ25mpy(A,B) __IQmpy(A,B,25)
816 #define _IQ24mpy(A,B) __IQmpy(A,B,24)
817 #define _IQ23mpy(A,B) __IQmpy(A,B,23)
818 #define _IQ22mpy(A,B) __IQmpy(A,B,22)
819 #define _IQ21mpy(A,B) __IQmpy(A,B,21)
820 #define _IQ20mpy(A,B) __IQmpy(A,B,20)
821 #define _IQ19mpy(A,B) __IQmpy(A,B,19)
822 #define _IQ18mpy(A,B) __IQmpy(A,B,18)
823 #define _IQ17mpy(A,B) __IQmpy(A,B,17)
824 #define _IQ16mpy(A,B) __IQmpy(A,B,16)
825 #define _IQ15mpy(A,B) __IQmpy(A,B,15)
826 #define _IQ14mpy(A,B) __IQmpy(A,B,14)
827 #define _IQ13mpy(A,B) __IQmpy(A,B,13)
828 #define _IQ12mpy(A,B) __IQmpy(A,B,12)
829 #define _IQ11mpy(A,B) __IQmpy(A,B,11)
830 #define _IQ10mpy(A,B) __IQmpy(A,B,10)
831 #define _IQ9mpy(A,B) __IQmpy(A,B,9)
832 #define _IQ8mpy(A,B) __IQmpy(A,B,8)
833 #define _IQ7mpy(A,B) __IQmpy(A,B,7)
834 #define _IQ6mpy(A,B) __IQmpy(A,B,6)
835 #define _IQ5mpy(A,B) __IQmpy(A,B,5)
836 #define _IQ4mpy(A,B) __IQmpy(A,B,4)
837 #define _IQ3mpy(A,B) __IQmpy(A,B,3)
838 #define _IQ2mpy(A,B) __IQmpy(A,B,2)
839 #define _IQ1mpy(A,B) __IQmpy(A,B,1)
840 //---------------------------------------------------------------------------
841 extern long _IQ30rmpy(long A, long B);
842 extern long _IQ29rmpy(long A, long B);
843 extern long _IQ28rmpy(long A, long B);
844 extern long _IQ27rmpy(long A, long B);
845 extern long _IQ26rmpy(long A, long B);
846 extern long _IQ25rmpy(long A, long B);
847 extern long _IQ24rmpy(long A, long B);
848 extern long _IQ23rmpy(long A, long B);
849 extern long _IQ22rmpy(long A, long B);
850 extern long _IQ21rmpy(long A, long B);
851 extern long _IQ20rmpy(long A, long B);
852 extern long _IQ19rmpy(long A, long B);
853 extern long _IQ18rmpy(long A, long B);
854 extern long _IQ17rmpy(long A, long B);
855 extern long _IQ16rmpy(long A, long B);
856 extern long _IQ15rmpy(long A, long B);
857 extern long _IQ14rmpy(long A, long B);
858 extern long _IQ13rmpy(long A, long B);
859 extern long _IQ12rmpy(long A, long B);
860 extern long _IQ11rmpy(long A, long B);
861 extern long _IQ10rmpy(long A, long B);
862 extern long _IQ9rmpy(long A, long B);
863 extern long _IQ8rmpy(long A, long B);
864 extern long _IQ7rmpy(long A, long B);
865 extern long _IQ6rmpy(long A, long B);
866 extern long _IQ5rmpy(long A, long B);
867 extern long _IQ4rmpy(long A, long B);
868 extern long _IQ3rmpy(long A, long B);
869 extern long _IQ2rmpy(long A, long B);
870 extern long _IQ1rmpy(long A, long B);
871
872 #if GLOBAL_Q == 30
873 #define _IQrmpy(A,B) _IQ30rmpy(A,B)
874 #endif
875 #if GLOBAL_Q == 29
876 #define _IQrmpy(A,B) _IQ29rmpy(A,B)
877 #endif
878 #if GLOBAL_Q == 28
879 #define _IQrmpy(A,B) _IQ28rmpy(A,B)
880 #endif
881 #if GLOBAL_Q == 27
882 #define _IQrmpy(A,B) _IQ27rmpy(A,B)
883 #endif
884 #if GLOBAL_Q == 26
885 #define _IQrmpy(A,B) _IQ26rmpy(A,B)
886 #endif
887 #if GLOBAL_Q == 25
888 #define _IQrmpy(A,B) _IQ25rmpy(A,B)
889 #endif
890 #if GLOBAL_Q == 24
891 #define _IQrmpy(A,B) _IQ24rmpy(A,B)
892 #endif
893 #if GLOBAL_Q == 23
894 #define _IQrmpy(A,B) _IQ23rmpy(A,B)
895 #endif
896 #if GLOBAL_Q == 22
897 #define _IQrmpy(A,B) _IQ22rmpy(A,B)
898 #endif
899 #if GLOBAL_Q == 21
900 #define _IQrmpy(A,B) _IQ21rmpy(A,B)
901 #endif
902 #if GLOBAL_Q == 20
903 #define _IQrmpy(A,B) _IQ20rmpy(A,B)
904 #endif
905 #if GLOBAL_Q == 19
906 #define _IQrmpy(A,B) _IQ19rmpy(A,B)
907 #endif
908 #if GLOBAL_Q == 18
909 #define _IQrmpy(A,B) _IQ18rmpy(A,B)
910 #endif
911 #if GLOBAL_Q == 17
912 #define _IQrmpy(A,B) _IQ17rmpy(A,B)
913 #endif
914 #if GLOBAL_Q == 16
915 #define _IQrmpy(A,B) _IQ16rmpy(A,B)
916 #endif
917 #if GLOBAL_Q == 15
918 #define _IQrmpy(A,B) _IQ15rmpy(A,B)
919 #endif
920 #if GLOBAL_Q == 14
921 #define _IQrmpy(A,B) _IQ14rmpy(A,B)
922 #endif
923 #if GLOBAL_Q == 13
924 #define _IQrmpy(A,B) _IQ13rmpy(A,B)
925 #endif
926 #if GLOBAL_Q == 12
927 #define _IQrmpy(A,B) _IQ12rmpy(A,B)
928 #endif
929 #if GLOBAL_Q == 11
930 #define _IQrmpy(A,B) _IQ11rmpy(A,B)
931 #endif
932 #if GLOBAL_Q == 10
933 #define _IQrmpy(A,B) _IQ10rmpy(A,B)
934 #endif
935 #if GLOBAL_Q == 9
936 #define _IQrmpy(A,B) _IQ9rmpy(A,B)
937 #endif
938 #if GLOBAL_Q == 8
939 #define _IQrmpy(A,B) _IQ8rmpy(A,B)
940 #endif
941 #if GLOBAL_Q == 7
942 #define _IQrmpy(A,B) _IQ7rmpy(A,B)
943 #endif
944 #if GLOBAL_Q == 6
945 #define _IQrmpy(A,B) _IQ6rmpy(A,B)
946 #endif
947 #if GLOBAL_Q == 5
948 #define _IQrmpy(A,B) _IQ5rmpy(A,B)
949 #endif
950 #if GLOBAL_Q == 4
951 #define _IQrmpy(A,B) _IQ4rmpy(A,B)
952 #endif
953 #if GLOBAL_Q == 3
954 #define _IQrmpy(A,B) _IQ3rmpy(A,B)
955 #endif
956 #if GLOBAL_Q == 2
957 #define _IQrmpy(A,B) _IQ2rmpy(A,B)
958 #endif
959 #if GLOBAL_Q == 1
960 #define _IQrmpy(A,B) _IQ1rmpy(A,B)
961 #endif
962 //---------------------------------------------------------------------------
963 extern long _IQ30rsmpy(long A, long B);
964 extern long _IQ29rsmpy(long A, long B);
965 extern long _IQ28rsmpy(long A, long B);
966 extern long _IQ27rsmpy(long A, long B);
967 extern long _IQ26rsmpy(long A, long B);
968 extern long _IQ25rsmpy(long A, long B);
969 extern long _IQ24rsmpy(long A, long B);
970 extern long _IQ23rsmpy(long A, long B);
971 extern long _IQ22rsmpy(long A, long B);
972 extern long _IQ21rsmpy(long A, long B);
973 extern long _IQ20rsmpy(long A, long B);
974 extern long _IQ19rsmpy(long A, long B);
975 extern long _IQ18rsmpy(long A, long B);
976 extern long _IQ17rsmpy(long A, long B);
977 extern long _IQ16rsmpy(long A, long B);
978 extern long _IQ15rsmpy(long A, long B);
979 extern long _IQ14rsmpy(long A, long B);
980 extern long _IQ13rsmpy(long A, long B);
981 extern long _IQ12rsmpy(long A, long B);
982 extern long _IQ11rsmpy(long A, long B);
983 extern long _IQ10rsmpy(long A, long B);
984 extern long _IQ9rsmpy(long A, long B);
985 extern long _IQ8rsmpy(long A, long B);
986 extern long _IQ7rsmpy(long A, long B);
987 extern long _IQ6rsmpy(long A, long B);
988 extern long _IQ5rsmpy(long A, long B);
989 extern long _IQ4rsmpy(long A, long B);
990 extern long _IQ3rsmpy(long A, long B);
991 extern long _IQ2rsmpy(long A, long B);
992 extern long _IQ1rsmpy(long A, long B);
993
994 #if GLOBAL_Q == 30
995 #define _IQrsmpy(A,B) _IQ30rsmpy(A,B)
996 #endif
997 #if GLOBAL_Q == 29
998 #define _IQrsmpy(A,B) _IQ29rsmpy(A,B)
999 #endif
1000 #if GLOBAL_Q == 28
1001 #define _IQrsmpy(A,B) _IQ28rsmpy(A,B)
1002 #endif
1003 #if GLOBAL_Q == 27
1004 #define _IQrsmpy(A,B) _IQ27rsmpy(A,B)
1005 #endif
1006 #if GLOBAL_Q == 26
1007 #define _IQrsmpy(A,B) _IQ26rsmpy(A,B)
1008 #endif
1009 #if GLOBAL_Q == 25
1010 #define _IQrsmpy(A,B) _IQ25rsmpy(A,B)
1011 #endif
1012 #if GLOBAL_Q == 24
1013 #define _IQrsmpy(A,B) _IQ24rsmpy(A,B)
1014 #endif
1015 #if GLOBAL_Q == 23
1016 #define _IQrsmpy(A,B) _IQ23rsmpy(A,B)
1017 #endif
1018 #if GLOBAL_Q == 22
1019 #define _IQrsmpy(A,B) _IQ22rsmpy(A,B)
1020 #endif
1021 #if GLOBAL_Q == 21
1022 #define _IQrsmpy(A,B) _IQ21rsmpy(A,B)
1023 #endif
1024 #if GLOBAL_Q == 20
1025 #define _IQrsmpy(A,B) _IQ20rsmpy(A,B)
1026 #endif
1027 #if GLOBAL_Q == 19
1028 #define _IQrsmpy(A,B) _IQ19rsmpy(A,B)
1029 #endif
1030 #if GLOBAL_Q == 18
1031 #define _IQrsmpy(A,B) _IQ18rsmpy(A,B)
1032 #endif
1033 #if GLOBAL_Q == 17
1034 #define _IQrsmpy(A,B) _IQ17rsmpy(A,B)
1035 #endif
1036 #if GLOBAL_Q == 16
1037 #define _IQrsmpy(A,B) _IQ16rsmpy(A,B)
1038 #endif
1039 #if GLOBAL_Q == 15
1040 #define _IQrsmpy(A,B) _IQ15rsmpy(A,B)
1041 #endif
1042 #if GLOBAL_Q == 14
1043 #define _IQrsmpy(A,B) _IQ14rsmpy(A,B)
1044 #endif
1045 #if GLOBAL_Q == 13
1046 #define _IQrsmpy(A,B) _IQ13rsmpy(A,B)
1047 #endif
1048 #if GLOBAL_Q == 12
1049 #define _IQrsmpy(A,B) _IQ12rsmpy(A,B)
1050 #endif
1051 #if GLOBAL_Q == 11
1052 #define _IQrsmpy(A,B) _IQ11rsmpy(A,B)
1053 #endif
1054 #if GLOBAL_Q == 10
1055 #define _IQrsmpy(A,B) _IQ10rsmpy(A,B)
1056 #endif
1057 #if GLOBAL_Q == 9
1058 #define _IQrsmpy(A,B) _IQ9rsmpy(A,B)
1059 #endif
1060 #if GLOBAL_Q == 8
1061 #define _IQrsmpy(A,B) _IQ8rsmpy(A,B)
1062 #endif
1063 #if GLOBAL_Q == 7
1064 #define _IQrsmpy(A,B) _IQ7rsmpy(A,B)
1065 #endif
1066 #if GLOBAL_Q == 6
1067 #define _IQrsmpy(A,B) _IQ6rsmpy(A,B)
1068 #endif
1069 #if GLOBAL_Q == 5
1070 #define _IQrsmpy(A,B) _IQ5rsmpy(A,B)
1071 #endif
1072 #if GLOBAL_Q == 4
1073 #define _IQrsmpy(A,B) _IQ4rsmpy(A,B)
1074 #endif
1075 #if GLOBAL_Q == 3
1076 #define _IQrsmpy(A,B) _IQ3rsmpy(A,B)
1077 #endif
1078 #if GLOBAL_Q == 2
1079 #define _IQrsmpy(A,B) _IQ2rsmpy(A,B)
1080 #endif
1081 #if GLOBAL_Q == 1
1082 #define _IQrsmpy(A,B) _IQ1rsmpy(A,B)
1083 #endif
1084 //---------------------------------------------------------------------------
1085 extern long _IQ30div(long A, long B);
1086 extern long _IQ29div(long A, long B);
1087 extern long _IQ28div(long A, long B);
1088 extern long _IQ27div(long A, long B);
1089 extern long _IQ26div(long A, long B);
1090 extern long _IQ25div(long A, long B);
1091 extern long _IQ24div(long A, long B);
1092 extern long _IQ23div(long A, long B);
1093 extern long _IQ22div(long A, long B);
1094 extern long _IQ21div(long A, long B);
1095 extern long _IQ20div(long A, long B);
1096 extern long _IQ19div(long A, long B);
1097 extern long _IQ18div(long A, long B);
1098 extern long _IQ17div(long A, long B);
1099 extern long _IQ16div(long A, long B);
1100 extern long _IQ15div(long A, long B);
1101 extern long _IQ14div(long A, long B);
1102 extern long _IQ13div(long A, long B);
1103 extern long _IQ12div(long A, long B);
1104 extern long _IQ11div(long A, long B);
1105 extern long _IQ10div(long A, long B);
1106 extern long _IQ9div(long A, long B);
1107 extern long _IQ8div(long A, long B);
1108 extern long _IQ7div(long A, long B);
1109 extern long _IQ6div(long A, long B);
1110 extern long _IQ5div(long A, long B);
1111 extern long _IQ4div(long A, long B);
1112 extern long _IQ3div(long A, long B);
1113 extern long _IQ2div(long A, long B);
1114 extern long _IQ1div(long A, long B);
1115
1116 #if GLOBAL_Q == 30
1117 #define _IQdiv(A,B) _IQ30div(A,B)
1118 #endif
1119 #if GLOBAL_Q == 29
1120 #define _IQdiv(A,B) _IQ29div(A,B)
1121 #endif
1122 #if GLOBAL_Q == 28
1123 #define _IQdiv(A,B) _IQ28div(A,B)
1124 #endif
1125 #if GLOBAL_Q == 27
1126 #define _IQdiv(A,B) _IQ27div(A,B)
1127 #endif
1128 #if GLOBAL_Q == 26
1129 #define _IQdiv(A,B) _IQ26div(A,B)
1130 #endif
1131 #if GLOBAL_Q == 25
1132 #define _IQdiv(A,B) _IQ25div(A,B)
1133 #endif
1134 #if GLOBAL_Q == 24
1135 #define _IQdiv(A,B) _IQ24div(A,B)
1136 #endif
1137 #if GLOBAL_Q == 23
1138 #define _IQdiv(A,B) _IQ23div(A,B)
1139 #endif
1140 #if GLOBAL_Q == 22
1141 #define _IQdiv(A,B) _IQ22div(A,B)
1142 #endif
1143 #if GLOBAL_Q == 21
1144 #define _IQdiv(A,B) _IQ21div(A,B)
1145 #endif
1146 #if GLOBAL_Q == 20
1147 #define _IQdiv(A,B) _IQ20div(A,B)
1148 #endif
1149 #if GLOBAL_Q == 19
1150 #define _IQdiv(A,B) _IQ19div(A,B)
1151 #endif
1152 #if GLOBAL_Q == 18
1153 #define _IQdiv(A,B) _IQ18div(A,B)
1154 #endif
1155 #if GLOBAL_Q == 17
1156 #define _IQdiv(A,B) _IQ17div(A,B)
1157 #endif
1158 #if GLOBAL_Q == 16
1159 #define _IQdiv(A,B) _IQ16div(A,B)
1160 #endif
1161 #if GLOBAL_Q == 15
1162 #define _IQdiv(A,B) _IQ15div(A,B)
1163 #endif
1164 #if GLOBAL_Q == 14
1165 #define _IQdiv(A,B) _IQ14div(A,B)
1166 #endif
1167 #if GLOBAL_Q == 13
1168 #define _IQdiv(A,B) _IQ13div(A,B)
1169 #endif
1170 #if GLOBAL_Q == 12
1171 #define _IQdiv(A,B) _IQ12div(A,B)
1172 #endif
1173 #if GLOBAL_Q == 11
1174 #define _IQdiv(A,B) _IQ11div(A,B)
1175 #endif
1176 #if GLOBAL_Q == 10
1177 #define _IQdiv(A,B) _IQ10div(A,B)
1178 #endif
1179 #if GLOBAL_Q == 9
1180 #define _IQdiv(A,B) _IQ9div(A,B)
1181 #endif
1182 #if GLOBAL_Q == 8
1183 #define _IQdiv(A,B) _IQ8div(A,B)
1184 #endif
1185 #if GLOBAL_Q == 7
1186 #define _IQdiv(A,B) _IQ7div(A,B)
1187 #endif
1188 #if GLOBAL_Q == 6
1189 #define _IQdiv(A,B) _IQ6div(A,B)
1190 #endif
1191 #if GLOBAL_Q == 5
1192 #define _IQdiv(A,B) _IQ5div(A,B)
1193 #endif
1194 #if GLOBAL_Q == 4
1195 #define _IQdiv(A,B) _IQ4div(A,B)
1196 #endif
1197 #if GLOBAL_Q == 3
1198 #define _IQdiv(A,B) _IQ3div(A,B)
1199 #endif
1200 #if GLOBAL_Q == 2
1201 #define _IQdiv(A,B) _IQ2div(A,B)
1202 #endif
1203 #if GLOBAL_Q == 1
1204 #define _IQdiv(A,B) _IQ1div(A,B)
1205 #endif
1206 //---------------------------------------------------------------------------
1207 extern long _IQ30sin(long A);
1208 extern long _IQ29sin(long A);
1209 extern long _IQ28sin(long A);
1210 extern long _IQ27sin(long A);
1211 extern long _IQ26sin(long A);
1212 extern long _IQ25sin(long A);
1213 extern long _IQ24sin(long A);
1214 extern long _IQ23sin(long A);
1215 extern long _IQ22sin(long A);
1216 extern long _IQ21sin(long A);
1217 extern long _IQ20sin(long A);
1218 extern long _IQ19sin(long A);
1219 extern long _IQ18sin(long A);
1220 extern long _IQ17sin(long A);
1221 extern long _IQ16sin(long A);
1222 extern long _IQ15sin(long A);
1223 extern long _IQ14sin(long A);
1224 extern long _IQ13sin(long A);
1225 extern long _IQ12sin(long A);
1226 extern long _IQ11sin(long A);
1227 extern long _IQ10sin(long A);
1228 extern long _IQ9sin(long A);
1229 extern long _IQ8sin(long A);
1230 extern long _IQ7sin(long A);
1231 extern long _IQ6sin(long A);
1232 extern long _IQ5sin(long A);
1233 extern long _IQ4sin(long A);
1234 extern long _IQ3sin(long A);
1235 extern long _IQ2sin(long A);
1236 extern long _IQ1sin(long A);
1237
1238 #if GLOBAL_Q == 30
1239 #define _IQsin(A) _IQ30sin(A)
1240 #endif
1241 #if GLOBAL_Q == 29
1242 #define _IQsin(A) _IQ29sin(A)
1243 #endif
1244 #if GLOBAL_Q == 28
1245 #define _IQsin(A) _IQ28sin(A)
1246 #endif
1247 #if GLOBAL_Q == 27
1248 #define _IQsin(A) _IQ27sin(A)
1249 #endif
1250 #if GLOBAL_Q == 26
1251 #define _IQsin(A) _IQ26sin(A)
1252 #endif
1253 #if GLOBAL_Q == 25
1254 #define _IQsin(A) _IQ25sin(A)
1255 #endif
1256 #if GLOBAL_Q == 24
1257 #define _IQsin(A) _IQ24sin(A)
1258 #endif
1259 #if GLOBAL_Q == 23
1260 #define _IQsin(A) _IQ23sin(A)
1261 #endif
1262 #if GLOBAL_Q == 22
1263 #define _IQsin(A) _IQ22sin(A)
1264 #endif
1265 #if GLOBAL_Q == 21
1266 #define _IQsin(A) _IQ21sin(A)
1267 #endif
1268 #if GLOBAL_Q == 20
1269 #define _IQsin(A) _IQ20sin(A)
1270 #endif
1271 #if GLOBAL_Q == 19
1272 #define _IQsin(A) _IQ19sin(A)
1273 #endif
1274 #if GLOBAL_Q == 18
1275 #define _IQsin(A) _IQ18sin(A)
1276 #endif
1277 #if GLOBAL_Q == 17
1278 #define _IQsin(A) _IQ17sin(A)
1279 #endif
1280 #if GLOBAL_Q == 16
1281 #define _IQsin(A) _IQ16sin(A)
1282 #endif
1283 #if GLOBAL_Q == 15
1284 #define _IQsin(A) _IQ15sin(A)
1285 #endif
1286 #if GLOBAL_Q == 14
1287 #define _IQsin(A) _IQ14sin(A)
1288 #endif
1289 #if GLOBAL_Q == 13
1290 #define _IQsin(A) _IQ13sin(A)
1291 #endif
1292 #if GLOBAL_Q == 12
1293 #define _IQsin(A) _IQ12sin(A)
1294 #endif
1295 #if GLOBAL_Q == 11
1296 #define _IQsin(A) _IQ11sin(A)
1297 #endif
1298 #if GLOBAL_Q == 10
1299 #define _IQsin(A) _IQ10sin(A)
1300 #endif
1301 #if GLOBAL_Q == 9
1302 #define _IQsin(A) _IQ9sin(A)
1303 #endif
1304 #if GLOBAL_Q == 8
1305 #define _IQsin(A) _IQ8sin(A)
1306 #endif
1307 #if GLOBAL_Q == 7
1308 #define _IQsin(A) _IQ7sin(A)
1309 #endif
1310 #if GLOBAL_Q == 6
1311 #define _IQsin(A) _IQ6sin(A)
1312 #endif
1313 #if GLOBAL_Q == 5
1314 #define _IQsin(A) _IQ5sin(A)
1315 #endif
1316 #if GLOBAL_Q == 4
1317 #define _IQsin(A) _IQ4sin(A)
1318 #endif
1319 #if GLOBAL_Q == 3
1320 #define _IQsin(A) _IQ3sin(A)
1321 #endif
1322 #if GLOBAL_Q == 2
1323 #define _IQsin(A) _IQ2sin(A)
1324 #endif
1325 #if GLOBAL_Q == 1
1326 #define _IQsin(A) _IQ1sin(A)
1327 #endif
1328 //---------------------------------------------------------------------------
1329 extern long _IQ30sinPU(long A);
1330 extern long _IQ29sinPU(long A);
1331 extern long _IQ28sinPU(long A);
1332 extern long _IQ27sinPU(long A);
1333 extern long _IQ26sinPU(long A);
1334 extern long _IQ25sinPU(long A);
1335 extern long _IQ24sinPU(long A);
1336 extern long _IQ23sinPU(long A);
1337 extern long _IQ22sinPU(long A);
1338 extern long _IQ21sinPU(long A);
1339 extern long _IQ20sinPU(long A);
1340 extern long _IQ19sinPU(long A);
1341 extern long _IQ18sinPU(long A);
1342 extern long _IQ17sinPU(long A);
1343 extern long _IQ16sinPU(long A);
1344 extern long _IQ15sinPU(long A);
1345 extern long _IQ14sinPU(long A);
1346 extern long _IQ13sinPU(long A);
1347 extern long _IQ12sinPU(long A);
1348 extern long _IQ11sinPU(long A);
1349 extern long _IQ10sinPU(long A);
1350 extern long _IQ9sinPU(long A);
1351 extern long _IQ8sinPU(long A);
1352 extern long _IQ7sinPU(long A);
1353 extern long _IQ6sinPU(long A);
1354 extern long _IQ5sinPU(long A);
1355 extern long _IQ4sinPU(long A);
1356 extern long _IQ3sinPU(long A);
1357 extern long _IQ2sinPU(long A);
1358 extern long _IQ1sinPU(long A);
1359
1360 #if GLOBAL_Q == 30
1361 #define _IQsinPU(A) _IQ30sinPU(A)
1362 #endif
1363 #if GLOBAL_Q == 29
1364 #define _IQsinPU(A) _IQ29sinPU(A)
1365 #endif
1366 #if GLOBAL_Q == 28
1367 #define _IQsinPU(A) _IQ28sinPU(A)
1368 #endif
1369 #if GLOBAL_Q == 27
1370 #define _IQsinPU(A) _IQ27sinPU(A)
1371 #endif
1372 #if GLOBAL_Q == 26
1373 #define _IQsinPU(A) _IQ26sinPU(A)
1374 #endif
1375 #if GLOBAL_Q == 25
1376 #define _IQsinPU(A) _IQ25sinPU(A)
1377 #endif
1378 #if GLOBAL_Q == 24
1379 #define _IQsinPU(A) _IQ24sinPU(A)
1380 #endif
1381 #if GLOBAL_Q == 23
1382 #define _IQsinPU(A) _IQ23sinPU(A)
1383 #endif
1384 #if GLOBAL_Q == 22
1385 #define _IQsinPU(A) _IQ22sinPU(A)
1386 #endif
1387 #if GLOBAL_Q == 21
1388 #define _IQsinPU(A) _IQ21sinPU(A)
1389 #endif
1390 #if GLOBAL_Q == 20
1391 #define _IQsinPU(A) _IQ20sinPU(A)
1392 #endif
1393 #if GLOBAL_Q == 19
1394 #define _IQsinPU(A) _IQ19sinPU(A)
1395 #endif
1396 #if GLOBAL_Q == 18
1397 #define _IQsinPU(A) _IQ18sinPU(A)
1398 #endif
1399 #if GLOBAL_Q == 17
1400 #define _IQsinPU(A) _IQ17sinPU(A)
1401 #endif
1402 #if GLOBAL_Q == 16
1403 #define _IQsinPU(A) _IQ16sinPU(A)
1404 #endif
1405 #if GLOBAL_Q == 15
1406 #define _IQsinPU(A) _IQ15sinPU(A)
1407 #endif
1408 #if GLOBAL_Q == 14
1409 #define _IQsinPU(A) _IQ14sinPU(A)
1410 #endif
1411 #if GLOBAL_Q == 13
1412 #define _IQsinPU(A) _IQ13sinPU(A)
1413 #endif
1414 #if GLOBAL_Q == 12
1415 #define _IQsinPU(A) _IQ12sinPU(A)
1416 #endif
1417 #if GLOBAL_Q == 11
1418 #define _IQsinPU(A) _IQ11sinPU(A)
1419 #endif
1420 #if GLOBAL_Q == 10
1421 #define _IQsinPU(A) _IQ10sinPU(A)
1422 #endif
1423 #if GLOBAL_Q == 9
1424 #define _IQsinPU(A) _IQ9sinPU(A)
1425 #endif
1426 #if GLOBAL_Q == 8
1427 #define _IQsinPU(A) _IQ8sinPU(A)
1428 #endif
1429 #if GLOBAL_Q == 7
1430 #define _IQsinPU(A) _IQ7sinPU(A)
1431 #endif
1432 #if GLOBAL_Q == 6
1433 #define _IQsinPU(A) _IQ6sinPU(A)
1434 #endif
1435 #if GLOBAL_Q == 5
1436 #define _IQsinPU(A) _IQ5sinPU(A)
1437 #endif
1438 #if GLOBAL_Q == 4
1439 #define _IQsinPU(A) _IQ4sinPU(A)
1440 #endif
1441 #if GLOBAL_Q == 3
1442 #define _IQsinPU(A) _IQ3sinPU(A)
1443 #endif
1444 #if GLOBAL_Q == 2
1445 #define _IQsinPU(A) _IQ2sinPU(A)
1446 #endif
1447 #if GLOBAL_Q == 1
1448 #define _IQsinPU(A) _IQ1sinPU(A)
1449 #endif
1450 //---------------------------------------------------------------------------
1451 extern long _IQ30asin(long A);
1452 extern long _IQ29asin(long A);
1453 extern long _IQ28asin(long A);
1454 extern long _IQ27asin(long A);
1455 extern long _IQ26asin(long A);
1456 extern long _IQ25asin(long A);
1457 extern long _IQ24asin(long A);
1458 extern long _IQ23asin(long A);
1459 extern long _IQ22asin(long A);
1460 extern long _IQ21asin(long A);
1461 extern long _IQ20asin(long A);
1462 extern long _IQ19asin(long A);
1463 extern long _IQ18asin(long A);
1464 extern long _IQ17asin(long A);
1465 extern long _IQ16asin(long A);
1466 extern long _IQ15asin(long A);
1467 extern long _IQ14asin(long A);
1468 extern long _IQ13asin(long A);
1469 extern long _IQ12asin(long A);
1470 extern long _IQ11asin(long A);
1471 extern long _IQ10asin(long A);
1472 extern long _IQ9asin(long A);
1473 extern long _IQ8asin(long A);
1474 extern long _IQ7asin(long A);
1475 extern long _IQ6asin(long A);
1476 extern long _IQ5asin(long A);
1477 extern long _IQ4asin(long A);
1478 extern long _IQ3asin(long A);
1479 extern long _IQ2asin(long A);
1480 extern long _IQ1asin(long A);
1481
1482 #if GLOBAL_Q == 30
1483 #define _IQasin(A) _IQ30asin(A)
1484 #endif
1485 #if GLOBAL_Q == 29
1486 #define _IQasin(A) _IQ29asin(A)
1487 #endif
1488 #if GLOBAL_Q == 28
1489 #define _IQasin(A) _IQ28asin(A)
1490 #endif
1491 #if GLOBAL_Q == 27
1492 #define _IQasin(A) _IQ27asin(A)
1493 #endif
1494 #if GLOBAL_Q == 26
1495 #define _IQasin(A) _IQ26asin(A)
1496 #endif
1497 #if GLOBAL_Q == 25
1498 #define _IQasin(A) _IQ25asin(A)
1499 #endif
1500 #if GLOBAL_Q == 24
1501 #define _IQasin(A) _IQ24asin(A)
1502 #endif
1503 #if GLOBAL_Q == 23
1504 #define _IQasin(A) _IQ23asin(A)
1505 #endif
1506 #if GLOBAL_Q == 22
1507 #define _IQasin(A) _IQ22asin(A)
1508 #endif
1509 #if GLOBAL_Q == 21
1510 #define _IQasin(A) _IQ21asin(A)
1511 #endif
1512 #if GLOBAL_Q == 20
1513 #define _IQasin(A) _IQ20asin(A)
1514 #endif
1515 #if GLOBAL_Q == 19
1516 #define _IQasin(A) _IQ19asin(A)
1517 #endif
1518 #if GLOBAL_Q == 18
1519 #define _IQasin(A) _IQ18asin(A)
1520 #endif
1521 #if GLOBAL_Q == 17
1522 #define _IQasin(A) _IQ17asin(A)
1523 #endif
1524 #if GLOBAL_Q == 16
1525 #define _IQasin(A) _IQ16asin(A)
1526 #endif
1527 #if GLOBAL_Q == 15
1528 #define _IQasin(A) _IQ15asin(A)
1529 #endif
1530 #if GLOBAL_Q == 14
1531 #define _IQasin(A) _IQ14asin(A)
1532 #endif
1533 #if GLOBAL_Q == 13
1534 #define _IQasin(A) _IQ13asin(A)
1535 #endif
1536 #if GLOBAL_Q == 12
1537 #define _IQasin(A) _IQ12asin(A)
1538 #endif
1539 #if GLOBAL_Q == 11
1540 #define _IQasin(A) _IQ11asin(A)
1541 #endif
1542 #if GLOBAL_Q == 10
1543 #define _IQasin(A) _IQ10asin(A)
1544 #endif
1545 #if GLOBAL_Q == 9
1546 #define _IQasin(A) _IQ9asin(A)
1547 #endif
1548 #if GLOBAL_Q == 8
1549 #define _IQasin(A) _IQ8asin(A)
1550 #endif
1551 #if GLOBAL_Q == 7
1552 #define _IQasin(A) _IQ7asin(A)
1553 #endif
1554 #if GLOBAL_Q == 6
1555 #define _IQasin(A) _IQ6asin(A)
1556 #endif
1557 #if GLOBAL_Q == 5
1558 #define _IQasin(A) _IQ5asin(A)
1559 #endif
1560 #if GLOBAL_Q == 4
1561 #define _IQasin(A) _IQ4asin(A)
1562 #endif
1563 #if GLOBAL_Q == 3
1564 #define _IQasin(A) _IQ3asin(A)
1565 #endif
1566 #if GLOBAL_Q == 2
1567 #define _IQasin(A) _IQ2asin(A)
1568 #endif
1569 #if GLOBAL_Q == 1
1570 #define _IQasin(A) _IQ1asin(A)
1571 #endif
1572 //---------------------------------------------------------------------------
1573 extern long _IQ30cos(long A);
1574 extern long _IQ29cos(long A);
1575 extern long _IQ28cos(long A);
1576 extern long _IQ27cos(long A);
1577 extern long _IQ26cos(long A);
1578 extern long _IQ25cos(long A);
1579 extern long _IQ24cos(long A);
1580 extern long _IQ23cos(long A);
1581 extern long _IQ22cos(long A);
1582 extern long _IQ21cos(long A);
1583 extern long _IQ20cos(long A);
1584 extern long _IQ19cos(long A);
1585 extern long _IQ18cos(long A);
1586 extern long _IQ17cos(long A);
1587 extern long _IQ16cos(long A);
1588 extern long _IQ15cos(long A);
1589 extern long _IQ14cos(long A);
1590 extern long _IQ13cos(long A);
1591 extern long _IQ12cos(long A);
1592 extern long _IQ11cos(long A);
1593 extern long _IQ10cos(long A);
1594 extern long _IQ9cos(long A);
1595 extern long _IQ8cos(long A);
1596 extern long _IQ7cos(long A);
1597 extern long _IQ6cos(long A);
1598 extern long _IQ5cos(long A);
1599 extern long _IQ4cos(long A);
1600 extern long _IQ3cos(long A);
1601 extern long _IQ2cos(long A);
1602 extern long _IQ1cos(long A);
1603
1604 #if GLOBAL_Q == 30
1605 #define _IQcos(A) _IQ30cos(A)
1606 #endif
1607 #if GLOBAL_Q == 29
1608 #define _IQcos(A) _IQ29cos(A)
1609 #endif
1610 #if GLOBAL_Q == 28
1611 #define _IQcos(A) _IQ28cos(A)
1612 #endif
1613 #if GLOBAL_Q == 27
1614 #define _IQcos(A) _IQ27cos(A)
1615 #endif
1616 #if GLOBAL_Q == 26
1617 #define _IQcos(A) _IQ26cos(A)
1618 #endif
1619 #if GLOBAL_Q == 25
1620 #define _IQcos(A) _IQ25cos(A)
1621 #endif
1622 #if GLOBAL_Q == 24
1623 #define _IQcos(A) _IQ24cos(A)
1624 #endif
1625 #if GLOBAL_Q == 23
1626 #define _IQcos(A) _IQ23cos(A)
1627 #endif
1628 #if GLOBAL_Q == 22
1629 #define _IQcos(A) _IQ22cos(A)
1630 #endif
1631 #if GLOBAL_Q == 21
1632 #define _IQcos(A) _IQ21cos(A)
1633 #endif
1634 #if GLOBAL_Q == 20
1635 #define _IQcos(A) _IQ20cos(A)
1636 #endif
1637 #if GLOBAL_Q == 19
1638 #define _IQcos(A) _IQ19cos(A)
1639 #endif
1640 #if GLOBAL_Q == 18
1641 #define _IQcos(A) _IQ18cos(A)
1642 #endif
1643 #if GLOBAL_Q == 17
1644 #define _IQcos(A) _IQ17cos(A)
1645 #endif
1646 #if GLOBAL_Q == 16
1647 #define _IQcos(A) _IQ16cos(A)
1648 #endif
1649 #if GLOBAL_Q == 15
1650 #define _IQcos(A) _IQ15cos(A)
1651 #endif
1652 #if GLOBAL_Q == 14
1653 #define _IQcos(A) _IQ14cos(A)
1654 #endif
1655 #if GLOBAL_Q == 13
1656 #define _IQcos(A) _IQ13cos(A)
1657 #endif
1658 #if GLOBAL_Q == 12
1659 #define _IQcos(A) _IQ12cos(A)
1660 #endif
1661 #if GLOBAL_Q == 11
1662 #define _IQcos(A) _IQ11cos(A)
1663 #endif
1664 #if GLOBAL_Q == 10
1665 #define _IQcos(A) _IQ10cos(A)
1666 #endif
1667 #if GLOBAL_Q == 9
1668 #define _IQcos(A) _IQ9cos(A)
1669 #endif
1670 #if GLOBAL_Q == 8
1671 #define _IQcos(A) _IQ8cos(A)
1672 #endif
1673 #if GLOBAL_Q == 7
1674 #define _IQcos(A) _IQ7cos(A)
1675 #endif
1676 #if GLOBAL_Q == 6
1677 #define _IQcos(A) _IQ6cos(A)
1678 #endif
1679 #if GLOBAL_Q == 5
1680 #define _IQcos(A) _IQ5cos(A)
1681 #endif
1682 #if GLOBAL_Q == 4
1683 #define _IQcos(A) _IQ4cos(A)
1684 #endif
1685 #if GLOBAL_Q == 3
1686 #define _IQcos(A) _IQ3cos(A)
1687 #endif
1688 #if GLOBAL_Q == 2
1689 #define _IQcos(A) _IQ2cos(A)
1690 #endif
1691 #if GLOBAL_Q == 1
1692 #define _IQcos(A) _IQ1cos(A)
1693 #endif
1694 //---------------------------------------------------------------------------
1695 extern long _IQ30cosPU(long A);
1696 extern long _IQ29cosPU(long A);
1697 extern long _IQ28cosPU(long A);
1698 extern long _IQ27cosPU(long A);
1699 extern long _IQ26cosPU(long A);
1700 extern long _IQ25cosPU(long A);
1701 extern long _IQ24cosPU(long A);
1702 extern long _IQ23cosPU(long A);
1703 extern long _IQ22cosPU(long A);
1704 extern long _IQ21cosPU(long A);
1705 extern long _IQ20cosPU(long A);
1706 extern long _IQ19cosPU(long A);
1707 extern long _IQ18cosPU(long A);
1708 extern long _IQ17cosPU(long A);
1709 extern long _IQ16cosPU(long A);
1710 extern long _IQ15cosPU(long A);
1711 extern long _IQ14cosPU(long A);
1712 extern long _IQ13cosPU(long A);
1713 extern long _IQ12cosPU(long A);
1714 extern long _IQ11cosPU(long A);
1715 extern long _IQ10cosPU(long A);
1716 extern long _IQ9cosPU(long A);
1717 extern long _IQ8cosPU(long A);
1718 extern long _IQ7cosPU(long A);
1719 extern long _IQ6cosPU(long A);
1720 extern long _IQ5cosPU(long A);
1721 extern long _IQ4cosPU(long A);
1722 extern long _IQ3cosPU(long A);
1723 extern long _IQ2cosPU(long A);
1724 extern long _IQ1cosPU(long A);
1725
1726 #if GLOBAL_Q == 30
1727 #define _IQcosPU(A) _IQ30cosPU(A)
1728 #endif
1729 #if GLOBAL_Q == 29
1730 #define _IQcosPU(A) _IQ29cosPU(A)
1731 #endif
1732 #if GLOBAL_Q == 28
1733 #define _IQcosPU(A) _IQ28cosPU(A)
1734 #endif
1735 #if GLOBAL_Q == 27
1736 #define _IQcosPU(A) _IQ27cosPU(A)
1737 #endif
1738 #if GLOBAL_Q == 26
1739 #define _IQcosPU(A) _IQ26cosPU(A)
1740 #endif
1741 #if GLOBAL_Q == 25
1742 #define _IQcosPU(A) _IQ25cosPU(A)
1743 #endif
1744 #if GLOBAL_Q == 24
1745 #define _IQcosPU(A) _IQ24cosPU(A)
1746 #endif
1747 #if GLOBAL_Q == 23
1748 #define _IQcosPU(A) _IQ23cosPU(A)
1749 #endif
1750 #if GLOBAL_Q == 22
1751 #define _IQcosPU(A) _IQ22cosPU(A)
1752 #endif
1753 #if GLOBAL_Q == 21
1754 #define _IQcosPU(A) _IQ21cosPU(A)
1755 #endif
1756 #if GLOBAL_Q == 20
1757 #define _IQcosPU(A) _IQ20cosPU(A)
1758 #endif
1759 #if GLOBAL_Q == 19
1760 #define _IQcosPU(A) _IQ19cosPU(A)
1761 #endif
1762 #if GLOBAL_Q == 18
1763 #define _IQcosPU(A) _IQ18cosPU(A)
1764 #endif
1765 #if GLOBAL_Q == 17
1766 #define _IQcosPU(A) _IQ17cosPU(A)
1767 #endif
1768 #if GLOBAL_Q == 16
1769 #define _IQcosPU(A) _IQ16cosPU(A)
1770 #endif
1771 #if GLOBAL_Q == 15
1772 #define _IQcosPU(A) _IQ15cosPU(A)
1773 #endif
1774 #if GLOBAL_Q == 14
1775 #define _IQcosPU(A) _IQ14cosPU(A)
1776 #endif
1777 #if GLOBAL_Q == 13
1778 #define _IQcosPU(A) _IQ13cosPU(A)
1779 #endif
1780 #if GLOBAL_Q == 12
1781 #define _IQcosPU(A) _IQ12cosPU(A)
1782 #endif
1783 #if GLOBAL_Q == 11
1784 #define _IQcosPU(A) _IQ11cosPU(A)
1785 #endif
1786 #if GLOBAL_Q == 10
1787 #define _IQcosPU(A) _IQ10cosPU(A)
1788 #endif
1789 #if GLOBAL_Q == 9
1790 #define _IQcosPU(A) _IQ9cosPU(A)
1791 #endif
1792 #if GLOBAL_Q == 8
1793 #define _IQcosPU(A) _IQ8cosPU(A)
1794 #endif
1795 #if GLOBAL_Q == 7
1796 #define _IQcosPU(A) _IQ7cosPU(A)
1797 #endif
1798 #if GLOBAL_Q == 6
1799 #define _IQcosPU(A) _IQ6cosPU(A)
1800 #endif
1801 #if GLOBAL_Q == 5
1802 #define _IQcosPU(A) _IQ5cosPU(A)
1803 #endif
1804 #if GLOBAL_Q == 4
1805 #define _IQcosPU(A) _IQ4cosPU(A)
1806 #endif
1807 #if GLOBAL_Q == 3
1808 #define _IQcosPU(A) _IQ3cosPU(A)
1809 #endif
1810 #if GLOBAL_Q == 2
1811 #define _IQcosPU(A) _IQ2cosPU(A)
1812 #endif
1813 #if GLOBAL_Q == 1
1814 #define _IQcosPU(A) _IQ1cosPU(A)
1815 #endif
1816 //---------------------------------------------------------------------------
1817 extern long _IQ30acos(long A);
1818 extern long _IQ29acos(long A);
1819 extern long _IQ28acos(long A);
1820 extern long _IQ27acos(long A);
1821 extern long _IQ26acos(long A);
1822 extern long _IQ25acos(long A);
1823 extern long _IQ24acos(long A);
1824 extern long _IQ23acos(long A);
1825 extern long _IQ22acos(long A);
1826 extern long _IQ21acos(long A);
1827 extern long _IQ20acos(long A);
1828 extern long _IQ19acos(long A);
1829 extern long _IQ18acos(long A);
1830 extern long _IQ17acos(long A);
1831 extern long _IQ16acos(long A);
1832 extern long _IQ15acos(long A);
1833 extern long _IQ14acos(long A);
1834 extern long _IQ13acos(long A);
1835 extern long _IQ12acos(long A);
1836 extern long _IQ11acos(long A);
1837 extern long _IQ10acos(long A);
1838 extern long _IQ9acos(long A);
1839 extern long _IQ8acos(long A);
1840 extern long _IQ7acos(long A);
1841 extern long _IQ6acos(long A);
1842 extern long _IQ5acos(long A);
1843 extern long _IQ4acos(long A);
1844 extern long _IQ3acos(long A);
1845 extern long _IQ2acos(long A);
1846 extern long _IQ1acos(long A);
1847
1848 #if GLOBAL_Q == 30
1849 #define _IQacos(A) _IQ30acos(A)
1850 #endif
1851 #if GLOBAL_Q == 29
1852 #define _IQacos(A) _IQ29acos(A)
1853 #endif
1854 #if GLOBAL_Q == 28
1855 #define _IQacos(A) _IQ28acos(A)
1856 #endif
1857 #if GLOBAL_Q == 27
1858 #define _IQacos(A) _IQ27acos(A)
1859 #endif
1860 #if GLOBAL_Q == 26
1861 #define _IQacos(A) _IQ26acos(A)
1862 #endif
1863 #if GLOBAL_Q == 25
1864 #define _IQacos(A) _IQ25acos(A)
1865 #endif
1866 #if GLOBAL_Q == 24
1867 #define _IQacos(A) _IQ24acos(A)
1868 #endif
1869 #if GLOBAL_Q == 23
1870 #define _IQacos(A) _IQ23acos(A)
1871 #endif
1872 #if GLOBAL_Q == 22
1873 #define _IQacos(A) _IQ22acos(A)
1874 #endif
1875 #if GLOBAL_Q == 21
1876 #define _IQacos(A) _IQ21acos(A)
1877 #endif
1878 #if GLOBAL_Q == 20
1879 #define _IQacos(A) _IQ20acos(A)
1880 #endif
1881 #if GLOBAL_Q == 19
1882 #define _IQacos(A) _IQ19acos(A)
1883 #endif
1884 #if GLOBAL_Q == 18
1885 #define _IQacos(A) _IQ18acos(A)
1886 #endif
1887 #if GLOBAL_Q == 17
1888 #define _IQacos(A) _IQ17acos(A)
1889 #endif
1890 #if GLOBAL_Q == 16
1891 #define _IQacos(A) _IQ16acos(A)
1892 #endif
1893 #if GLOBAL_Q == 15
1894 #define _IQacos(A) _IQ15acos(A)
1895 #endif
1896 #if GLOBAL_Q == 14
1897 #define _IQacos(A) _IQ14acos(A)
1898 #endif
1899 #if GLOBAL_Q == 13
1900 #define _IQacos(A) _IQ13acos(A)
1901 #endif
1902 #if GLOBAL_Q == 12
1903 #define _IQacos(A) _IQ12acos(A)
1904 #endif
1905 #if GLOBAL_Q == 11
1906 #define _IQacos(A) _IQ11acos(A)
1907 #endif
1908 #if GLOBAL_Q == 10
1909 #define _IQacos(A) _IQ10acos(A)
1910 #endif
1911 #if GLOBAL_Q == 9
1912 #define _IQacos(A) _IQ9acos(A)
1913 #endif
1914 #if GLOBAL_Q == 8
1915 #define _IQacos(A) _IQ8acos(A)
1916 #endif
1917 #if GLOBAL_Q == 7
1918 #define _IQacos(A) _IQ7acos(A)
1919 #endif
1920 #if GLOBAL_Q == 6
1921 #define _IQacos(A) _IQ6acos(A)
1922 #endif
1923 #if GLOBAL_Q == 5
1924 #define _IQacos(A) _IQ5acos(A)
1925 #endif
1926 #if GLOBAL_Q == 4
1927 #define _IQacos(A) _IQ4acos(A)
1928 #endif
1929 #if GLOBAL_Q == 3
1930 #define _IQacos(A) _IQ3acos(A)
1931 #endif
1932 #if GLOBAL_Q == 2
1933 #define _IQacos(A) _IQ2acos(A)
1934 #endif
1935 #if GLOBAL_Q == 1
1936 #define _IQacos(A) _IQ1acos(A)
1937 #endif
1938 //---------------------------------------------------------------------------
1939 extern long _IQ30atan2(long A, long B);
1940 extern long _IQ29atan2(long A, long B);
1941 extern long _IQ28atan2(long A, long B);
1942 extern long _IQ27atan2(long A, long B);
1943 extern long _IQ26atan2(long A, long B);
1944 extern long _IQ25atan2(long A, long B);
1945 extern long _IQ24atan2(long A, long B);
1946 extern long _IQ23atan2(long A, long B);
1947 extern long _IQ22atan2(long A, long B);
1948 extern long _IQ21atan2(long A, long B);
1949 extern long _IQ20atan2(long A, long B);
1950 extern long _IQ19atan2(long A, long B);
1951 extern long _IQ18atan2(long A, long B);
1952 extern long _IQ17atan2(long A, long B);
1953 extern long _IQ16atan2(long A, long B);
1954 extern long _IQ15atan2(long A, long B);
1955 extern long _IQ14atan2(long A, long B);
1956 extern long _IQ13atan2(long A, long B);
1957 extern long _IQ12atan2(long A, long B);
1958 extern long _IQ11atan2(long A, long B);
1959 extern long _IQ10atan2(long A, long B);
1960 extern long _IQ9atan2(long A, long B);
1961 extern long _IQ8atan2(long A, long B);
1962 extern long _IQ7atan2(long A, long B);
1963 extern long _IQ6atan2(long A, long B);
1964 extern long _IQ5atan2(long A, long B);
1965 extern long _IQ4atan2(long A, long B);
1966 extern long _IQ3atan2(long A, long B);
1967 extern long _IQ2atan2(long A, long B);
1968 extern long _IQ1atan2(long A, long B);
1969
1970 #if GLOBAL_Q == 30
1971 #define _IQatan2(A,B) _IQ30atan2(A,B)
1972 #endif
1973 #if GLOBAL_Q == 29
1974 #define _IQatan2(A,B) _IQ29atan2(A,B)
1975 #endif
1976 #if GLOBAL_Q == 28
1977 #define _IQatan2(A,B) _IQ28atan2(A,B)
1978 #endif
1979 #if GLOBAL_Q == 27
1980 #define _IQatan2(A,B) _IQ27atan2(A,B)
1981 #endif
1982 #if GLOBAL_Q == 26
1983 #define _IQatan2(A,B) _IQ26atan2(A,B)
1984 #endif
1985 #if GLOBAL_Q == 25
1986 #define _IQatan2(A,B) _IQ25atan2(A,B)
1987 #endif
1988 #if GLOBAL_Q == 24
1989 #define _IQatan2(A,B) _IQ24atan2(A,B)
1990 #endif
1991 #if GLOBAL_Q == 23
1992 #define _IQatan2(A,B) _IQ23atan2(A,B)
1993 #endif
1994 #if GLOBAL_Q == 22
1995 #define _IQatan2(A,B) _IQ22atan2(A,B)
1996 #endif
1997 #if GLOBAL_Q == 21
1998 #define _IQatan2(A,B) _IQ21atan2(A,B)
1999 #endif
2000 #if GLOBAL_Q == 20
2001 #define _IQatan2(A,B) _IQ20atan2(A,B)
2002 #endif
2003 #if GLOBAL_Q == 19
2004 #define _IQatan2(A,B) _IQ19atan2(A,B)
2005 #endif
2006 #if GLOBAL_Q == 18
2007 #define _IQatan2(A,B) _IQ18atan2(A,B)
2008 #endif
2009 #if GLOBAL_Q == 17
2010 #define _IQatan2(A,B) _IQ17atan2(A,B)
2011 #endif
2012 #if GLOBAL_Q == 16
2013 #define _IQatan2(A,B) _IQ16atan2(A,B)
2014 #endif
2015 #if GLOBAL_Q == 15
2016 #define _IQatan2(A,B) _IQ15atan2(A,B)
2017 #endif
2018 #if GLOBAL_Q == 14
2019 #define _IQatan2(A,B) _IQ14atan2(A,B)
2020 #endif
2021 #if GLOBAL_Q == 13
2022 #define _IQatan2(A,B) _IQ13atan2(A,B)
2023 #endif
2024 #if GLOBAL_Q == 12
2025 #define _IQatan2(A,B) _IQ12atan2(A,B)
2026 #endif
2027 #if GLOBAL_Q == 11
2028 #define _IQatan2(A,B) _IQ11atan2(A,B)
2029 #endif
2030 #if GLOBAL_Q == 10
2031 #define _IQatan2(A,B) _IQ10atan2(A,B)
2032 #endif
2033 #if GLOBAL_Q == 9
2034 #define _IQatan2(A,B) _IQ9atan2(A,B)
2035 #endif
2036 #if GLOBAL_Q == 8
2037 #define _IQatan2(A,B) _IQ8atan2(A,B)
2038 #endif
2039 #if GLOBAL_Q == 7
2040 #define _IQatan2(A,B) _IQ7atan2(A,B)
2041 #endif
2042 #if GLOBAL_Q == 6
2043 #define _IQatan2(A,B) _IQ6atan2(A,B)
2044 #endif
2045 #if GLOBAL_Q == 5
2046 #define _IQatan2(A,B) _IQ5atan2(A,B)
2047 #endif
2048 #if GLOBAL_Q == 4
2049 #define _IQatan2(A,B) _IQ4atan2(A,B)
2050 #endif
2051 #if GLOBAL_Q == 3
2052 #define _IQatan2(A,B) _IQ3atan2(A,B)
2053 #endif
2054 #if GLOBAL_Q == 2
2055 #define _IQatan2(A,B) _IQ2atan2(A,B)
2056 #endif
2057 #if GLOBAL_Q == 1
2058 #define _IQatan2(A,B) _IQ1atan2(A,B)
2059 #endif
2060 //---------------------------------------------------------------------------
2061 extern long _IQ30atan2PU(long A, long B);
2062 extern long _IQ29atan2PU(long A, long B);
2063 extern long _IQ28atan2PU(long A, long B);
2064 extern long _IQ27atan2PU(long A, long B);
2065 extern long _IQ26atan2PU(long A, long B);
2066 extern long _IQ25atan2PU(long A, long B);
2067 extern long _IQ24atan2PU(long A, long B);
2068 extern long _IQ23atan2PU(long A, long B);
2069 extern long _IQ22atan2PU(long A, long B);
2070 extern long _IQ21atan2PU(long A, long B);
2071 extern long _IQ20atan2PU(long A, long B);
2072 extern long _IQ19atan2PU(long A, long B);
2073 extern long _IQ18atan2PU(long A, long B);
2074 extern long _IQ17atan2PU(long A, long B);
2075 extern long _IQ16atan2PU(long A, long B);
2076 extern long _IQ15atan2PU(long A, long B);
2077 extern long _IQ14atan2PU(long A, long B);
2078 extern long _IQ13atan2PU(long A, long B);
2079 extern long _IQ12atan2PU(long A, long B);
2080 extern long _IQ11atan2PU(long A, long B);
2081 extern long _IQ10atan2PU(long A, long B);
2082 extern long _IQ9atan2PU(long A, long B);
2083 extern long _IQ8atan2PU(long A, long B);
2084 extern long _IQ7atan2PU(long A, long B);
2085 extern long _IQ6atan2PU(long A, long B);
2086 extern long _IQ5atan2PU(long A, long B);
2087 extern long _IQ4atan2PU(long A, long B);
2088 extern long _IQ3atan2PU(long A, long B);
2089 extern long _IQ2atan2PU(long A, long B);
2090 extern long _IQ1atan2PU(long A, long B);
2091
2092 #if GLOBAL_Q == 30
2093 #define _IQatan2PU(A,B) _IQ30atan2PU(A,B)
2094 #endif
2095 #if GLOBAL_Q == 29
2096 #define _IQatan2PU(A,B) _IQ29atan2PU(A,B)
2097 #endif
2098 #if GLOBAL_Q == 28
2099 #define _IQatan2PU(A,B) _IQ28atan2PU(A,B)
2100 #endif
2101 #if GLOBAL_Q == 27
2102 #define _IQatan2PU(A,B) _IQ27atan2PU(A,B)
2103 #endif
2104 #if GLOBAL_Q == 26
2105 #define _IQatan2PU(A,B) _IQ26atan2PU(A,B)
2106 #endif
2107 #if GLOBAL_Q == 25
2108 #define _IQatan2PU(A,B) _IQ25atan2PU(A,B)
2109 #endif
2110 #if GLOBAL_Q == 24
2111 #define _IQatan2PU(A,B) _IQ24atan2PU(A,B)
2112 #endif
2113 #if GLOBAL_Q == 23
2114 #define _IQatan2PU(A,B) _IQ23atan2PU(A,B)
2115 #endif
2116 #if GLOBAL_Q == 22
2117 #define _IQatan2PU(A,B) _IQ22atan2PU(A,B)
2118 #endif
2119 #if GLOBAL_Q == 21
2120 #define _IQatan2PU(A,B) _IQ21atan2PU(A,B)
2121 #endif
2122 #if GLOBAL_Q == 20
2123 #define _IQatan2PU(A,B) _IQ20atan2PU(A,B)
2124 #endif
2125 #if GLOBAL_Q == 19
2126 #define _IQatan2PU(A,B) _IQ19atan2PU(A,B)
2127 #endif
2128 #if GLOBAL_Q == 18
2129 #define _IQatan2PU(A,B) _IQ18atan2PU(A,B)
2130 #endif
2131 #if GLOBAL_Q == 17
2132 #define _IQatan2PU(A,B) _IQ17atan2PU(A,B)
2133 #endif
2134 #if GLOBAL_Q == 16
2135 #define _IQatan2PU(A,B) _IQ16atan2PU(A,B)
2136 #endif
2137 #if GLOBAL_Q == 15
2138 #define _IQatan2PU(A,B) _IQ15atan2PU(A,B)
2139 #endif
2140 #if GLOBAL_Q == 14
2141 #define _IQatan2PU(A,B) _IQ14atan2PU(A,B)
2142 #endif
2143 #if GLOBAL_Q == 13
2144 #define _IQatan2PU(A,B) _IQ13atan2PU(A,B)
2145 #endif
2146 #if GLOBAL_Q == 12
2147 #define _IQatan2PU(A,B) _IQ12atan2PU(A,B)
2148 #endif
2149 #if GLOBAL_Q == 11
2150 #define _IQatan2PU(A,B) _IQ11atan2PU(A,B)
2151 #endif
2152 #if GLOBAL_Q == 10
2153 #define _IQatan2PU(A,B) _IQ10atan2PU(A,B)
2154 #endif
2155 #if GLOBAL_Q == 9
2156 #define _IQatan2PU(A,B) _IQ9atan2PU(A,B)
2157 #endif
2158 #if GLOBAL_Q == 8
2159 #define _IQatan2PU(A,B) _IQ8atan2PU(A,B)
2160 #endif
2161 #if GLOBAL_Q == 7
2162 #define _IQatan2PU(A,B) _IQ7atan2PU(A,B)
2163 #endif
2164 #if GLOBAL_Q == 6
2165 #define _IQatan2PU(A,B) _IQ6atan2PU(A,B)
2166 #endif
2167 #if GLOBAL_Q == 5
2168 #define _IQatan2PU(A,B) _IQ5atan2PU(A,B)
2169 #endif
2170 #if GLOBAL_Q == 4
2171 #define _IQatan2PU(A,B) _IQ4atan2PU(A,B)
2172 #endif
2173 #if GLOBAL_Q == 3
2174 #define _IQatan2PU(A,B) _IQ3atan2PU(A,B)
2175 #endif
2176 #if GLOBAL_Q == 2
2177 #define _IQatan2PU(A,B) _IQ2atan2PU(A,B)
2178 #endif
2179 #if GLOBAL_Q == 1
2180 #define _IQatan2PU(A,B) _IQ1atan2PU(A,B)
2181 #endif
2182 //---------------------------------------------------------------------------
2183 #define _IQ30atan(A) _IQ30atan2(A,_IQ30(1.0))
2184 #define _IQ29atan(A) _IQ29atan2(A,_IQ29(1.0))
2185 #define _IQ28atan(A) _IQ28atan2(A,_IQ28(1.0))
2186 #define _IQ27atan(A) _IQ27atan2(A,_IQ27(1.0))
2187 #define _IQ26atan(A) _IQ26atan2(A,_IQ26(1.0))
2188 #define _IQ25atan(A) _IQ25atan2(A,_IQ25(1.0))
2189 #define _IQ24atan(A) _IQ24atan2(A,_IQ24(1.0))
2190 #define _IQ23atan(A) _IQ23atan2(A,_IQ23(1.0))
2191 #define _IQ22atan(A) _IQ22atan2(A,_IQ22(1.0))
2192 #define _IQ21atan(A) _IQ21atan2(A,_IQ21(1.0))
2193 #define _IQ20atan(A) _IQ20atan2(A,_IQ20(1.0))
2194 #define _IQ19atan(A) _IQ19atan2(A,_IQ19(1.0))
2195 #define _IQ18atan(A) _IQ18atan2(A,_IQ18(1.0))
2196 #define _IQ17atan(A) _IQ17atan2(A,_IQ17(1.0))
2197 #define _IQ16atan(A) _IQ16atan2(A,_IQ16(1.0))
2198 #define _IQ15atan(A) _IQ15atan2(A,_IQ15(1.0))
2199 #define _IQ14atan(A) _IQ14atan2(A,_IQ14(1.0))
2200 #define _IQ13atan(A) _IQ13atan2(A,_IQ13(1.0))
2201 #define _IQ12atan(A) _IQ12atan2(A,_IQ12(1.0))
2202 #define _IQ11atan(A) _IQ11atan2(A,_IQ11(1.0))
2203 #define _IQ10atan(A) _IQ10atan2(A,_IQ10(1.0))
2204 #define _IQ9atan(A) _IQ9atan2(A,_IQ9(1.0))
2205 #define _IQ8atan(A) _IQ8atan2(A,_IQ8(1.0))
2206 #define _IQ7atan(A) _IQ7atan2(A,_IQ7(1.0))
2207 #define _IQ6atan(A) _IQ6atan2(A,_IQ6(1.0))
2208 #define _IQ5atan(A) _IQ5atan2(A,_IQ5(1.0))
2209 #define _IQ4atan(A) _IQ4atan2(A,_IQ4(1.0))
2210 #define _IQ3atan(A) _IQ3atan2(A,_IQ3(1.0))
2211 #define _IQ2atan(A) _IQ2atan2(A,_IQ2(1.0))
2212 #define _IQ1atan(A) _IQ1atan2(A,_IQ1(1.0))
2213 #if GLOBAL_Q == 30
2214 #define _IQatan(A) _IQ30atan2(A,_IQ(1.0))
2215 #endif
2216 #if GLOBAL_Q == 29
2217 #define _IQatan(A) _IQ29atan2(A,_IQ(1.0))
2218 #endif
2219 #if GLOBAL_Q == 28
2220 #define _IQatan(A) _IQ28atan2(A,_IQ(1.0))
2221 #endif
2222 #if GLOBAL_Q == 27
2223 #define _IQatan(A) _IQ27atan2(A,_IQ(1.0))
2224 #endif
2225 #if GLOBAL_Q == 26
2226 #define _IQatan(A) _IQ26atan2(A,_IQ(1.0))
2227 #endif
2228 #if GLOBAL_Q == 25
2229 #define _IQatan(A) _IQ25atan2(A,_IQ(1.0))
2230 #endif
2231 #if GLOBAL_Q == 24
2232 #define _IQatan(A) _IQ24atan2(A,_IQ(1.0))
2233 #endif
2234 #if GLOBAL_Q == 23
2235 #define _IQatan(A) _IQ23atan2(A,_IQ(1.0))
2236 #endif
2237 #if GLOBAL_Q == 22
2238 #define _IQatan(A) _IQ22atan2(A,_IQ(1.0))
2239 #endif
2240 #if GLOBAL_Q == 21
2241 #define _IQatan(A) _IQ21atan2(A,_IQ(1.0))
2242 #endif
2243 #if GLOBAL_Q == 20
2244 #define _IQatan(A) _IQ20atan2(A,_IQ(1.0))
2245 #endif
2246 #if GLOBAL_Q == 19
2247 #define _IQatan(A) _IQ19atan2(A,_IQ(1.0))
2248 #endif
2249 #if GLOBAL_Q == 18
2250 #define _IQatan(A) _IQ18atan2(A,_IQ(1.0))
2251 #endif
2252 #if GLOBAL_Q == 17
2253 #define _IQatan(A) _IQ17atan2(A,_IQ(1.0))
2254 #endif
2255 #if GLOBAL_Q == 16
2256 #define _IQatan(A) _IQ16atan2(A,_IQ(1.0))
2257 #endif
2258 #if GLOBAL_Q == 15
2259 #define _IQatan(A) _IQ15atan2(A,_IQ(1.0))
2260 #endif
2261 #if GLOBAL_Q == 14
2262 #define _IQatan(A) _IQ14atan2(A,_IQ(1.0))
2263 #endif
2264 #if GLOBAL_Q == 13
2265 #define _IQatan(A) _IQ13atan2(A,_IQ(1.0))
2266 #endif
2267 #if GLOBAL_Q == 12
2268 #define _IQatan(A) _IQ12atan2(A,_IQ(1.0))
2269 #endif
2270 #if GLOBAL_Q == 11
2271 #define _IQatan(A) _IQ11atan2(A,_IQ(1.0))
2272 #endif
2273 #if GLOBAL_Q == 10
2274 #define _IQatan(A) _IQ10atan2(A,_IQ(1.0))
2275 #endif
2276 #if GLOBAL_Q == 9
2277 #define _IQatan(A) _IQ9atan2(A,_IQ(1.0))
2278 #endif
2279 #if GLOBAL_Q == 8
2280 #define _IQatan(A) _IQ8atan2(A,_IQ(1.0))
2281 #endif
2282 #if GLOBAL_Q == 7
2283 #define _IQatan(A) _IQ7atan2(A,_IQ(1.0))
2284 #endif
2285 #if GLOBAL_Q == 6
2286 #define _IQatan(A) _IQ6atan2(A,_IQ(1.0))
2287 #endif
2288 #if GLOBAL_Q == 5
2289 #define _IQatan(A) _IQ5atan2(A,_IQ(1.0))
2290 #endif
2291 #if GLOBAL_Q == 4
2292 #define _IQatan(A) _IQ4atan2(A,_IQ(1.0))
2293 #endif
2294 #if GLOBAL_Q == 3
2295 #define _IQatan(A) _IQ3atan2(A,_IQ(1.0))
2296 #endif
2297 #if GLOBAL_Q == 2
2298 #define _IQatan(A) _IQ2atan2(A,_IQ(1.0))
2299 #endif
2300 #if GLOBAL_Q == 1
2301 #define _IQatan(A) _IQ1atan2(A,_IQ(1.0))
2302 #endif
2303 //---------------------------------------------------------------------------
2304 extern long _IQ30sqrt(long A);
2305 extern long _IQ29sqrt(long A);
2306 extern long _IQ28sqrt(long A);
2307 extern long _IQ27sqrt(long A);
2308 extern long _IQ26sqrt(long A);
2309 extern long _IQ25sqrt(long A);
2310 extern long _IQ24sqrt(long A);
2311 extern long _IQ23sqrt(long A);
2312 extern long _IQ22sqrt(long A);
2313 extern long _IQ21sqrt(long A);
2314 extern long _IQ20sqrt(long A);
2315 extern long _IQ19sqrt(long A);
2316 extern long _IQ18sqrt(long A);
2317 extern long _IQ17sqrt(long A);
2318 extern long _IQ16sqrt(long A);
2319 extern long _IQ15sqrt(long A);
2320 extern long _IQ14sqrt(long A);
2321 extern long _IQ13sqrt(long A);
2322 extern long _IQ12sqrt(long A);
2323 extern long _IQ11sqrt(long A);
2324 extern long _IQ10sqrt(long A);
2325 extern long _IQ9sqrt(long A);
2326 extern long _IQ8sqrt(long A);
2327 extern long _IQ7sqrt(long A);
2328 extern long _IQ6sqrt(long A);
2329 extern long _IQ5sqrt(long A);
2330 extern long _IQ4sqrt(long A);
2331 extern long _IQ3sqrt(long A);
2332 extern long _IQ2sqrt(long A);
2333 extern long _IQ1sqrt(long A);
2334
2335 #if GLOBAL_Q == 30
2336 #define _IQsqrt(A) _IQ30sqrt(A)
2337 #endif
2338 #if GLOBAL_Q == 29
2339 #define _IQsqrt(A) _IQ29sqrt(A)
2340 #endif
2341 #if GLOBAL_Q == 28
2342 #define _IQsqrt(A) _IQ28sqrt(A)
2343 #endif
2344 #if GLOBAL_Q == 27
2345 #define _IQsqrt(A) _IQ27sqrt(A)
2346 #endif
2347 #if GLOBAL_Q == 26
2348 #define _IQsqrt(A) _IQ26sqrt(A)
2349 #endif
2350 #if GLOBAL_Q == 25
2351 #define _IQsqrt(A) _IQ25sqrt(A)
2352 #endif
2353 #if GLOBAL_Q == 24
2354 #define _IQsqrt(A) _IQ24sqrt(A)
2355 #endif
2356 #if GLOBAL_Q == 23
2357 #define _IQsqrt(A) _IQ23sqrt(A)
2358 #endif
2359 #if GLOBAL_Q == 22
2360 #define _IQsqrt(A) _IQ22sqrt(A)
2361 #endif
2362 #if GLOBAL_Q == 21
2363 #define _IQsqrt(A) _IQ21sqrt(A)
2364 #endif
2365 #if GLOBAL_Q == 20
2366 #define _IQsqrt(A) _IQ20sqrt(A)
2367 #endif
2368 #if GLOBAL_Q == 19
2369 #define _IQsqrt(A) _IQ19sqrt(A)
2370 #endif
2371 #if GLOBAL_Q == 18
2372 #define _IQsqrt(A) _IQ18sqrt(A)
2373 #endif
2374 #if GLOBAL_Q == 17
2375 #define _IQsqrt(A) _IQ17sqrt(A)
2376 #endif
2377 #if GLOBAL_Q == 16
2378 #define _IQsqrt(A) _IQ16sqrt(A)
2379 #endif
2380 #if GLOBAL_Q == 15
2381 #define _IQsqrt(A) _IQ15sqrt(A)
2382 #endif
2383 #if GLOBAL_Q == 14
2384 #define _IQsqrt(A) _IQ14sqrt(A)
2385 #endif
2386 #if GLOBAL_Q == 13
2387 #define _IQsqrt(A) _IQ13sqrt(A)
2388 #endif
2389 #if GLOBAL_Q == 12
2390 #define _IQsqrt(A) _IQ12sqrt(A)
2391 #endif
2392 #if GLOBAL_Q == 11
2393 #define _IQsqrt(A) _IQ11sqrt(A)
2394 #endif
2395 #if GLOBAL_Q == 10
2396 #define _IQsqrt(A) _IQ10sqrt(A)
2397 #endif
2398 #if GLOBAL_Q == 9
2399 #define _IQsqrt(A) _IQ9sqrt(A)
2400 #endif
2401 #if GLOBAL_Q == 8
2402 #define _IQsqrt(A) _IQ8sqrt(A)
2403 #endif
2404 #if GLOBAL_Q == 7
2405 #define _IQsqrt(A) _IQ7sqrt(A)
2406 #endif
2407 #if GLOBAL_Q == 6
2408 #define _IQsqrt(A) _IQ6sqrt(A)
2409 #endif
2410 #if GLOBAL_Q == 5
2411 #define _IQsqrt(A) _IQ5sqrt(A)
2412 #endif
2413 #if GLOBAL_Q == 4
2414 #define _IQsqrt(A) _IQ4sqrt(A)
2415 #endif
2416 #if GLOBAL_Q == 3
2417 #define _IQsqrt(A) _IQ3sqrt(A)
2418 #endif
2419 #if GLOBAL_Q == 2
2420 #define _IQsqrt(A) _IQ2sqrt(A)
2421 #endif
2422 #if GLOBAL_Q == 1
2423 #define _IQsqrt(A) _IQ1sqrt(A)
2424 #endif
2425 //---------------------------------------------------------------------------
2426 extern long _IQ30isqrt(long A);
2427 extern long _IQ29isqrt(long A);
2428 extern long _IQ28isqrt(long A);
2429 extern long _IQ27isqrt(long A);
2430 extern long _IQ26isqrt(long A);
2431 extern long _IQ25isqrt(long A);
2432 extern long _IQ24isqrt(long A);
2433 extern long _IQ23isqrt(long A);
2434 extern long _IQ22isqrt(long A);
2435 extern long _IQ21isqrt(long A);
2436 extern long _IQ20isqrt(long A);
2437 extern long _IQ19isqrt(long A);
2438 extern long _IQ18isqrt(long A);
2439 extern long _IQ17isqrt(long A);
2440 extern long _IQ16isqrt(long A);
2441 extern long _IQ15isqrt(long A);
2442 extern long _IQ14isqrt(long A);
2443 extern long _IQ13isqrt(long A);
2444 extern long _IQ12isqrt(long A);
2445 extern long _IQ11isqrt(long A);
2446 extern long _IQ10isqrt(long A);
2447 extern long _IQ9isqrt(long A);
2448 extern long _IQ8isqrt(long A);
2449 extern long _IQ7isqrt(long A);
2450 extern long _IQ6isqrt(long A);
2451 extern long _IQ5isqrt(long A);
2452 extern long _IQ4isqrt(long A);
2453 extern long _IQ3isqrt(long A);
2454 extern long _IQ2isqrt(long A);
2455 extern long _IQ1isqrt(long A);
2456
2457 #if GLOBAL_Q == 30
2458 #define _IQisqrt(A) _IQ30isqrt(A)
2459 #endif
2460 #if GLOBAL_Q == 29
2461 #define _IQisqrt(A) _IQ29isqrt(A)
2462 #endif
2463 #if GLOBAL_Q == 28
2464 #define _IQisqrt(A) _IQ28isqrt(A)
2465 #endif
2466 #if GLOBAL_Q == 27
2467 #define _IQisqrt(A) _IQ27isqrt(A)
2468 #endif
2469 #if GLOBAL_Q == 26
2470 #define _IQisqrt(A) _IQ26isqrt(A)
2471 #endif
2472 #if GLOBAL_Q == 25
2473 #define _IQisqrt(A) _IQ25isqrt(A)
2474 #endif
2475 #if GLOBAL_Q == 24
2476 #define _IQisqrt(A) _IQ24isqrt(A)
2477 #endif
2478 #if GLOBAL_Q == 23
2479 #define _IQisqrt(A) _IQ23isqrt(A)
2480 #endif
2481 #if GLOBAL_Q == 22
2482 #define _IQisqrt(A) _IQ22isqrt(A)
2483 #endif
2484 #if GLOBAL_Q == 21
2485 #define _IQisqrt(A) _IQ21isqrt(A)
2486 #endif
2487 #if GLOBAL_Q == 20
2488 #define _IQisqrt(A) _IQ20isqrt(A)
2489 #endif
2490 #if GLOBAL_Q == 19
2491 #define _IQisqrt(A) _IQ19isqrt(A)
2492 #endif
2493 #if GLOBAL_Q == 18
2494 #define _IQisqrt(A) _IQ18isqrt(A)
2495 #endif
2496 #if GLOBAL_Q == 17
2497 #define _IQisqrt(A) _IQ17isqrt(A)
2498 #endif
2499 #if GLOBAL_Q == 16
2500 #define _IQisqrt(A) _IQ16isqrt(A)
2501 #endif
2502 #if GLOBAL_Q == 15
2503 #define _IQisqrt(A) _IQ15isqrt(A)
2504 #endif
2505 #if GLOBAL_Q == 14
2506 #define _IQisqrt(A) _IQ14isqrt(A)
2507 #endif
2508 #if GLOBAL_Q == 13
2509 #define _IQisqrt(A) _IQ13isqrt(A)
2510 #endif
2511 #if GLOBAL_Q == 12
2512 #define _IQisqrt(A) _IQ12isqrt(A)
2513 #endif
2514 #if GLOBAL_Q == 11
2515 #define _IQisqrt(A) _IQ11isqrt(A)
2516 #endif
2517 #if GLOBAL_Q == 10
2518 #define _IQisqrt(A) _IQ10isqrt(A)
2519 #endif
2520 #if GLOBAL_Q == 9
2521 #define _IQisqrt(A) _IQ9isqrt(A)
2522 #endif
2523 #if GLOBAL_Q == 8
2524 #define _IQisqrt(A) _IQ8isqrt(A)
2525 #endif
2526 #if GLOBAL_Q == 7
2527 #define _IQisqrt(A) _IQ7isqrt(A)
2528 #endif
2529 #if GLOBAL_Q == 6
2530 #define _IQisqrt(A) _IQ6isqrt(A)
2531 #endif
2532 #if GLOBAL_Q == 5
2533 #define _IQisqrt(A) _IQ5isqrt(A)
2534 #endif
2535 #if GLOBAL_Q == 4
2536 #define _IQisqrt(A) _IQ4isqrt(A)
2537 #endif
2538 #if GLOBAL_Q == 3
2539 #define _IQisqrt(A) _IQ3isqrt(A)
2540 #endif
2541 #if GLOBAL_Q == 2
2542 #define _IQisqrt(A) _IQ2isqrt(A)
2543 #endif
2544 #if GLOBAL_Q == 1
2545 #define _IQisqrt(A) _IQ1isqrt(A)
2546 #endif
2547 //---------------------------------------------------------------------------
2548 extern long _IQ30exp(long A);
2549 extern long _IQ29exp(long A);
2550 extern long _IQ28exp(long A);
2551 extern long _IQ27exp(long A);
2552 extern long _IQ26exp(long A);
2553 extern long _IQ25exp(long A);
2554 extern long _IQ24exp(long A);
2555 extern long _IQ23exp(long A);
2556 extern long _IQ22exp(long A);
2557 extern long _IQ21exp(long A);
2558 extern long _IQ20exp(long A);
2559 extern long _IQ19exp(long A);
2560 extern long _IQ18exp(long A);
2561 extern long _IQ17exp(long A);
2562 extern long _IQ16exp(long A);
2563 extern long _IQ15exp(long A);
2564 extern long _IQ14exp(long A);
2565 extern long _IQ13exp(long A);
2566 extern long _IQ12exp(long A);
2567 extern long _IQ11exp(long A);
2568 extern long _IQ10exp(long A);
2569 extern long _IQ9exp(long A);
2570 extern long _IQ8exp(long A);
2571 extern long _IQ7exp(long A);
2572 extern long _IQ6exp(long A);
2573 extern long _IQ5exp(long A);
2574 extern long _IQ4exp(long A);
2575 extern long _IQ3exp(long A);
2576 extern long _IQ2exp(long A);
2577 extern long _IQ1exp(long A);
2578
2579 #if GLOBAL_Q == 30
2580 #define _IQexp(A) _IQ30exp(A)
2581 #endif
2582 #if GLOBAL_Q == 29
2583 #define _IQexp(A) _IQ29exp(A)
2584 #endif
2585 #if GLOBAL_Q == 28
2586 #define _IQexp(A) _IQ28exp(A)
2587 #endif
2588 #if GLOBAL_Q == 27
2589 #define _IQexp(A) _IQ27exp(A)
2590 #endif
2591 #if GLOBAL_Q == 26
2592 #define _IQexp(A) _IQ26exp(A)
2593 #endif
2594 #if GLOBAL_Q == 25
2595 #define _IQexp(A) _IQ25exp(A)
2596 #endif
2597 #if GLOBAL_Q == 24
2598 #define _IQexp(A) _IQ24exp(A)
2599 #endif
2600 #if GLOBAL_Q == 23
2601 #define _IQexp(A) _IQ23exp(A)
2602 #endif
2603 #if GLOBAL_Q == 22
2604 #define _IQexp(A) _IQ22exp(A)
2605 #endif
2606 #if GLOBAL_Q == 21
2607 #define _IQexp(A) _IQ21exp(A)
2608 #endif
2609 #if GLOBAL_Q == 20
2610 #define _IQexp(A) _IQ20exp(A)
2611 #endif
2612 #if GLOBAL_Q == 19
2613 #define _IQexp(A) _IQ19exp(A)
2614 #endif
2615 #if GLOBAL_Q == 18
2616 #define _IQexp(A) _IQ18exp(A)
2617 #endif
2618 #if GLOBAL_Q == 17
2619 #define _IQexp(A) _IQ17exp(A)
2620 #endif
2621 #if GLOBAL_Q == 16
2622 #define _IQexp(A) _IQ16exp(A)
2623 #endif
2624 #if GLOBAL_Q == 15
2625 #define _IQexp(A) _IQ15exp(A)
2626 #endif
2627 #if GLOBAL_Q == 14
2628 #define _IQexp(A) _IQ14exp(A)
2629 #endif
2630 #if GLOBAL_Q == 13
2631 #define _IQexp(A) _IQ13exp(A)
2632 #endif
2633 #if GLOBAL_Q == 12
2634 #define _IQexp(A) _IQ12exp(A)
2635 #endif
2636 #if GLOBAL_Q == 11
2637 #define _IQexp(A) _IQ11exp(A)
2638 #endif
2639 #if GLOBAL_Q == 10
2640 #define _IQexp(A) _IQ10exp(A)
2641 #endif
2642 #if GLOBAL_Q == 9
2643 #define _IQexp(A) _IQ9exp(A)
2644 #endif
2645 #if GLOBAL_Q == 8
2646 #define _IQexp(A) _IQ8exp(A)
2647 #endif
2648 #if GLOBAL_Q == 7
2649 #define _IQexp(A) _IQ7exp(A)
2650 #endif
2651 #if GLOBAL_Q == 6
2652 #define _IQexp(A) _IQ6exp(A)
2653 #endif
2654 #if GLOBAL_Q == 5
2655 #define _IQexp(A) _IQ5exp(A)
2656 #endif
2657 #if GLOBAL_Q == 4
2658 #define _IQexp(A) _IQ4exp(A)
2659 #endif
2660 #if GLOBAL_Q == 3
2661 #define _IQexp(A) _IQ3exp(A)
2662 #endif
2663 #if GLOBAL_Q == 2
2664 #define _IQexp(A) _IQ2exp(A)
2665 #endif
2666 #if GLOBAL_Q == 1
2667 #define _IQexp(A) _IQ1exp(A)
2668 #endif
2669 //---------------------------------------------------------------------------
2670 extern long _IQ30int(long A);
2671 extern long _IQ29int(long A);
2672 extern long _IQ28int(long A);
2673 extern long _IQ27int(long A);
2674 extern long _IQ26int(long A);
2675 extern long _IQ25int(long A);
2676 extern long _IQ24int(long A);
2677 extern long _IQ23int(long A);
2678 extern long _IQ22int(long A);
2679 extern long _IQ21int(long A);
2680 extern long _IQ20int(long A);
2681 extern long _IQ19int(long A);
2682 extern long _IQ18int(long A);
2683 extern long _IQ17int(long A);
2684 extern long _IQ16int(long A);
2685 extern long _IQ15int(long A);
2686 extern long _IQ14int(long A);
2687 extern long _IQ13int(long A);
2688 extern long _IQ12int(long A);
2689 extern long _IQ11int(long A);
2690 extern long _IQ10int(long A);
2691 extern long _IQ9int(long A);
2692 extern long _IQ8int(long A);
2693 extern long _IQ7int(long A);
2694 extern long _IQ6int(long A);
2695 extern long _IQ5int(long A);
2696 extern long _IQ4int(long A);
2697 extern long _IQ3int(long A);
2698 extern long _IQ2int(long A);
2699 extern long _IQ1int(long A);
2700
2701 #if GLOBAL_Q == 30
2702 #define _IQint(A) _IQ30int(A)
2703 #endif
2704 #if GLOBAL_Q == 29
2705 #define _IQint(A) _IQ29int(A)
2706 #endif
2707 #if GLOBAL_Q == 28
2708 #define _IQint(A) _IQ28int(A)
2709 #endif
2710 #if GLOBAL_Q == 27
2711 #define _IQint(A) _IQ27int(A)
2712 #endif
2713 #if GLOBAL_Q == 26
2714 #define _IQint(A) _IQ26int(A)
2715 #endif
2716 #if GLOBAL_Q == 25
2717 #define _IQint(A) _IQ25int(A)
2718 #endif
2719 #if GLOBAL_Q == 24
2720 #define _IQint(A) _IQ24int(A)
2721 #endif
2722 #if GLOBAL_Q == 23
2723 #define _IQint(A) _IQ23int(A)
2724 #endif
2725 #if GLOBAL_Q == 22
2726 #define _IQint(A) _IQ22int(A)
2727 #endif
2728 #if GLOBAL_Q == 21
2729 #define _IQint(A) _IQ21int(A)
2730 #endif
2731 #if GLOBAL_Q == 20
2732 #define _IQint(A) _IQ20int(A)
2733 #endif
2734 #if GLOBAL_Q == 19
2735 #define _IQint(A) _IQ19int(A)
2736 #endif
2737 #if GLOBAL_Q == 18
2738 #define _IQint(A) _IQ18int(A)
2739 #endif
2740 #if GLOBAL_Q == 17
2741 #define _IQint(A) _IQ17int(A)
2742 #endif
2743 #if GLOBAL_Q == 16
2744 #define _IQint(A) _IQ16int(A)
2745 #endif
2746 #if GLOBAL_Q == 15
2747 #define _IQint(A) _IQ15int(A)
2748 #endif
2749 #if GLOBAL_Q == 14
2750 #define _IQint(A) _IQ14int(A)
2751 #endif
2752 #if GLOBAL_Q == 13
2753 #define _IQint(A) _IQ13int(A)
2754 #endif
2755 #if GLOBAL_Q == 12
2756 #define _IQint(A) _IQ12int(A)
2757 #endif
2758 #if GLOBAL_Q == 11
2759 #define _IQint(A) _IQ11int(A)
2760 #endif
2761 #if GLOBAL_Q == 10
2762 #define _IQint(A) _IQ10int(A)
2763 #endif
2764 #if GLOBAL_Q == 9
2765 #define _IQint(A) _IQ9int(A)
2766 #endif
2767 #if GLOBAL_Q == 8
2768 #define _IQint(A) _IQ8int(A)
2769 #endif
2770 #if GLOBAL_Q == 7
2771 #define _IQint(A) _IQ7int(A)
2772 #endif
2773 #if GLOBAL_Q == 6
2774 #define _IQint(A) _IQ6int(A)
2775 #endif
2776 #if GLOBAL_Q == 5
2777 #define _IQint(A) _IQ5int(A)
2778 #endif
2779 #if GLOBAL_Q == 4
2780 #define _IQint(A) _IQ4int(A)
2781 #endif
2782 #if GLOBAL_Q == 3
2783 #define _IQint(A) _IQ3int(A)
2784 #endif
2785 #if GLOBAL_Q == 2
2786 #define _IQint(A) _IQ2int(A)
2787 #endif
2788 #if GLOBAL_Q == 1
2789 #define _IQint(A) _IQ1int(A)
2790 #endif
2791 //---------------------------------------------------------------------------
2792 extern long _IQ30frac(long A);
2793 extern long _IQ29frac(long A);
2794 extern long _IQ28frac(long A);
2795 extern long _IQ27frac(long A);
2796 extern long _IQ26frac(long A);
2797 extern long _IQ25frac(long A);
2798 extern long _IQ24frac(long A);
2799 extern long _IQ23frac(long A);
2800 extern long _IQ22frac(long A);
2801 extern long _IQ21frac(long A);
2802 extern long _IQ20frac(long A);
2803 extern long _IQ19frac(long A);
2804 extern long _IQ18frac(long A);
2805 extern long _IQ17frac(long A);
2806 extern long _IQ16frac(long A);
2807 extern long _IQ15frac(long A);
2808 extern long _IQ14frac(long A);
2809 extern long _IQ13frac(long A);
2810 extern long _IQ12frac(long A);
2811 extern long _IQ11frac(long A);
2812 extern long _IQ10frac(long A);
2813 extern long _IQ9frac(long A);
2814 extern long _IQ8frac(long A);
2815 extern long _IQ7frac(long A);
2816 extern long _IQ6frac(long A);
2817 extern long _IQ5frac(long A);
2818 extern long _IQ4frac(long A);
2819 extern long _IQ3frac(long A);
2820 extern long _IQ2frac(long A);
2821 extern long _IQ1frac(long A);
2822
2823 #if GLOBAL_Q == 30
2824 #define _IQfrac(A) _IQ30frac(A)
2825 #endif
2826 #if GLOBAL_Q == 29
2827 #define _IQfrac(A) _IQ29frac(A)
2828 #endif
2829 #if GLOBAL_Q == 28
2830 #define _IQfrac(A) _IQ28frac(A)
2831 #endif
2832 #if GLOBAL_Q == 27
2833 #define _IQfrac(A) _IQ27frac(A)
2834 #endif
2835 #if GLOBAL_Q == 26
2836 #define _IQfrac(A) _IQ26frac(A)
2837 #endif
2838 #if GLOBAL_Q == 25
2839 #define _IQfrac(A) _IQ25frac(A)
2840 #endif
2841 #if GLOBAL_Q == 24
2842 #define _IQfrac(A) _IQ24frac(A)
2843 #endif
2844 #if GLOBAL_Q == 23
2845 #define _IQfrac(A) _IQ23frac(A)
2846 #endif
2847 #if GLOBAL_Q == 22
2848 #define _IQfrac(A) _IQ22frac(A)
2849 #endif
2850 #if GLOBAL_Q == 21
2851 #define _IQfrac(A) _IQ21frac(A)
2852 #endif
2853 #if GLOBAL_Q == 20
2854 #define _IQfrac(A) _IQ20frac(A)
2855 #endif
2856 #if GLOBAL_Q == 19
2857 #define _IQfrac(A) _IQ19frac(A)
2858 #endif
2859 #if GLOBAL_Q == 18
2860 #define _IQfrac(A) _IQ18frac(A)
2861 #endif
2862 #if GLOBAL_Q == 17
2863 #define _IQfrac(A) _IQ17frac(A)
2864 #endif
2865 #if GLOBAL_Q == 16
2866 #define _IQfrac(A) _IQ16frac(A)
2867 #endif
2868 #if GLOBAL_Q == 15
2869 #define _IQfrac(A) _IQ15frac(A)
2870 #endif
2871 #if GLOBAL_Q == 14
2872 #define _IQfrac(A) _IQ14frac(A)
2873 #endif
2874 #if GLOBAL_Q == 13
2875 #define _IQfrac(A) _IQ13frac(A)
2876 #endif
2877 #if GLOBAL_Q == 12
2878 #define _IQfrac(A) _IQ12frac(A)
2879 #endif
2880 #if GLOBAL_Q == 11
2881 #define _IQfrac(A) _IQ11frac(A)
2882 #endif
2883 #if GLOBAL_Q == 10
2884 #define _IQfrac(A) _IQ10frac(A)
2885 #endif
2886 #if GLOBAL_Q == 9
2887 #define _IQfrac(A) _IQ9frac(A)
2888 #endif
2889 #if GLOBAL_Q == 8
2890 #define _IQfrac(A) _IQ8frac(A)
2891 #endif
2892 #if GLOBAL_Q == 7
2893 #define _IQfrac(A) _IQ7frac(A)
2894 #endif
2895 #if GLOBAL_Q == 6
2896 #define _IQfrac(A) _IQ6frac(A)
2897 #endif
2898 #if GLOBAL_Q == 5
2899 #define _IQfrac(A) _IQ5frac(A)
2900 #endif
2901 #if GLOBAL_Q == 4
2902 #define _IQfrac(A) _IQ4frac(A)
2903 #endif
2904 #if GLOBAL_Q == 3
2905 #define _IQfrac(A) _IQ3frac(A)
2906 #endif
2907 #if GLOBAL_Q == 2
2908 #define _IQfrac(A) _IQ2frac(A)
2909 #endif
2910 #if GLOBAL_Q == 1
2911 #define _IQfrac(A) _IQ1frac(A)
2912 #endif
2913 //---------------------------------------------------------------------------
2914 #define _IQmpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (GLOBAL_Q + 32 - IQA - IQB))
2915 #define _IQ30mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (30 + 32 - IQA - IQB))
2916 #define _IQ29mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (29 + 32 - IQA - IQB))
2917 #define _IQ28mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (28 + 32 - IQA - IQB))
2918 #define _IQ27mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (27 + 32 - IQA - IQB))
2919 #define _IQ26mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (26 + 32 - IQA - IQB))
2920 #define _IQ25mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (25 + 32 - IQA - IQB))
2921 #define _IQ24mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (24 + 32 - IQA - IQB))
2922 #define _IQ23mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (23 + 32 - IQA - IQB))
2923 #define _IQ22mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (22 + 32 - IQA - IQB))
2924 #define _IQ21mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (21 + 32 - IQA - IQB))
2925 #define _IQ20mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (20 + 32 - IQA - IQB))
2926 #define _IQ19mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (19 + 32 - IQA - IQB))
2927 #define _IQ18mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (18 + 32 - IQA - IQB))
2928 #define _IQ17mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (17 + 32 - IQA - IQB))
2929 #define _IQ16mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (16 + 32 - IQA - IQB))
2930 #define _IQ15mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (15 + 32 - IQA - IQB))
2931 #define _IQ14mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (14 + 32 - IQA - IQB))
2932 #define _IQ13mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (13 + 32 - IQA - IQB))
2933 #define _IQ12mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (12 + 32 - IQA - IQB))
2934 #define _IQ11mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (11 + 32 - IQA - IQB))
2935 #define _IQ10mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (10 + 32 - IQA - IQB))
2936 #define _IQ9mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (9 + 32 - IQA - IQB))
2937 #define _IQ8mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (8 + 32 - IQA - IQB))
2938 #define _IQ7mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (7 + 32 - IQA - IQB))
2939 #define _IQ6mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (6 + 32 - IQA - IQB))
2940 #define _IQ5mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (5 + 32 - IQA - IQB))
2941 #define _IQ4mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (4 + 32 - IQA - IQB))
2942 #define _IQ3mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (3 + 32 - IQA - IQB))
2943 #define _IQ2mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (2 + 32 - IQA - IQB))
2944 #define _IQ1mpyIQX(A, IQA, B, IQB) __IQxmpy(A, B, (1 + 32 - IQA - IQB))
2945 //---------------------------------------------------------------------------
2946 #define _IQmpyI32(A,B) ((A)*(B))
2947 #define _IQ30mpyI32(A,B) ((A)*(B))
2948 #define _IQ29mpyI32(A,B) ((A)*(B))
2949 #define _IQ28mpyI32(A,B) ((A)*(B))
2950 #define _IQ27mpyI32(A,B) ((A)*(B))
2951 #define _IQ26mpyI32(A,B) ((A)*(B))
2952 #define _IQ25mpyI32(A,B) ((A)*(B))
2953 #define _IQ24mpyI32(A,B) ((A)*(B))
2954 #define _IQ23mpyI32(A,B) ((A)*(B))
2955 #define _IQ22mpyI32(A,B) ((A)*(B))
2956 #define _IQ21mpyI32(A,B) ((A)*(B))
2957 #define _IQ20mpyI32(A,B) ((A)*(B))
2958 #define _IQ19mpyI32(A,B) ((A)*(B))
2959 #define _IQ18mpyI32(A,B) ((A)*(B))
2960 #define _IQ17mpyI32(A,B) ((A)*(B))
2961 #define _IQ16mpyI32(A,B) ((A)*(B))
2962 #define _IQ15mpyI32(A,B) ((A)*(B))
2963 #define _IQ14mpyI32(A,B) ((A)*(B))
2964 #define _IQ13mpyI32(A,B) ((A)*(B))
2965 #define _IQ12mpyI32(A,B) ((A)*(B))
2966 #define _IQ11mpyI32(A,B) ((A)*(B))
2967 #define _IQ10mpyI32(A,B) ((A)*(B))
2968 #define _IQ9mpyI32(A,B) ((A)*(B))
2969 #define _IQ8mpyI32(A,B) ((A)*(B))
2970 #define _IQ7mpyI32(A,B) ((A)*(B))
2971 #define _IQ6mpyI32(A,B) ((A)*(B))
2972 #define _IQ5mpyI32(A,B) ((A)*(B))
2973 #define _IQ4mpyI32(A,B) ((A)*(B))
2974 #define _IQ3mpyI32(A,B) ((A)*(B))
2975 #define _IQ2mpyI32(A,B) ((A)*(B))
2976 #define _IQ1mpyI32(A,B) ((A)*(B))
2977 //---------------------------------------------------------------------------
2978 extern long _IQ30mpyI32int(long A, long B);
2979 extern long _IQ29mpyI32int(long A, long B);
2980 extern long _IQ28mpyI32int(long A, long B);
2981 extern long _IQ27mpyI32int(long A, long B);
2982 extern long _IQ26mpyI32int(long A, long B);
2983 extern long _IQ25mpyI32int(long A, long B);
2984 extern long _IQ24mpyI32int(long A, long B);
2985 extern long _IQ23mpyI32int(long A, long B);
2986 extern long _IQ22mpyI32int(long A, long B);
2987 extern long _IQ21mpyI32int(long A, long B);
2988 extern long _IQ20mpyI32int(long A, long B);
2989 extern long _IQ19mpyI32int(long A, long B);
2990 extern long _IQ18mpyI32int(long A, long B);
2991 extern long _IQ17mpyI32int(long A, long B);
2992 extern long _IQ16mpyI32int(long A, long B);
2993 extern long _IQ15mpyI32int(long A, long B);
2994 extern long _IQ14mpyI32int(long A, long B);
2995 extern long _IQ13mpyI32int(long A, long B);
2996 extern long _IQ12mpyI32int(long A, long B);
2997 extern long _IQ11mpyI32int(long A, long B);
2998 extern long _IQ10mpyI32int(long A, long B);
2999 extern long _IQ9mpyI32int(long A, long B);
3000 extern long _IQ8mpyI32int(long A, long B);
3001 extern long _IQ7mpyI32int(long A, long B);
3002 extern long _IQ6mpyI32int(long A, long B);
3003 extern long _IQ5mpyI32int(long A, long B);
3004 extern long _IQ4mpyI32int(long A, long B);
3005 extern long _IQ3mpyI32int(long A, long B);
3006 extern long _IQ2mpyI32int(long A, long B);
3007 extern long _IQ1mpyI32int(long A, long B);
3008
3009 #if GLOBAL_Q == 30
3010 #define _IQmpyI32int(A, B) _IQ30mpyI32int(A, B)
3011 #endif
3012 #if GLOBAL_Q == 29
3013 #define _IQmpyI32int(A, B) _IQ29mpyI32int(A, B)
3014 #endif
3015 #if GLOBAL_Q == 28
3016 #define _IQmpyI32int(A, B) _IQ28mpyI32int(A, B)
3017 #endif
3018 #if GLOBAL_Q == 27
3019 #define _IQmpyI32int(A, B) _IQ27mpyI32int(A, B)
3020 #endif
3021 #if GLOBAL_Q == 26
3022 #define _IQmpyI32int(A, B) _IQ26mpyI32int(A, B)
3023 #endif
3024 #if GLOBAL_Q == 25
3025 #define _IQmpyI32int(A, B) _IQ25mpyI32int(A, B)
3026 #endif
3027 #if GLOBAL_Q == 24
3028 #define _IQmpyI32int(A, B) _IQ24mpyI32int(A, B)
3029 #endif
3030 #if GLOBAL_Q == 23
3031 #define _IQmpyI32int(A, B) _IQ23mpyI32int(A, B)
3032 #endif
3033 #if GLOBAL_Q == 22
3034 #define _IQmpyI32int(A, B) _IQ22mpyI32int(A, B)
3035 #endif
3036 #if GLOBAL_Q == 21
3037 #define _IQmpyI32int(A, B) _IQ21mpyI32int(A, B)
3038 #endif
3039 #if GLOBAL_Q == 20
3040 #define _IQmpyI32int(A, B) _IQ20mpyI32int(A, B)
3041 #endif
3042 #if GLOBAL_Q == 19
3043 #define _IQmpyI32int(A, B) _IQ19mpyI32int(A, B)
3044 #endif
3045 #if GLOBAL_Q == 18
3046 #define _IQmpyI32int(A, B) _IQ18mpyI32int(A, B)
3047 #endif
3048 #if GLOBAL_Q == 17
3049 #define _IQmpyI32int(A, B) _IQ17mpyI32int(A, B)
3050 #endif
3051 #if GLOBAL_Q == 16
3052 #define _IQmpyI32int(A, B) _IQ16mpyI32int(A, B)
3053 #endif
3054 #if GLOBAL_Q == 15
3055 #define _IQmpyI32int(A, B) _IQ15mpyI32int(A, B)
3056 #endif
3057 #if GLOBAL_Q == 14
3058 #define _IQmpyI32int(A, B) _IQ14mpyI32int(A, B)
3059 #endif
3060 #if GLOBAL_Q == 13
3061 #define _IQmpyI32int(A, B) _IQ13mpyI32int(A, B)
3062 #endif
3063 #if GLOBAL_Q == 12
3064 #define _IQmpyI32int(A, B) _IQ12mpyI32int(A, B)
3065 #endif
3066 #if GLOBAL_Q == 11
3067 #define _IQmpyI32int(A, B) _IQ11mpyI32int(A, B)
3068 #endif
3069 #if GLOBAL_Q == 10
3070 #define _IQmpyI32int(A, B) _IQ10mpyI32int(A, B)
3071 #endif
3072 #if GLOBAL_Q == 9
3073 #define _IQmpyI32int(A, B) _IQ9mpyI32int(A, B)
3074 #endif
3075 #if GLOBAL_Q == 8
3076 #define _IQmpyI32int(A, B) _IQ8mpyI32int(A, B)
3077 #endif
3078 #if GLOBAL_Q == 7
3079 #define _IQmpyI32int(A, B) _IQ7mpyI32int(A, B)
3080 #endif
3081 #if GLOBAL_Q == 6
3082 #define _IQmpyI32int(A, B) _IQ6mpyI32int(A, B)
3083 #endif
3084 #if GLOBAL_Q == 5
3085 #define _IQmpyI32int(A, B) _IQ5mpyI32int(A, B)
3086 #endif
3087 #if GLOBAL_Q == 4
3088 #define _IQmpyI32int(A, B) _IQ4mpyI32int(A, B)
3089 #endif
3090 #if GLOBAL_Q == 3
3091 #define _IQmpyI32int(A, B) _IQ3mpyI32int(A, B)
3092 #endif
3093 #if GLOBAL_Q == 2
3094 #define _IQmpyI32int(A, B) _IQ2mpyI32int(A, B)
3095 #endif
3096 #if GLOBAL_Q == 1
3097 #define _IQmpyI32int(A, B) _IQ1mpyI32int(A, B)
3098 #endif
3099 //---------------------------------------------------------------------------
3100 extern long _IQ30mpyI32frac(long A, long B);
3101 extern long _IQ29mpyI32frac(long A, long B);
3102 extern long _IQ28mpyI32frac(long A, long B);
3103 extern long _IQ27mpyI32frac(long A, long B);
3104 extern long _IQ26mpyI32frac(long A, long B);
3105 extern long _IQ25mpyI32frac(long A, long B);
3106 extern long _IQ24mpyI32frac(long A, long B);
3107 extern long _IQ23mpyI32frac(long A, long B);
3108 extern long _IQ22mpyI32frac(long A, long B);
3109 extern long _IQ21mpyI32frac(long A, long B);
3110 extern long _IQ20mpyI32frac(long A, long B);
3111 extern long _IQ19mpyI32frac(long A, long B);
3112 extern long _IQ18mpyI32frac(long A, long B);
3113 extern long _IQ17mpyI32frac(long A, long B);
3114 extern long _IQ16mpyI32frac(long A, long B);
3115 extern long _IQ15mpyI32frac(long A, long B);
3116 extern long _IQ14mpyI32frac(long A, long B);
3117 extern long _IQ13mpyI32frac(long A, long B);
3118 extern long _IQ12mpyI32frac(long A, long B);
3119 extern long _IQ11mpyI32frac(long A, long B);
3120 extern long _IQ10mpyI32frac(long A, long B);
3121 extern long _IQ9mpyI32frac(long A, long B);
3122 extern long _IQ8mpyI32frac(long A, long B);
3123 extern long _IQ7mpyI32frac(long A, long B);
3124 extern long _IQ6mpyI32frac(long A, long B);
3125 extern long _IQ5mpyI32frac(long A, long B);
3126 extern long _IQ4mpyI32frac(long A, long B);
3127 extern long _IQ3mpyI32frac(long A, long B);
3128 extern long _IQ2mpyI32frac(long A, long B);
3129 extern long _IQ1mpyI32frac(long A, long B);
3130
3131 #if GLOBAL_Q == 30
3132 #define _IQmpyI32frac(A, B) _IQ30mpyI32frac(A, B)
3133 #endif
3134 #if GLOBAL_Q == 29
3135 #define _IQmpyI32frac(A, B) _IQ29mpyI32frac(A, B)
3136 #endif
3137 #if GLOBAL_Q == 28
3138 #define _IQmpyI32frac(A, B) _IQ28mpyI32frac(A, B)
3139 #endif
3140 #if GLOBAL_Q == 27
3141 #define _IQmpyI32frac(A, B) _IQ27mpyI32frac(A, B)
3142 #endif
3143 #if GLOBAL_Q == 26
3144 #define _IQmpyI32frac(A, B) _IQ26mpyI32frac(A, B)
3145 #endif
3146 #if GLOBAL_Q == 25
3147 #define _IQmpyI32frac(A, B) _IQ25mpyI32frac(A, B)
3148 #endif
3149 #if GLOBAL_Q == 24
3150 #define _IQmpyI32frac(A, B) _IQ24mpyI32frac(A, B)
3151 #endif
3152 #if GLOBAL_Q == 23
3153 #define _IQmpyI32frac(A, B) _IQ23mpyI32frac(A, B)
3154 #endif
3155 #if GLOBAL_Q == 22
3156 #define _IQmpyI32frac(A, B) _IQ22mpyI32frac(A, B)
3157 #endif
3158 #if GLOBAL_Q == 21
3159 #define _IQmpyI32frac(A, B) _IQ21mpyI32frac(A, B)
3160 #endif
3161 #if GLOBAL_Q == 20
3162 #define _IQmpyI32frac(A, B) _IQ20mpyI32frac(A, B)
3163 #endif
3164 #if GLOBAL_Q == 19
3165 #define _IQmpyI32frac(A, B) _IQ19mpyI32frac(A, B)
3166 #endif
3167 #if GLOBAL_Q == 18
3168 #define _IQmpyI32frac(A, B) _IQ18mpyI32frac(A, B)
3169 #endif
3170 #if GLOBAL_Q == 17
3171 #define _IQmpyI32frac(A, B) _IQ17mpyI32frac(A, B)
3172 #endif
3173 #if GLOBAL_Q == 16
3174 #define _IQmpyI32frac(A, B) _IQ16mpyI32frac(A, B)
3175 #endif
3176 #if GLOBAL_Q == 15
3177 #define _IQmpyI32frac(A, B) _IQ15mpyI32frac(A, B)
3178 #endif
3179 #if GLOBAL_Q == 14
3180 #define _IQmpyI32frac(A, B) _IQ14mpyI32frac(A, B)
3181 #endif
3182 #if GLOBAL_Q == 13
3183 #define _IQmpyI32frac(A, B) _IQ13mpyI32frac(A, B)
3184 #endif
3185 #if GLOBAL_Q == 12
3186 #define _IQmpyI32frac(A, B) _IQ12mpyI32frac(A, B)
3187 #endif
3188 #if GLOBAL_Q == 11
3189 #define _IQmpyI32frac(A, B) _IQ11mpyI32frac(A, B)
3190 #endif
3191 #if GLOBAL_Q == 10
3192 #define _IQmpyI32frac(A, B) _IQ10mpyI32frac(A, B)
3193 #endif
3194 #if GLOBAL_Q == 9
3195 #define _IQmpyI32frac(A, B) _IQ9mpyI32frac(A, B)
3196 #endif
3197 #if GLOBAL_Q == 8
3198 #define _IQmpyI32frac(A, B) _IQ8mpyI32frac(A, B)
3199 #endif
3200 #if GLOBAL_Q == 7
3201 #define _IQmpyI32frac(A, B) _IQ7mpyI32frac(A, B)
3202 #endif
3203 #if GLOBAL_Q == 6
3204 #define _IQmpyI32frac(A, B) _IQ6mpyI32frac(A, B)
3205 #endif
3206 #if GLOBAL_Q == 5
3207 #define _IQmpyI32frac(A, B) _IQ5mpyI32frac(A, B)
3208 #endif
3209 #if GLOBAL_Q == 4
3210 #define _IQmpyI32frac(A, B) _IQ4mpyI32frac(A, B)
3211 #endif
3212 #if GLOBAL_Q == 3
3213 #define _IQmpyI32frac(A, B) _IQ3mpyI32frac(A, B)
3214 #endif
3215 #if GLOBAL_Q == 2
3216 #define _IQmpyI32frac(A, B) _IQ2mpyI32frac(A, B)
3217 #endif
3218 #if GLOBAL_Q == 1
3219 #define _IQmpyI32frac(A, B) _IQ1mpyI32frac(A, B)
3220 #endif
3221 //---------------------------------------------------------------------------
3222 extern long _IQ30mag(long A, long B);
3223 extern long _IQ29mag(long A, long B);
3224 extern long _IQ28mag(long A, long B);
3225 extern long _IQ27mag(long A, long B);
3226 extern long _IQ26mag(long A, long B);
3227 extern long _IQ25mag(long A, long B);
3228 extern long _IQ24mag(long A, long B);
3229 extern long _IQ23mag(long A, long B);
3230 extern long _IQ22mag(long A, long B);
3231 extern long _IQ21mag(long A, long B);
3232 extern long _IQ20mag(long A, long B);
3233 extern long _IQ19mag(long A, long B);
3234 extern long _IQ18mag(long A, long B);
3235 extern long _IQ17mag(long A, long B);
3236 extern long _IQ16mag(long A, long B);
3237 extern long _IQ15mag(long A, long B);
3238 extern long _IQ14mag(long A, long B);
3239 extern long _IQ13mag(long A, long B);
3240 extern long _IQ12mag(long A, long B);
3241 extern long _IQ11mag(long A, long B);
3242 extern long _IQ10mag(long A, long B);
3243 extern long _IQ9mag(long A, long B);
3244 extern long _IQ8mag(long A, long B);
3245 extern long _IQ7mag(long A, long B);
3246 extern long _IQ6mag(long A, long B);
3247 extern long _IQ5mag(long A, long B);
3248 extern long _IQ4mag(long A, long B);
3249 extern long _IQ3mag(long A, long B);
3250 extern long _IQ2mag(long A, long B);
3251 extern long _IQ1mag(long A, long B);
3252
3253 #if GLOBAL_Q == 30
3254 #define _IQmag(A, B) _IQ30mag(A, B)
3255 #endif
3256 #if GLOBAL_Q == 29
3257 #define _IQmag(A, B) _IQ29mag(A, B)
3258 #endif
3259 #if GLOBAL_Q == 28
3260 #define _IQmag(A, B) _IQ28mag(A, B)
3261 #endif
3262 #if GLOBAL_Q == 27
3263 #define _IQmag(A, B) _IQ27mag(A, B)
3264 #endif
3265 #if GLOBAL_Q == 26
3266 #define _IQmag(A, B) _IQ26mag(A, B)
3267 #endif
3268 #if GLOBAL_Q == 25
3269 #define _IQmag(A, B) _IQ25mag(A, B)
3270 #endif
3271 #if GLOBAL_Q == 24
3272 #define _IQmag(A, B) _IQ24mag(A, B)
3273 #endif
3274 #if GLOBAL_Q == 23
3275 #define _IQmag(A, B) _IQ23mag(A, B)
3276 #endif
3277 #if GLOBAL_Q == 22
3278 #define _IQmag(A, B) _IQ22mag(A, B)
3279 #endif
3280 #if GLOBAL_Q == 21
3281 #define _IQmag(A, B) _IQ21mag(A, B)
3282 #endif
3283 #if GLOBAL_Q == 20
3284 #define _IQmag(A, B) _IQ20mag(A, B)
3285 #endif
3286 #if GLOBAL_Q == 19
3287 #define _IQmag(A, B) _IQ19mag(A, B)
3288 #endif
3289 #if GLOBAL_Q == 18
3290 #define _IQmag(A, B) _IQ18mag(A, B)
3291 #endif
3292 #if GLOBAL_Q == 17
3293 #define _IQmag(A, B) _IQ17mag(A, B)
3294 #endif
3295 #if GLOBAL_Q == 16
3296 #define _IQmag(A, B) _IQ16mag(A, B)
3297 #endif
3298 #if GLOBAL_Q == 15
3299 #define _IQmag(A, B) _IQ15mag(A, B)
3300 #endif
3301 #if GLOBAL_Q == 14
3302 #define _IQmag(A, B) _IQ14mag(A, B)
3303 #endif
3304 #if GLOBAL_Q == 13
3305 #define _IQmag(A, B) _IQ13mag(A, B)
3306 #endif
3307 #if GLOBAL_Q == 12
3308 #define _IQmag(A, B) _IQ12mag(A, B)
3309 #endif
3310 #if GLOBAL_Q == 11
3311 #define _IQmag(A, B) _IQ11mag(A, B)
3312 #endif
3313 #if GLOBAL_Q == 10
3314 #define _IQmag(A, B) _IQ10mag(A, B)
3315 #endif
3316 #if GLOBAL_Q == 9
3317 #define _IQmag(A, B) _IQ9mag(A, B)
3318 #endif
3319 #if GLOBAL_Q == 8
3320 #define _IQmag(A, B) _IQ8mag(A, B)
3321 #endif
3322 #if GLOBAL_Q == 7
3323 #define _IQmag(A, B) _IQ7mag(A, B)
3324 #endif
3325 #if GLOBAL_Q == 6
3326 #define _IQmag(A, B) _IQ6mag(A, B)
3327 #endif
3328 #if GLOBAL_Q == 5
3329 #define _IQmag(A, B) _IQ5mag(A, B)
3330 #endif
3331 #if GLOBAL_Q == 4
3332 #define _IQmag(A, B) _IQ4mag(A, B)
3333 #endif
3334 #if GLOBAL_Q == 3
3335 #define _IQmag(A, B) _IQ3mag(A, B)
3336 #endif
3337 #if GLOBAL_Q == 2
3338 #define _IQmag(A, B) _IQ2mag(A, B)
3339 #endif
3340 #if GLOBAL_Q == 1
3341 #define _IQmag(A, B) _IQ1mag(A, B)
3342 #endif
3343 //---------------------------------------------------------------------------
3344 extern long _atoIQN(const char *A, long q_value);
3345 #define _atoIQ(A) _atoIQN(A, GLOBAL_Q)
3346 #define _atoIQ30(A) _atoIQN(A, 30)
3347 #define _atoIQ29(A) _atoIQN(A, 29)
3348 #define _atoIQ28(A) _atoIQN(A, 28)
3349 #define _atoIQ27(A) _atoIQN(A, 27)
3350 #define _atoIQ26(A) _atoIQN(A, 26)
3351 #define _atoIQ25(A) _atoIQN(A, 25)
3352 #define _atoIQ24(A) _atoIQN(A, 24)
3353 #define _atoIQ23(A) _atoIQN(A, 23)
3354 #define _atoIQ22(A) _atoIQN(A, 22)
3355 #define _atoIQ21(A) _atoIQN(A, 21)
3356 #define _atoIQ20(A) _atoIQN(A, 20)
3357 #define _atoIQ19(A) _atoIQN(A, 19)
3358 #define _atoIQ18(A) _atoIQN(A, 18)
3359 #define _atoIQ17(A) _atoIQN(A, 17)
3360 #define _atoIQ16(A) _atoIQN(A, 16)
3361 #define _atoIQ15(A) _atoIQN(A, 15)
3362 #define _atoIQ14(A) _atoIQN(A, 14)
3363 #define _atoIQ13(A) _atoIQN(A, 13)
3364 #define _atoIQ12(A) _atoIQN(A, 12)
3365 #define _atoIQ11(A) _atoIQN(A, 11)
3366 #define _atoIQ10(A) _atoIQN(A, 10)
3367 #define _atoIQ9(A) _atoIQN(A, 9)
3368 #define _atoIQ8(A) _atoIQN(A, 8)
3369 #define _atoIQ7(A) _atoIQN(A, 7)
3370 #define _atoIQ6(A) _atoIQN(A, 6)
3371 #define _atoIQ5(A) _atoIQN(A, 5)
3372 #define _atoIQ4(A) _atoIQN(A, 4)
3373 #define _atoIQ3(A) _atoIQN(A, 3)
3374 #define _atoIQ2(A) _atoIQN(A, 2)
3375 #define _atoIQ1(A) _atoIQN(A, 1)
3376 //---------------------------------------------------------------------------
3377 extern int __IQNtoa(char *A, const char *B, long C, int D);
3378 extern int _IQ30toa(char *A, const char *B, long C);
3379 extern int _IQ29toa(char *A, const char *B, long C);
3380 extern int _IQ28toa(char *A, const char *B, long C);
3381 extern int _IQ27toa(char *A, const char *B, long C);
3382 extern int _IQ26toa(char *A, const char *B, long C);
3383 extern int _IQ25toa(char *A, const char *B, long C);
3384 extern int _IQ24toa(char *A, const char *B, long C);
3385 extern int _IQ23toa(char *A, const char *B, long C);
3386 extern int _IQ22toa(char *A, const char *B, long C);
3387 extern int _IQ21toa(char *A, const char *B, long C);
3388 extern int _IQ20toa(char *A, const char *B, long C);
3389 extern int _IQ19toa(char *A, const char *B, long C);
3390 extern int _IQ18toa(char *A, const char *B, long C);
3391 extern int _IQ17toa(char *A, const char *B, long C);
3392 extern int _IQ16toa(char *A, const char *B, long C);
3393 extern int _IQ15toa(char *A, const char *B, long C);
3394 extern int _IQ14toa(char *A, const char *B, long C);
3395 extern int _IQ13toa(char *A, const char *B, long C);
3396 extern int _IQ12toa(char *A, const char *B, long C);
3397 extern int _IQ11toa(char *A, const char *B, long C);
3398 extern int _IQ10toa(char *A, const char *B, long C);
3399 extern int _IQ9toa(char *A, const char *B, long C);
3400 extern int _IQ8toa(char *A, const char *B, long C);
3401 extern int _IQ7toa(char *A, const char *B, long C);
3402 extern int _IQ6toa(char *A, const char *B, long C);
3403 extern int _IQ5toa(char *A, const char *B, long C);
3404 extern int _IQ4toa(char *A, const char *B, long C);
3405 extern int _IQ3toa(char *A, const char *B, long C);
3406 extern int _IQ2toa(char *A, const char *B, long C);
3407 extern int _IQ1toa(char *A, const char *B, long C);
3408
3409
3410 #define _IQ30toa(A, B, C) __IQNtoa(A, B, C, 30);
3411 #define _IQ29toa(A, B, C) __IQNtoa(A, B, C, 29);
3412 #define _IQ28toa(A, B, C) __IQNtoa(A, B, C, 28);
3413 #define _IQ27toa(A, B, C) __IQNtoa(A, B, C, 27);
3414 #define _IQ26toa(A, B, C) __IQNtoa(A, B, C, 26);
3415 #define _IQ25toa(A, B, C) __IQNtoa(A, B, C, 25);
3416 #define _IQ24toa(A, B, C) __IQNtoa(A, B, C, 24);
3417 #define _IQ23toa(A, B, C) __IQNtoa(A, B, C, 23);
3418 #define _IQ21toa(A, B, C) __IQNtoa(A, B, C, 21);
3419 #define _IQ22toa(A, B, C) __IQNtoa(A, B, C, 22);
3420 #define _IQ20toa(A, B, C) __IQNtoa(A, B, C, 20);
3421 #define _IQ19toa(A, B, C) __IQNtoa(A, B, C, 19);
3422 #define _IQ18toa(A, B, C) __IQNtoa(A, B, C, 18);
3423 #define _IQ17toa(A, B, C) __IQNtoa(A, B, C, 17);
3424 #define _IQ16toa(A, B, C) __IQNtoa(A, B, C, 16);
3425 #define _IQ15toa(A, B, C) __IQNtoa(A, B, C, 15);
3426 #define _IQ14toa(A, B, C) __IQNtoa(A, B, C, 14);
3427 #define _IQ13toa(A, B, C) __IQNtoa(A, B, C, 13);
3428 #define _IQ12toa(A, B, C) __IQNtoa(A, B, C, 12);
3429 #define _IQ11toa(A, B, C) __IQNtoa(A, B, C, 11);
3430 #define _IQ10toa(A, B, C) __IQNtoa(A, B, C, 10);
3431 #define _IQ9toa(A, B, C) __IQNtoa(A, B, C, 9);
3432 #define _IQ8toa(A, B, C) __IQNtoa(A, B, C, 8);
3433 #define _IQ7toa(A, B, C) __IQNtoa(A, B, C, 7);
3434 #define _IQ6toa(A, B, C) __IQNtoa(A, B, C, 6);
3435 #define _IQ5toa(A, B, C) __IQNtoa(A, B, C, 5);
3436 #define _IQ4toa(A, B, C) __IQNtoa(A, B, C, 4);
3437 #define _IQ3toa(A, B, C) __IQNtoa(A, B, C, 3);
3438 #define _IQ2toa(A, B, C) __IQNtoa(A, B, C, 2);
3439 #define _IQ1toa(A, B, C) __IQNtoa(A, B, C, 1);
3440
3441
3442 #if GLOBAL_Q == 30
3443 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 30)
3444 #endif
3445 #if GLOBAL_Q == 29
3446 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 29)
3447 #endif
3448 #if GLOBAL_Q == 28
3449 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 28)
3450 #endif
3451 #if GLOBAL_Q == 27
3452 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 27)
3453 #endif
3454 #if GLOBAL_Q == 26
3455 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 26)
3456 #endif
3457 #if GLOBAL_Q == 25
3458 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 25)
3459 #endif
3460 #if GLOBAL_Q == 24
3461 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 24)
3462 #endif
3463 #if GLOBAL_Q == 23
3464 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 23)
3465 #endif
3466 #if GLOBAL_Q == 22
3467 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 22)
3468 #endif
3469 #if GLOBAL_Q == 21
3470 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 21)
3471 #endif
3472 #if GLOBAL_Q == 20
3473 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 20)
3474 #endif
3475 #if GLOBAL_Q == 19
3476 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 19)
3477 #endif
3478 #if GLOBAL_Q == 18
3479 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 18)
3480 #endif
3481 #if GLOBAL_Q == 17
3482 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 17)
3483 #endif
3484 #if GLOBAL_Q == 16
3485 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 16)
3486 #endif
3487 #if GLOBAL_Q == 15
3488 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 15)
3489 #endif
3490 #if GLOBAL_Q == 14
3491 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 14)
3492 #endif
3493 #if GLOBAL_Q == 13
3494 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 13)
3495 #endif
3496 #if GLOBAL_Q == 12
3497 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 12)
3498 #endif
3499 #if GLOBAL_Q == 11
3500 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 11)
3501 #endif
3502 #if GLOBAL_Q == 10
3503 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 10)
3504 #endif
3505 #if GLOBAL_Q == 9
3506 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 9)
3507 #endif
3508 #if GLOBAL_Q == 8
3509 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 8)
3510 #endif
3511 #if GLOBAL_Q == 7
3512 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 7)
3513 #endif
3514 #if GLOBAL_Q == 6
3515 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 6)
3516 #endif
3517 #if GLOBAL_Q == 5
3518 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 5)
3519 #endif
3520 #if GLOBAL_Q == 4
3521 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 4)
3522 #endif
3523 #if GLOBAL_Q == 3
3524 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 3)
3525 #endif
3526 #if GLOBAL_Q == 2
3527 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 2)
3528 #endif
3529 #if GLOBAL_Q == 1
3530 #define _IQtoa(A, B, C) __IQNtoa(A, B, C, 1)
3531 #endif
3532 //---------------------------------------------------------------------------
3533 #define _IQabs(A) labs(A)
3534 #define _IQ30abs(A) labs(A)
3535 #define _IQ29abs(A) labs(A)
3536 #define _IQ28abs(A) labs(A)
3537 #define _IQ27abs(A) labs(A)
3538 #define _IQ26abs(A) labs(A)
3539 #define _IQ25abs(A) labs(A)
3540 #define _IQ24abs(A) labs(A)
3541 #define _IQ23abs(A) labs(A)
3542 #define _IQ22abs(A) labs(A)
3543 #define _IQ21abs(A) labs(A)
3544 #define _IQ20abs(A) labs(A)
3545 #define _IQ19abs(A) labs(A)
3546 #define _IQ18abs(A) labs(A)
3547 #define _IQ17abs(A) labs(A)
3548 #define _IQ16abs(A) labs(A)
3549 #define _IQ15abs(A) labs(A)
3550 #define _IQ14abs(A) labs(A)
3551 #define _IQ13abs(A) labs(A)
3552 #define _IQ12abs(A) labs(A)
3553 #define _IQ11abs(A) labs(A)
3554 #define _IQ10abs(A) labs(A)
3555 #define _IQ9abs(A) labs(A)
3556 #define _IQ8abs(A) labs(A)
3557 #define _IQ7abs(A) labs(A)
3558 #define _IQ6abs(A) labs(A)
3559 #define _IQ5abs(A) labs(A)
3560 #define _IQ4abs(A) labs(A)
3561 #define _IQ3abs(A) labs(A)
3562 #define _IQ2abs(A) labs(A)
3563 #define _IQ1abs(A) labs(A)
3564 //###########################################################################
3565 #else // MATH_TYPE == FLOAT_MATH
3566 //###########################################################################
3567 // If FLOAT_MATH is used, the IQmath library function are replaced by
3568 // equivalent floating point operations:
3569 //===========================================================================
3570 typedef float _iq;
3571 typedef float _iq30;
3572 typedef float _iq29;
3573 typedef float _iq28;
3574 typedef float _iq27;
3575 typedef float _iq26;
3576 typedef float _iq25;
3577 typedef float _iq24;
3578 typedef float _iq23;
3579 typedef float _iq22;
3580 typedef float _iq21;
3581 typedef float _iq20;
3582 typedef float _iq19;
3583 typedef float _iq18;
3584 typedef float _iq17;
3585 typedef float _iq16;
3586 typedef float _iq15;
3587 typedef float _iq14;
3588 typedef float _iq13;
3589 typedef float _iq12;
3590 typedef float _iq11;
3591 typedef float _iq10;
3592 typedef float _iq9;
3593 typedef float _iq8;
3594 typedef float _iq7;
3595 typedef float _iq6;
3596 typedef float _iq5;
3597 typedef float _iq4;
3598 typedef float _iq3;
3599 typedef float _iq2;
3600 typedef float _iq1;
3601
3602 //---------------------------------------------------------------------------
3603 #define _IQmpy2(A) ((A)*2.0)
3604 #define _IQmpy4(A) ((A)*4.0)
3605 #define _IQmpy8(A) ((A)*8.0)
3606 #define _IQmpy16(A) ((A)*16.0)
3607 #define _IQmpy32(A) ((A)*32.0)
3608 #define _IQmpy64(A) ((A)*64.0)
3609
3610 #define _IQdiv2(A) ((A)*0.5)
3611 #define _IQdiv4(A) ((A)*0.25)
3612 #define _IQdiv8(A) ((A)*0.125)
3613 #define _IQdiv16(A) ((A)*0.0625)
3614 #define _IQdiv32(A) ((A)*0.03125)
3615 #define _IQdiv64(A) ((A)*0.015625)
3616 //---------------------------------------------------------------------------
3617 #define _IQ(A) (A)
3618 #define _IQ30(A) (A)
3619 #define _IQ29(A) (A)
3620 #define _IQ28(A) (A)
3621 #define _IQ27(A) (A)
3622 #define _IQ26(A) (A)
3623 #define _IQ25(A) (A)
3624 #define _IQ24(A) (A)
3625 #define _IQ23(A) (A)
3626 #define _IQ22(A) (A)
3627 #define _IQ21(A) (A)
3628 #define _IQ20(A) (A)
3629 #define _IQ19(A) (A)
3630 #define _IQ18(A) (A)
3631 #define _IQ17(A) (A)
3632 #define _IQ16(A) (A)
3633 #define _IQ15(A) (A)
3634 #define _IQ14(A) (A)
3635 #define _IQ13(A) (A)
3636 #define _IQ12(A) (A)
3637 #define _IQ10(A) (A)
3638 #define _IQ9(A) (A)
3639 #define _IQ8(A) (A)
3640 #define _IQ7(A) (A)
3641 #define _IQ6(A) (A)
3642 #define _IQ5(A) (A)
3643 #define _IQ4(A) (A)
3644 #define _IQ3(A) (A)
3645 #define _IQ2(A) (A)
3646 #define _IQ1(A) (A)
3647 //---------------------------------------------------------------------------
3648 #define _IQtoF(A) (A)
3649 #define _IQ30toF(A) (A)
3650 #define _IQ29toF(A) (A)
3651 #define _IQ28toF(A) (A)
3652 #define _IQ27toF(A) (A)
3653 #define _IQ26toF(A) (A)
3654 #define _IQ25toF(A) (A)
3655 #define _IQ24toF(A) (A)
3656 #define _IQ23toF(A) (A)
3657 #define _IQ22toF(A) (A)
3658 #define _IQ21toF(A) (A)
3659 #define _IQ20toF(A) (A)
3660 #define _IQ19toF(A) (A)
3661 #define _IQ18toF(A) (A)
3662 #define _IQ17toF(A) (A)
3663 #define _IQ16toF(A) (A)
3664 #define _IQ15toF(A) (A)
3665 #define _IQ14toF(A) (A)
3666 #define _IQ13toF(A) (A)
3667 #define _IQ12toF(A) (A)
3668 #define _IQ11toF(A) (A)
3669 #define _IQ10toF(A) (A)
3670 #define _IQ9toF(A) (A)
3671 #define _IQ8toF(A) (A)
3672 #define _IQ7toF(A) (A)
3673 #define _IQ6toF(A) (A)
3674 #define _IQ5toF(A) (A)
3675 #define _IQ4toF(A) (A)
3676 #define _IQ3toF(A) (A)
3677 #define _IQ2toF(A) (A)
3678 #define _IQ1toF(A) (A)
3679 //---------------------------------------------------------------------------
3680 //extern float _satf(float A, float Pos, float Neg);
3681 //#define _IQsat(A, Pos, Neg) _satf(A, Pos, Neg)
3682 //
3683 // The following define requires codegen tools V5.2.2 or later
3684 //
3685 #define _IQsat(A, Pos, Neg) (__fmax(((__fmin((A),(Pos)))),(Neg)))
3686 //---------------------------------------------------------------------------
3687 #define _IQtoIQ30(A) (A)
3688 #define _IQtoIQ29(A) (A)
3689 #define _IQtoIQ28(A) (A)
3690 #define _IQtoIQ27(A) (A)
3691 #define _IQtoIQ26(A) (A)
3692 #define _IQtoIQ25(A) (A)
3693 #define _IQtoIQ24(A) (A)
3694 #define _IQtoIQ23(A) (A)
3695 #define _IQtoIQ22(A) (A)
3696 #define _IQtoIQ21(A) (A)
3697 #define _IQtoIQ20(A) (A)
3698 #define _IQtoIQ19(A) (A)
3699 #define _IQtoIQ18(A) (A)
3700 #define _IQtoIQ17(A) (A)
3701 #define _IQtoIQ16(A) (A)
3702 #define _IQtoIQ15(A) (A)
3703 #define _IQtoIQ14(A) (A)
3704 #define _IQtoIQ13(A) (A)
3705 #define _IQtoIQ12(A) (A)
3706 #define _IQtoIQ11(A) (A)
3707 #define _IQtoIQ10(A) (A)
3708 #define _IQtoIQ9(A) (A)
3709 #define _IQtoIQ8(A) (A)
3710 #define _IQtoIQ7(A) (A)
3711 #define _IQtoIQ6(A) (A)
3712 #define _IQtoIQ5(A) (A)
3713 #define _IQtoIQ4(A) (A)
3714 #define _IQtoIQ3(A) (A)
3715 #define _IQtoIQ2(A) (A)
3716 #define _IQtoIQ1(A) (A)
3717 //---------------------------------------------------------------------------
3718 #define _IQ30toIQ(A) (A)
3719 #define _IQ29toIQ(A) (A)
3720 #define _IQ28toIQ(A) (A)
3721 #define _IQ27toIQ(A) (A)
3722 #define _IQ26toIQ(A) (A)
3723 #define _IQ25toIQ(A) (A)
3724 #define _IQ24toIQ(A) (A)
3725 #define _IQ23toIQ(A) (A)
3726 #define _IQ22toIQ(A) (A)
3727 #define _IQ21toIQ(A) (A)
3728 #define _IQ20toIQ(A) (A)
3729 #define _IQ19toIQ(A) (A)
3730 #define _IQ18toIQ(A) (A)
3731 #define _IQ17toIQ(A) (A)
3732 #define _IQ16toIQ(A) (A)
3733 #define _IQ15toIQ(A) (A)
3734 #define _IQ14toIQ(A) (A)
3735 #define _IQ13toIQ(A) (A)
3736 #define _IQ12toIQ(A) (A)
3737 #define _IQ11toIQ(A) (A)
3738 #define _IQ10toIQ(A) (A)
3739 #define _IQ9toIQ(A) (A)
3740 #define _IQ8toIQ(A) (A)
3741 #define _IQ7toIQ(A) (A)
3742 #define _IQ6toIQ(A) (A)
3743 #define _IQ5toIQ(A) (A)
3744 #define _IQ4toIQ(A) (A)
3745 #define _IQ3toIQ(A) (A)
3746 #define _IQ2toIQ(A) (A)
3747 #define _IQ1toIQ(A) (A)
3748 //---------------------------------------------------------------------------
3749 #define _IQtoQ15(A) (int) ((A) * 32768.0)
3750 #define _IQtoQ14(A) (int) ((A) * 16384.0)
3751 #define _IQtoQ13(A) (int) ((A) * 8192.0)
3752 #define _IQtoQ12(A) (int) ((A) * 4096.0)
3753 #define _IQtoQ11(A) (int) ((A) * 2048.0)
3754 #define _IQtoQ10(A) (int) ((A) * 1024.0)
3755 #define _IQtoQ9(A) (int) ((A) * 512.0)
3756 #define _IQtoQ8(A) (int) ((A) * 256.0)
3757 #define _IQtoQ7(A) (int) ((A) * 128.0)
3758 #define _IQtoQ6(A) (int) ((A) * 64.0)
3759 #define _IQtoQ5(A) (int) ((A) * 32.0)
3760 #define _IQtoQ4(A) (int) ((A) * 16.0)
3761 #define _IQtoQ3(A) (int) ((A) * 8.0)
3762 #define _IQtoQ2(A) (int) ((A) * 4.0)
3763 #define _IQtoQ1(A) (int) ((A) * 2.0)
3764
3765 //---------------------------------------------------------------------------
3766 #define _Q15toIQ(A) (((float) (A)) * 0.000030518)
3767 #define _Q14toIQ(A) (((float) (A)) * 0.000061035)
3768 #define _Q13toIQ(A) (((float) (A)) * 0.000122070)
3769 #define _Q12toIQ(A) (((float) (A)) * 0.000244141)
3770 #define _Q11toIQ(A) (((float) (A)) * 0.000488281)
3771 #define _Q10toIQ(A) (((float) (A)) * 0.000976563)
3772 #define _Q9toIQ(A) (((float) (A)) * 0.001953125)
3773 #define _Q8toIQ(A) (((float) (A)) * 0.003906250)
3774 #define _Q7toIQ(A) (((float) (A)) * 0.007812500)
3775 #define _Q6toIQ(A) (((float) (A)) * 0.015625000)
3776 #define _Q5toIQ(A) (((float) (A)) * 0.031250000)
3777 #define _Q4toIQ(A) (((float) (A)) * 0.062500000)
3778 #define _Q3toIQ(A) (((float) (A)) * 0.125000000)
3779 #define _Q2toIQ(A) (((float) (A)) * 0.250000000)
3780 #define _Q1toIQ(A) (((float) (A)) * 0.500000000)
3781 //---------------------------------------------------------------------------
3782 #define _IQmpy(A,B) ((A) * (B))
3783 #define _IQ30mpy(A,B) ((A) * (B))
3784 #define _IQ29mpy(A,B) ((A) * (B))
3785 #define _IQ28mpy(A,B) ((A) * (B))
3786 #define _IQ27mpy(A,B) ((A) * (B))
3787 #define _IQ26mpy(A,B) ((A) * (B))
3788 #define _IQ25mpy(A,B) ((A) * (B))
3789 #define _IQ24mpy(A,B) ((A) * (B))
3790 #define _IQ23mpy(A,B) ((A) * (B))
3791 #define _IQ22mpy(A,B) ((A) * (B))
3792 #define _IQ21mpy(A,B) ((A) * (B))
3793 #define _IQ20mpy(A,B) ((A) * (B))
3794 #define _IQ19mpy(A,B) ((A) * (B))
3795 #define _IQ18mpy(A,B) ((A) * (B))
3796 #define _IQ17mpy(A,B) ((A) * (B))
3797 #define _IQ16mpy(A,B) ((A) * (B))
3798 #define _IQ15mpy(A,B) ((A) * (B))
3799 #define _IQ14mpy(A,B) ((A) * (B))
3800 #define _IQ13mpy(A,B) ((A) * (B))
3801 #define _IQ12mpy(A,B) ((A) * (B))
3802 #define _IQ11mpy(A,B) ((A) * (B))
3803 #define _IQ10mpy(A,B) ((A) * (B))
3804 #define _IQ9mpy(A,B) ((A) * (B))
3805 #define _IQ8mpy(A,B) ((A) * (B))
3806 #define _IQ7mpy(A,B) ((A) * (B))
3807 #define _IQ6mpy(A,B) ((A) * (B))
3808 #define _IQ5mpy(A,B) ((A) * (B))
3809 #define _IQ4mpy(A,B) ((A) * (B))
3810 #define _IQ3mpy(A,B) ((A) * (B))
3811 #define _IQ2mpy(A,B) ((A) * (B))
3812 #define _IQ1mpy(A,B) ((A) * (B))
3813 //---------------------------------------------------------------------------
3814 #define _IQrmpy(A,B) ((A) * (B))
3815 #define _IQ30rmpy(A,B) ((A) * (B))
3816 #define _IQ29rmpy(A,B) ((A) * (B))
3817 #define _IQ28rmpy(A,B) ((A) * (B))
3818 #define _IQ27rmpy(A,B) ((A) * (B))
3819 #define _IQ26rmpy(A,B) ((A) * (B))
3820 #define _IQ25rmpy(A,B) ((A) * (B))
3821 #define _IQ24rmpy(A,B) ((A) * (B))
3822 #define _IQ23rmpy(A,B) ((A) * (B))
3823 #define _IQ22rmpy(A,B) ((A) * (B))
3824 #define _IQ21rmpy(A,B) ((A) * (B))
3825 #define _IQ20rmpy(A,B) ((A) * (B))
3826 #define _IQ19rmpy(A,B) ((A) * (B))
3827 #define _IQ18rmpy(A,B) ((A) * (B))
3828 #define _IQ17rmpy(A,B) ((A) * (B))
3829 #define _IQ16rmpy(A,B) ((A) * (B))
3830 #define _IQ15rmpy(A,B) ((A) * (B))
3831 #define _IQ14rmpy(A,B) ((A) * (B))
3832 #define _IQ13rmpy(A,B) ((A) * (B))
3833 #define _IQ12rmpy(A,B) ((A) * (B))
3834 #define _IQ11rmpy(A,B) ((A) * (B))
3835 #define _IQ10rmpy(A,B) ((A) * (B))
3836 #define _IQ9rmpy(A,B) ((A) * (B))
3837 #define _IQ8rmpy(A,B) ((A) * (B))
3838 #define _IQ7rmpy(A,B) ((A) * (B))
3839 #define _IQ6rmpy(A,B) ((A) * (B))
3840 #define _IQ5rmpy(A,B) ((A) * (B))
3841 #define _IQ4rmpy(A,B) ((A) * (B))
3842 #define _IQ3rmpy(A,B) ((A) * (B))
3843 #define _IQ2rmpy(A,B) ((A) * (B))
3844 #define _IQ1rmpy(A,B) ((A) * (B))
3845 //---------------------------------------------------------------------------
3846 #define _IQrsmpy(A,B) ((A) * (B))
3847 #define _IQ30rsmpy(A,B) ((A) * (B))
3848 #define _IQ29rsmpy(A,B) ((A) * (B))
3849 #define _IQ28rsmpy(A,B) ((A) * (B))
3850 #define _IQ27rsmpy(A,B) ((A) * (B))
3851 #define _IQ26rsmpy(A,B) ((A) * (B))
3852 #define _IQ25rsmpy(A,B) ((A) * (B))
3853 #define _IQ24rsmpy(A,B) ((A) * (B))
3854 #define _IQ23rsmpy(A,B) ((A) * (B))
3855 #define _IQ22rsmpy(A,B) ((A) * (B))
3856 #define _IQ21rsmpy(A,B) ((A) * (B))
3857 #define _IQ20rsmpy(A,B) ((A) * (B))
3858 #define _IQ19rsmpy(A,B) ((A) * (B))
3859 #define _IQ18rsmpy(A,B) ((A) * (B))
3860 #define _IQ17rsmpy(A,B) ((A) * (B))
3861 #define _IQ16rsmpy(A,B) ((A) * (B))
3862 #define _IQ15rsmpy(A,B) ((A) * (B))
3863 #define _IQ14rsmpy(A,B) ((A) * (B))
3864 #define _IQ13rsmpy(A,B) ((A) * (B))
3865 #define _IQ12rsmpy(A,B) ((A) * (B))
3866 #define _IQ11rsmpy(A,B) ((A) * (B))
3867 #define _IQ10rsmpy(A,B) ((A) * (B))
3868 #define _IQ9rsmpy(A,B) ((A) * (B))
3869 #define _IQ8rsmpy(A,B) ((A) * (B))
3870 #define _IQ7rsmpy(A,B) ((A) * (B))
3871 #define _IQ6rsmpy(A,B) ((A) * (B))
3872 #define _IQ5rsmpy(A,B) ((A) * (B))
3873 #define _IQ4rsmpy(A,B) ((A) * (B))
3874 #define _IQ3rsmpy(A,B) ((A) * (B))
3875 #define _IQ2rsmpy(A,B) ((A) * (B))
3876 #define _IQ1rsmpy(A,B) ((A) * (B))
3877 //---------------------------------------------------------------------------
3878 #define _IQdiv(A,B) ((float)(A) / (float)(B))
3879 #define _IQ30div(A,B) ((float)(A) / (float)(B))
3880 #define _IQ29div(A,B) ((float)(A) / (float)(B))
3881 #define _IQ28div(A,B) ((float)(A) / (float)(B))
3882 #define _IQ27div(A,B) ((float)(A) / (float)(B))
3883 #define _IQ26div(A,B) ((float)(A) / (float)(B))
3884 #define _IQ25div(A,B) ((float)(A) / (float)(B))
3885 #define _IQ24div(A,B) ((float)(A) / (float)(B))
3886 #define _IQ23div(A,B) ((float)(A) / (float)(B))
3887 #define _IQ22div(A,B) ((float)(A) / (float)(B))
3888 #define _IQ21div(A,B) ((float)(A) / (float)(B))
3889 #define _IQ20div(A,B) ((float)(A) / (float)(B))
3890 #define _IQ19div(A,B) ((float)(A) / (float)(B))
3891 #define _IQ18div(A,B) ((float)(A) / (float)(B))
3892 #define _IQ17div(A,B) ((float)(A) / (float)(B))
3893 #define _IQ16div(A,B) ((float)(A) / (float)(B))
3894 #define _IQ15div(A,B) ((float)(A) / (float)(B))
3895 #define _IQ14div(A,B) ((float)(A) / (float)(B))
3896 #define _IQ13div(A,B) ((float)(A) / (float)(B))
3897 #define _IQ12div(A,B) ((float)(A) / (float)(B))
3898 #define _IQ11div(A,B) ((float)(A) / (float)(B))
3899 #define _IQ10div(A,B) ((float)(A) / (float)(B))
3900 #define _IQ9div(A,B) ((float)(A) / (float)(B))
3901 #define _IQ8div(A,B) ((float)(A) / (float)(B))
3902 #define _IQ7div(A,B) ((float)(A) / (float)(B))
3903 #define _IQ6div(A,B) ((float)(A) / (float)(B))
3904 #define _IQ5div(A,B) ((float)(A) / (float)(B))
3905 #define _IQ4div(A,B) ((float)(A) / (float)(B))
3906 #define _IQ3div(A,B) ((float)(A) / (float)(B))
3907 #define _IQ2div(A,B) ((float)(A) / (float)(B))
3908 #define _IQ1div(A,B) ((float)(A) / (float)(B))
3909 //---------------------------------------------------------------------------
3910 #define _IQsin(A) sin(A)
3911 #define _IQ30sin(A) sin(A)
3912 #define _IQ29sin(A) sin(A)
3913 #define _IQ28sin(A) sin(A)
3914 #define _IQ27sin(A) sin(A)
3915 #define _IQ26sin(A) sin(A)
3916 #define _IQ25sin(A) sin(A)
3917 #define _IQ24sin(A) sin(A)
3918 #define _IQ23sin(A) sin(A)
3919 #define _IQ22sin(A) sin(A)
3920 #define _IQ21sin(A) sin(A)
3921 #define _IQ20sin(A) sin(A)
3922 #define _IQ19sin(A) sin(A)
3923 #define _IQ18sin(A) sin(A)
3924 #define _IQ17sin(A) sin(A)
3925 #define _IQ16sin(A) sin(A)
3926 #define _IQ15sin(A) sin(A)
3927 #define _IQ14sin(A) sin(A)
3928 #define _IQ13sin(A) sin(A)
3929 #define _IQ12sin(A) sin(A)
3930 #define _IQ11sin(A) sin(A)
3931 #define _IQ10sin(A) sin(A)
3932 #define _IQ9sin(A) sin(A)
3933 #define _IQ8sin(A) sin(A)
3934 #define _IQ7sin(A) sin(A)
3935 #define _IQ6sin(A) sin(A)
3936 #define _IQ5sin(A) sin(A)
3937 #define _IQ4sin(A) sin(A)
3938 #define _IQ3sin(A) sin(A)
3939 #define _IQ2sin(A) sin(A)
3940 #define _IQ1sin(A) sin(A)
3941 //---------------------------------------------------------------------------
3942 #define _IQsinPU(A) sin((A)*6.283185307)
3943 #define _IQ30sinPU(A) sin((A)*6.283185307)
3944 #define _IQ29sinPU(A) sin((A)*6.283185307)
3945 #define _IQ28sinPU(A) sin((A)*6.283185307)
3946 #define _IQ27sinPU(A) sin((A)*6.283185307)
3947 #define _IQ26sinPU(A) sin((A)*6.283185307)
3948 #define _IQ25sinPU(A) sin((A)*6.283185307)
3949 #define _IQ24sinPU(A) sin((A)*6.283185307)
3950 #define _IQ23sinPU(A) sin((A)*6.283185307)
3951 #define _IQ22sinPU(A) sin((A)*6.283185307)
3952 #define _IQ21sinPU(A) sin((A)*6.283185307)
3953 #define _IQ20sinPU(A) sin((A)*6.283185307)
3954 #define _IQ19sinPU(A) sin((A)*6.283185307)
3955 #define _IQ18sinPU(A) sin((A)*6.283185307)
3956 #define _IQ17sinPU(A) sin((A)*6.283185307)
3957 #define _IQ16sinPU(A) sin((A)*6.283185307)
3958 #define _IQ15sinPU(A) sin((A)*6.283185307)
3959 #define _IQ14sinPU(A) sin((A)*6.283185307)
3960 #define _IQ13sinPU(A) sin((A)*6.283185307)
3961 #define _IQ12sinPU(A) sin((A)*6.283185307)
3962 #define _IQ11sinPU(A) sin((A)*6.283185307)
3963 #define _IQ10sinPU(A) sin((A)*6.283185307)
3964 #define _IQ9sinPU(A) sin((A)*6.283185307)
3965 #define _IQ8sinPU(A) sin((A)*6.283185307)
3966 #define _IQ7sinPU(A) sin((A)*6.283185307)
3967 #define _IQ6sinPU(A) sin((A)*6.283185307)
3968 #define _IQ5sinPU(A) sin((A)*6.283185307)
3969 #define _IQ4sinPU(A) sin((A)*6.283185307)
3970 #define _IQ3sinPU(A) sin((A)*6.283185307)
3971 #define _IQ2sinPU(A) sin((A)*6.283185307)
3972 #define _IQ1sinPU(A) sin((A)*6.283185307)
3973 //---------------------------------------------------------------------------
3974 #define _IQasin(A) asin(A)
3975 #define _IQ29asin(A) asin(A)
3976 #define _IQ28asin(A) asin(A)
3977 #define _IQ27asin(A) asin(A)
3978 #define _IQ26asin(A) asin(A)
3979 #define _IQ25asin(A) asin(A)
3980 #define _IQ24asin(A) asin(A)
3981 #define _IQ23asin(A) asin(A)
3982 #define _IQ22asin(A) asin(A)
3983 #define _IQ21asin(A) asin(A)
3984 #define _IQ20asin(A) asin(A)
3985 #define _IQ19asin(A) asin(A)
3986 #define _IQ18asin(A) asin(A)
3987 #define _IQ17asin(A) asin(A)
3988 #define _IQ16asin(A) asin(A)
3989 #define _IQ15asin(A) asin(A)
3990 #define _IQ14asin(A) asin(A)
3991 #define _IQ13asin(A) asin(A)
3992 #define _IQ12asin(A) asin(A)
3993 #define _IQ11asin(A) asin(A)
3994 #define _IQ10asin(A) asin(A)
3995 #define _IQ9asin(A) asin(A)
3996 #define _IQ8asin(A) asin(A)
3997 #define _IQ7asin(A) asin(A)
3998 #define _IQ6asin(A) asin(A)
3999 #define _IQ5asin(A) asin(A)
4000 #define _IQ4asin(A) asin(A)
4001 #define _IQ3asin(A) asin(A)
4002 #define _IQ2asin(A) asin(A)
4003 #define _IQ1asin(A) asin(A)
4004 //---------------------------------------------------------------------------
4005 #define _IQcos(A) cos(A)
4006 #define _IQ30cos(A) cos(A)
4007 #define _IQ29cos(A) cos(A)
4008 #define _IQ28cos(A) cos(A)
4009 #define _IQ27cos(A) cos(A)
4010 #define _IQ26cos(A) cos(A)
4011 #define _IQ25cos(A) cos(A)
4012 #define _IQ24cos(A) cos(A)
4013 #define _IQ23cos(A) cos(A)
4014 #define _IQ22cos(A) cos(A)
4015 #define _IQ21cos(A) cos(A)
4016 #define _IQ20cos(A) cos(A)
4017 #define _IQ19cos(A) cos(A)
4018 #define _IQ18cos(A) cos(A)
4019 #define _IQ17cos(A) cos(A)
4020 #define _IQ16cos(A) cos(A)
4021 #define _IQ15cos(A) cos(A)
4022 #define _IQ14cos(A) cos(A)
4023 #define _IQ13cos(A) cos(A)
4024 #define _IQ12cos(A) cos(A)
4025 #define _IQ11cos(A) cos(A)
4026 #define _IQ10cos(A) cos(A)
4027 #define _IQ9cos(A) cos(A)
4028 #define _IQ8cos(A) cos(A)
4029 #define _IQ7cos(A) cos(A)
4030 #define _IQ6cos(A) cos(A)
4031 #define _IQ5cos(A) cos(A)
4032 #define _IQ4cos(A) cos(A)
4033 #define _IQ3cos(A) cos(A)
4034 #define _IQ2cos(A) cos(A)
4035 #define _IQ1cos(A) cos(A)
4036 //---------------------------------------------------------------------------
4037 #define _IQcosPU(A) cos((A)*6.283185307)
4038 #define _IQ30cosPU(A) cos((A)*6.283185307)
4039 #define _IQ29cosPU(A) cos((A)*6.283185307)
4040 #define _IQ28cosPU(A) cos((A)*6.283185307)
4041 #define _IQ27cosPU(A) cos((A)*6.283185307)
4042 #define _IQ26cosPU(A) cos((A)*6.283185307)
4043 #define _IQ25cosPU(A) cos((A)*6.283185307)
4044 #define _IQ24cosPU(A) cos((A)*6.283185307)
4045 #define _IQ23cosPU(A) cos((A)*6.283185307)
4046 #define _IQ22cosPU(A) cos((A)*6.283185307)
4047 #define _IQ21cosPU(A) cos((A)*6.283185307)
4048 #define _IQ20cosPU(A) cos((A)*6.283185307)
4049 #define _IQ19cosPU(A) cos((A)*6.283185307)
4050 #define _IQ18cosPU(A) cos((A)*6.283185307)
4051 #define _IQ17cosPU(A) cos((A)*6.283185307)
4052 #define _IQ16cosPU(A) cos((A)*6.283185307)
4053 #define _IQ15cosPU(A) cos((A)*6.283185307)
4054 #define _IQ14cosPU(A) cos((A)*6.283185307)
4055 #define _IQ13cosPU(A) cos((A)*6.283185307)
4056 #define _IQ12cosPU(A) cos((A)*6.283185307)
4057 #define _IQ11cosPU(A) cos((A)*6.283185307)
4058 #define _IQ10cosPU(A) cos((A)*6.283185307)
4059 #define _IQ9cosPU(A) cos((A)*6.283185307)
4060 #define _IQ8cosPU(A) cos((A)*6.283185307)
4061 #define _IQ7cosPU(A) cos((A)*6.283185307)
4062 #define _IQ6cosPU(A) cos((A)*6.283185307)
4063 #define _IQ5cosPU(A) cos((A)*6.283185307)
4064 #define _IQ4cosPU(A) cos((A)*6.283185307)
4065 #define _IQ3cosPU(A) cos((A)*6.283185307)
4066 #define _IQ2cosPU(A) cos((A)*6.283185307)
4067 #define _IQ1cosPU(A) cos((A)*6.283185307)
4068 //---------------------------------------------------------------------------
4069 #define _IQacos(A) acos(A)
4070 #define _IQ29acos(A) acos(A)
4071 #define _IQ28acos(A) acos(A)
4072 #define _IQ27acos(A) acos(A)
4073 #define _IQ26acos(A) acos(A)
4074 #define _IQ25acos(A) acos(A)
4075 #define _IQ24acos(A) acos(A)
4076 #define _IQ23acos(A) acos(A)
4077 #define _IQ22acos(A) acos(A)
4078 #define _IQ21acos(A) acos(A)
4079 #define _IQ20acos(A) acos(A)
4080 #define _IQ19acos(A) acos(A)
4081 #define _IQ18acos(A) acos(A)
4082 #define _IQ17acos(A) acos(A)
4083 #define _IQ16acos(A) acos(A)
4084 #define _IQ15acos(A) acos(A)
4085 #define _IQ14acos(A) acos(A)
4086 #define _IQ13acos(A) acos(A)
4087 #define _IQ12acos(A) acos(A)
4088 #define _IQ11acos(A) acos(A)
4089 #define _IQ10acos(A) acos(A)
4090 #define _IQ9acos(A) acos(A)
4091 #define _IQ8acos(A) acos(A)
4092 #define _IQ7acos(A) acos(A)
4093 #define _IQ6acos(A) acos(A)
4094 #define _IQ5acos(A) acos(A)
4095 #define _IQ4acos(A) acos(A)
4096 #define _IQ3acos(A) acos(A)
4097 #define _IQ2acos(A) acos(A)
4098 #define _IQ1acos(A) acos(A)
4099 //---------------------------------------------------------------------------
4100 #define _IQatan(A) atan(A)
4101 #define _IQ30atan(A) atan(A)
4102 #define _IQ29atan(A) atan(A)
4103 #define _IQ28atan(A) atan(A)
4104 #define _IQ27atan(A) atan(A)
4105 #define _IQ26atan(A) atan(A)
4106 #define _IQ25atan(A) atan(A)
4107 #define _IQ24atan(A) atan(A)
4108 #define _IQ23atan(A) atan(A)
4109 #define _IQ22atan(A) atan(A)
4110 #define _IQ21atan(A) atan(A)
4111 #define _IQ20atan(A) atan(A)
4112 #define _IQ19atan(A) atan(A)
4113 #define _IQ18atan(A) atan(A)
4114 #define _IQ17atan(A) atan(A)
4115 #define _IQ16atan(A) atan(A)
4116 #define _IQ15atan(A) atan(A)
4117 #define _IQ14atan(A) atan(A)
4118 #define _IQ13atan(A) atan(A)
4119 #define _IQ12atan(A) atan(A)
4120 #define _IQ11atan(A) atan(A)
4121 #define _IQ10atan(A) atan(A)
4122 #define _IQ9atan(A) atan(A)
4123 #define _IQ8atan(A) atan(A)
4124 #define _IQ7atan(A) atan(A)
4125 #define _IQ6atan(A) atan(A)
4126 #define _IQ5atan(A) atan(A)
4127 #define _IQ4atan(A) atan(A)
4128 #define _IQ3atan(A) atan(A)
4129 #define _IQ2atan(A) atan(A)
4130 #define _IQ1atan(A) atan(A)
4131 //---------------------------------------------------------------------------
4132 #define _IQatan2(A,B) atan2(A,B)
4133 #define _IQ30atan2(A,B) atan2(A,B)
4134 #define _IQ29atan2(A,B) atan2(A,B)
4135 #define _IQ28atan2(A,B) atan2(A,B)
4136 #define _IQ27atan2(A,B) atan2(A,B)
4137 #define _IQ26atan2(A,B) atan2(A,B)
4138 #define _IQ25atan2(A,B) atan2(A,B)
4139 #define _IQ24atan2(A,B) atan2(A,B)
4140 #define _IQ23atan2(A,B) atan2(A,B)
4141 #define _IQ22atan2(A,B) atan2(A,B)
4142 #define _IQ21atan2(A,B) atan2(A,B)
4143 #define _IQ20atan2(A,B) atan2(A,B)
4144 #define _IQ19atan2(A,B) atan2(A,B)
4145 #define _IQ18atan2(A,B) atan2(A,B)
4146 #define _IQ17atan2(A,B) atan2(A,B)
4147 #define _IQ16atan2(A,B) atan2(A,B)
4148 #define _IQ15atan2(A,B) atan2(A,B)
4149 #define _IQ14atan2(A,B) atan2(A,B)
4150 #define _IQ13atan2(A,B) atan2(A,B)
4151 #define _IQ12atan2(A,B) atan2(A,B)
4152 #define _IQ11atan2(A,B) atan2(A,B)
4153 #define _IQ10atan2(A,B) atan2(A,B)
4154 #define _IQ9atan2(A,B) atan2(A,B)
4155 #define _IQ8atan2(A,B) atan2(A,B)
4156 #define _IQ7atan2(A,B) atan2(A,B)
4157 #define _IQ6atan2(A,B) atan2(A,B)
4158 #define _IQ5atan2(A,B) atan2(A,B)
4159 #define _IQ4atan2(A,B) atan2(A,B)
4160 #define _IQ3atan2(A,B) atan2(A,B)
4161 #define _IQ2atan2(A,B) atan2(A,B)
4162 #define _IQ1atan2(A,B) atan2(A,B)
4163 //---------------------------------------------------------------------------
4164 #define _IQatan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4165 #define _IQ30atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4166 #define _IQ29atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4167 #define _IQ28atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4168 #define _IQ27atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4169 #define _IQ26atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4170 #define _IQ25atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4171 #define _IQ24atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4172 #define _IQ23atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4173 #define _IQ22atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4174 #define _IQ21atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4175 #define _IQ20atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4176 #define _IQ19atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4177 #define _IQ18atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4178 #define _IQ17atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4179 #define _IQ16atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4180 #define _IQ15atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4181 #define _IQ14atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4182 #define _IQ13atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4183 #define _IQ12atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4184 #define _IQ11atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4185 #define _IQ10atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4186 #define _IQ9atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4187 #define _IQ8atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4188 #define _IQ7atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4189 #define _IQ6atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4190 #define _IQ5atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4191 #define _IQ4atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4192 #define _IQ3atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4193 #define _IQ2atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4194 #define _IQ1atan2PU(A,B) ((atan2(A,B)*(1.0/6.283185307)) >= 0.0 ? (atan2(A,B)*(1.0/6.283185307)):1.0 + (atan2(A,B)*(1.0/6.283185307)))
4195 //---------------------------------------------------------------------------
4196 #define _IQsqrt(A) sqrt(A)
4197 #define _IQ30sqrt(A) sqrt(A)
4198 #define _IQ29sqrt(A) sqrt(A)
4199 #define _IQ28sqrt(A) sqrt(A)
4200 #define _IQ27sqrt(A) sqrt(A)
4201 #define _IQ26sqrt(A) sqrt(A)
4202 #define _IQ25sqrt(A) sqrt(A)
4203 #define _IQ24sqrt(A) sqrt(A)
4204 #define _IQ23sqrt(A) sqrt(A)
4205 #define _IQ22sqrt(A) sqrt(A)
4206 #define _IQ21sqrt(A) sqrt(A)
4207 #define _IQ20sqrt(A) sqrt(A)
4208 #define _IQ19sqrt(A) sqrt(A)
4209 #define _IQ18sqrt(A) sqrt(A)
4210 #define _IQ17sqrt(A) sqrt(A)
4211 #define _IQ16sqrt(A) sqrt(A)
4212 #define _IQ15sqrt(A) sqrt(A)
4213 #define _IQ14sqrt(A) sqrt(A)
4214 #define _IQ13sqrt(A) sqrt(A)
4215 #define _IQ12sqrt(A) sqrt(A)
4216 #define _IQ11sqrt(A) sqrt(A)
4217 #define _IQ10sqrt(A) sqrt(A)
4218 #define _IQ9sqrt(A) sqrt(A)
4219 #define _IQ8sqrt(A) sqrt(A)
4220 #define _IQ7sqrt(A) sqrt(A)
4221 #define _IQ6sqrt(A) sqrt(A)
4222 #define _IQ5sqrt(A) sqrt(A)
4223 #define _IQ4sqrt(A) sqrt(A)
4224 #define _IQ3sqrt(A) sqrt(A)
4225 #define _IQ2sqrt(A) sqrt(A)
4226 #define _IQ1sqrt(A) sqrt(A)
4227 //---------------------------------------------------------------------------
4228 #define _IQisqrt(A) (1.0/sqrt(A))
4229 #define _IQ30isqrt(A) (1.0/sqrt(A))
4230 #define _IQ29isqrt(A) (1.0/sqrt(A))
4231 #define _IQ28isqrt(A) (1.0/sqrt(A))
4232 #define _IQ27isqrt(A) (1.0/sqrt(A))
4233 #define _IQ26isqrt(A) (1.0/sqrt(A))
4234 #define _IQ25isqrt(A) (1.0/sqrt(A))
4235 #define _IQ24isqrt(A) (1.0/sqrt(A))
4236 #define _IQ23isqrt(A) (1.0/sqrt(A))
4237 #define _IQ22isqrt(A) (1.0/sqrt(A))
4238 #define _IQ21isqrt(A) (1.0/sqrt(A))
4239 #define _IQ20isqrt(A) (1.0/sqrt(A))
4240 #define _IQ19isqrt(A) (1.0/sqrt(A))
4241 #define _IQ18isqrt(A) (1.0/sqrt(A))
4242 #define _IQ17isqrt(A) (1.0/sqrt(A))
4243 #define _IQ16isqrt(A) (1.0/sqrt(A))
4244 #define _IQ15isqrt(A) (1.0/sqrt(A))
4245 #define _IQ14isqrt(A) (1.0/sqrt(A))
4246 #define _IQ13isqrt(A) (1.0/sqrt(A))
4247 #define _IQ12isqrt(A) (1.0/sqrt(A))
4248 #define _IQ11isqrt(A) (1.0/sqrt(A))
4249 #define _IQ10isqrt(A) (1.0/sqrt(A))
4250 #define _IQ9isqrt(A) (1.0/sqrt(A))
4251 #define _IQ8isqrt(A) (1.0/sqrt(A))
4252 #define _IQ7isqrt(A) (1.0/sqrt(A))
4253 #define _IQ6isqrt(A) (1.0/sqrt(A))
4254 #define _IQ5isqrt(A) (1.0/sqrt(A))
4255 #define _IQ4isqrt(A) (1.0/sqrt(A))
4256 #define _IQ3isqrt(A) (1.0/sqrt(A))
4257 #define _IQ2isqrt(A) (1.0/sqrt(A))
4258 #define _IQ1isqrt(A) (1.0/sqrt(A))
4259 //---------------------------------------------------------------------------
4260 #define _IQexp(A) exp(A)
4261 #define _IQ30exp(A) exp(A)
4262 #define _IQ29exp(A) exp(A)
4263 #define _IQ28exp(A) exp(A)
4264 #define _IQ27exp(A) exp(A)
4265 #define _IQ26exp(A) exp(A)
4266 #define _IQ25exp(A) exp(A)
4267 #define _IQ24exp(A) exp(A)
4268 #define _IQ23exp(A) exp(A)
4269 #define _IQ22exp(A) exp(A)
4270 #define _IQ21exp(A) exp(A)
4271 #define _IQ20exp(A) exp(A)
4272 #define _IQ19exp(A) exp(A)
4273 #define _IQ18exp(A) exp(A)
4274 #define _IQ17exp(A) exp(A)
4275 #define _IQ16exp(A) exp(A)
4276 #define _IQ15exp(A) exp(A)
4277 #define _IQ14exp(A) exp(A)
4278 #define _IQ13exp(A) exp(A)
4279 #define _IQ12exp(A) exp(A)
4280 #define _IQ11exp(A) exp(A)
4281 #define _IQ10exp(A) exp(A)
4282 #define _IQ9exp(A) exp(A)
4283 #define _IQ8exp(A) exp(A)
4284 #define _IQ7exp(A) exp(A)
4285 #define _IQ6exp(A) exp(A)
4286 #define _IQ5exp(A) exp(A)
4287 #define _IQ4exp(A) exp(A)
4288 #define _IQ3exp(A) exp(A)
4289 #define _IQ2exp(A) exp(A)
4290 #define _IQ1exp(A) exp(A)
4291 //---------------------------------------------------------------------------
4292 #define _IQint(A) ((long) (A))
4293 #define _IQ30int(A) ((long) (A))
4294 #define _IQ29int(A) ((long) (A))
4295 #define _IQ28int(A) ((long) (A))
4296 #define _IQ27int(A) ((long) (A))
4297 #define _IQ26int(A) ((long) (A))
4298 #define _IQ25int(A) ((long) (A))
4299 #define _IQ24int(A) ((long) (A))
4300 #define _IQ23int(A) ((long) (A))
4301 #define _IQ22int(A) ((long) (A))
4302 #define _IQ21int(A) ((long) (A))
4303 #define _IQ20int(A) ((long) (A))
4304 #define _IQ19int(A) ((long) (A))
4305 #define _IQ18int(A) ((long) (A))
4306 #define _IQ17int(A) ((long) (A))
4307 #define _IQ16int(A) ((long) (A))
4308 #define _IQ15int(A) ((long) (A))
4309 #define _IQ14int(A) ((long) (A))
4310 #define _IQ13int(A) ((long) (A))
4311 #define _IQ12int(A) ((long) (A))
4312 #define _IQ11int(A) ((long) (A))
4313 #define _IQ10int(A) ((long) (A))
4314 #define _IQ9int(A) ((long) (A))
4315 #define _IQ8int(A) ((long) (A))
4316 #define _IQ7int(A) ((long) (A))
4317 #define _IQ6int(A) ((long) (A))
4318 #define _IQ5int(A) ((long) (A))
4319 #define _IQ4int(A) ((long) (A))
4320 #define _IQ3int(A) ((long) (A))
4321 #define _IQ2int(A) ((long) (A))
4322 #define _IQ1int(A) ((long) (A))
4323 //---------------------------------------------------------------------------
4324 #define _IQfrac(A) ((A) - (float)((long) (A)))
4325 #define _IQ30frac(A) ((A) - (float)((long) (A)))
4326 #define _IQ29frac(A) ((A) - (float)((long) (A)))
4327 #define _IQ28frac(A) ((A) - (float)((long) (A)))
4328 #define _IQ27frac(A) ((A) - (float)((long) (A)))
4329 #define _IQ26frac(A) ((A) - (float)((long) (A)))
4330 #define _IQ25frac(A) ((A) - (float)((long) (A)))
4331 #define _IQ24frac(A) ((A) - (float)((long) (A)))
4332 #define _IQ23frac(A) ((A) - (float)((long) (A)))
4333 #define _IQ22frac(A) ((A) - (float)((long) (A)))
4334 #define _IQ21frac(A) ((A) - (float)((long) (A)))
4335 #define _IQ20frac(A) ((A) - (float)((long) (A)))
4336 #define _IQ19frac(A) ((A) - (float)((long) (A)))
4337 #define _IQ18frac(A) ((A) - (float)((long) (A)))
4338 #define _IQ17frac(A) ((A) - (float)((long) (A)))
4339 #define _IQ16frac(A) ((A) - (float)((long) (A)))
4340 #define _IQ15frac(A) ((A) - (float)((long) (A)))
4341 #define _IQ14frac(A) ((A) - (float)((long) (A)))
4342 #define _IQ13frac(A) ((A) - (float)((long) (A)))
4343 #define _IQ12frac(A) ((A) - (float)((long) (A)))
4344 #define _IQ11frac(A) ((A) - (float)((long) (A)))
4345 #define _IQ10frac(A) ((A) - (float)((long) (A)))
4346 #define _IQ9frac(A) ((A) - (float)((long) (A)))
4347 #define _IQ8frac(A) ((A) - (float)((long) (A)))
4348 #define _IQ7frac(A) ((A) - (float)((long) (A)))
4349 #define _IQ6frac(A) ((A) - (float)((long) (A)))
4350 #define _IQ5frac(A) ((A) - (float)((long) (A)))
4351 #define _IQ4frac(A) ((A) - (float)((long) (A)))
4352 #define _IQ3frac(A) ((A) - (float)((long) (A)))
4353 #define _IQ2frac(A) ((A) - (float)((long) (A)))
4354 #define _IQ1frac(A) ((A) - (float)((long) (A)))
4355 //---------------------------------------------------------------------------
4356 #define _IQmpyIQX(A, IQA, B, IQB) ((A)*(B))
4357 #define _IQ30mpyIQX(A, IQA, B, IQB) ((A)*(B))
4358 #define _IQ29mpyIQX(A, IQA, B, IQB) ((A)*(B))
4359 #define _IQ28mpyIQX(A, IQA, B, IQB) ((A)*(B))
4360 #define _IQ27mpyIQX(A, IQA, B, IQB) ((A)*(B))
4361 #define _IQ26mpyIQX(A, IQA, B, IQB) ((A)*(B))
4362 #define _IQ25mpyIQX(A, IQA, B, IQB) ((A)*(B))
4363 #define _IQ24mpyIQX(A, IQA, B, IQB) ((A)*(B))
4364 #define _IQ23mpyIQX(A, IQA, B, IQB) ((A)*(B))
4365 #define _IQ22mpyIQX(A, IQA, B, IQB) ((A)*(B))
4366 #define _IQ21mpyIQX(A, IQA, B, IQB) ((A)*(B))
4367 #define _IQ20mpyIQX(A, IQA, B, IQB) ((A)*(B))
4368 #define _IQ19mpyIQX(A, IQA, B, IQB) ((A)*(B))
4369 #define _IQ18mpyIQX(A, IQA, B, IQB) ((A)*(B))
4370 #define _IQ17mpyIQX(A, IQA, B, IQB) ((A)*(B))
4371 #define _IQ16mpyIQX(A, IQA, B, IQB) ((A)*(B))
4372 #define _IQ15mpyIQX(A, IQA, B, IQB) ((A)*(B))
4373 #define _IQ14mpyIQX(A, IQA, B, IQB) ((A)*(B))
4374 #define _IQ13mpyIQX(A, IQA, B, IQB) ((A)*(B))
4375 #define _IQ12mpyIQX(A, IQA, B, IQB) ((A)*(B))
4376 #define _IQ11mpyIQX(A, IQA, B, IQB) ((A)*(B))
4377 #define _IQ10mpyIQX(A, IQA, B, IQB) ((A)*(B))
4378 #define _IQ9mpyIQX(A, IQA, B, IQB) ((A)*(B))
4379 #define _IQ8mpyIQX(A, IQA, B, IQB) ((A)*(B))
4380 #define _IQ7mpyIQX(A, IQA, B, IQB) ((A)*(B))
4381 #define _IQ6mpyIQX(A, IQA, B, IQB) ((A)*(B))
4382 #define _IQ5mpyIQX(A, IQA, B, IQB) ((A)*(B))
4383 #define _IQ4mpyIQX(A, IQA, B, IQB) ((A)*(B))
4384 #define _IQ3mpyIQX(A, IQA, B, IQB) ((A)*(B))
4385 #define _IQ2mpyIQX(A, IQA, B, IQB) ((A)*(B))
4386 #define _IQ1mpyIQX(A, IQA, B, IQB) ((A)*(B))
4387 //---------------------------------------------------------------------------
4388 #define _IQmpyI32(A,B) ((A) * (float) (B))
4389 #define _IQ30mpyI32(A,B) ((A) * (float) (B))
4390 #define _IQ29mpyI32(A,B) ((A) * (float) (B))
4391 #define _IQ28mpyI32(A,B) ((A) * (float) (B))
4392 #define _IQ27mpyI32(A,B) ((A) * (float) (B))
4393 #define _IQ26mpyI32(A,B) ((A) * (float) (B))
4394 #define _IQ25mpyI32(A,B) ((A) * (float) (B))
4395 #define _IQ24mpyI32(A,B) ((A) * (float) (B))
4396 #define _IQ23mpyI32(A,B) ((A) * (float) (B))
4397 #define _IQ22mpyI32(A,B) ((A) * (float) (B))
4398 #define _IQ21mpyI32(A,B) ((A) * (float) (B))
4399 #define _IQ20mpyI32(A,B) ((A) * (float) (B))
4400 #define _IQ19mpyI32(A,B) ((A) * (float) (B))
4401 #define _IQ18mpyI32(A,B) ((A) * (float) (B))
4402 #define _IQ17mpyI32(A,B) ((A) * (float) (B))
4403 #define _IQ16mpyI32(A,B) ((A) * (float) (B))
4404 #define _IQ15mpyI32(A,B) ((A) * (float) (B))
4405 #define _IQ14mpyI32(A,B) ((A) * (float) (B))
4406 #define _IQ13mpyI32(A,B) ((A) * (float) (B))
4407 #define _IQ12mpyI32(A,B) ((A) * (float) (B))
4408 #define _IQ11mpyI32(A,B) ((A) * (float) (B))
4409 #define _IQ10mpyI32(A,B) ((A) * (float) (B))
4410 #define _IQ9mpyI32(A,B) ((A) * (float) (B))
4411 #define _IQ8mpyI32(A,B) ((A) * (float) (B))
4412 #define _IQ7mpyI32(A,B) ((A) * (float) (B))
4413 #define _IQ6mpyI32(A,B) ((A) * (float) (B))
4414 #define _IQ5mpyI32(A,B) ((A) * (float) (B))
4415 #define _IQ4mpyI32(A,B) ((A) * (float) (B))
4416 #define _IQ3mpyI32(A,B) ((A) * (float) (B))
4417 #define _IQ2mpyI32(A,B) ((A) * (float) (B))
4418 #define _IQ1mpyI32(A,B) ((A) * (float) (B))
4419 //---------------------------------------------------------------------------
4420 #define _IQmpyI32int(A,B) ((long) ((A) * (float) (B)))
4421 #define _IQ30mpyI32int(A,B) ((long) ((A) * (float) (B)))
4422 #define _IQ29mpyI32int(A,B) ((long) ((A) * (float) (B)))
4423 #define _IQ28mpyI32int(A,B) ((long) ((A) * (float) (B)))
4424 #define _IQ27mpyI32int(A,B) ((long) ((A) * (float) (B)))
4425 #define _IQ26mpyI32int(A,B) ((long) ((A) * (float) (B)))
4426 #define _IQ25mpyI32int(A,B) ((long) ((A) * (float) (B)))
4427 #define _IQ24mpyI32int(A,B) ((long) ((A) * (float) (B)))
4428 #define _IQ23mpyI32int(A,B) ((long) ((A) * (float) (B)))
4429 #define _IQ22mpyI32int(A,B) ((long) ((A) * (float) (B)))
4430 #define _IQ21mpyI32int(A,B) ((long) ((A) * (float) (B)))
4431 #define _IQ20mpyI32int(A,B) ((long) ((A) * (float) (B)))
4432 #define _IQ19mpyI32int(A,B) ((long) ((A) * (float) (B)))
4433 #define _IQ18mpyI32int(A,B) ((long) ((A) * (float) (B)))
4434 #define _IQ17mpyI32int(A,B) ((long) ((A) * (float) (B)))
4435 #define _IQ16mpyI32int(A,B) ((long) ((A) * (float) (B)))
4436 #define _IQ15mpyI32int(A,B) ((long) ((A) * (float) (B)))
4437 #define _IQ14mpyI32int(A,B) ((long) ((A) * (float) (B)))
4438 #define _IQ13mpyI32int(A,B) ((long) ((A) * (float) (B)))
4439 #define _IQ12mpyI32int(A,B) ((long) ((A) * (float) (B)))
4440 #define _IQ11mpyI32int(A,B) ((long) ((A) * (float) (B)))
4441 #define _IQ10mpyI32int(A,B) ((long) ((A) * (float) (B)))
4442 #define _IQ9mpyI32int(A,B) ((long) ((A) * (float) (B)))
4443 #define _IQ8mpyI32int(A,B) ((long) ((A) * (float) (B)))
4444 #define _IQ7mpyI32int(A,B) ((long) ((A) * (float) (B)))
4445 #define _IQ6mpyI32int(A,B) ((long) ((A) * (float) (B)))
4446 #define _IQ5mpyI32int(A,B) ((long) ((A) * (float) (B)))
4447 #define _IQ4mpyI32int(A,B) ((long) ((A) * (float) (B)))
4448 #define _IQ3mpyI32int(A,B) ((long) ((A) * (float) (B)))
4449 #define _IQ2mpyI32int(A,B) ((long) ((A) * (float) (B)))
4450 #define _IQ1mpyI32int(A,B) ((long) ((A) * (float) (B)))
4451 //---------------------------------------------------------------------------
4452 #define _IQmpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4453 #define _IQ30mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4454 #define _IQ29mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4455 #define _IQ28mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4456 #define _IQ27mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4457 #define _IQ26mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4458 #define _IQ25mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4459 #define _IQ24mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4460 #define _IQ23mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4461 #define _IQ22mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4462 #define _IQ21mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4463 #define _IQ20mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4464 #define _IQ19mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4465 #define _IQ18mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4466 #define _IQ17mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4467 #define _IQ16mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4468 #define _IQ15mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4469 #define _IQ14mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4470 #define _IQ13mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4471 #define _IQ12mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4472 #define _IQ11mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4473 #define _IQ10mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4474 #define _IQ9mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4475 #define _IQ8mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4476 #define _IQ7mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4477 #define _IQ6mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4478 #define _IQ5mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4479 #define _IQ4mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4480 #define _IQ3mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4481 #define _IQ2mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4482 #define _IQ1mpyI32frac(A,B) ((A) - (float)((long) ((A) * (float) (B))))
4483 //---------------------------------------------------------------------------
4484 #define _IQmag(A,B) sqrt((A)*(A) + (B)*(B))
4485 #define _IQ30mag(A,B) sqrt((A)*(A) + (B)*(B))
4486 #define _IQ29mag(A,B) sqrt((A)*(A) + (B)*(B))
4487 #define _IQ28mag(A,B) sqrt((A)*(A) + (B)*(B))
4488 #define _IQ27mag(A,B) sqrt((A)*(A) + (B)*(B))
4489 #define _IQ26mag(A,B) sqrt((A)*(A) + (B)*(B))
4490 #define _IQ25mag(A,B) sqrt((A)*(A) + (B)*(B))
4491 #define _IQ24mag(A,B) sqrt((A)*(A) + (B)*(B))
4492 #define _IQ23mag(A,B) sqrt((A)*(A) + (B)*(B))
4493 #define _IQ22mag(A,B) sqrt((A)*(A) + (B)*(B))
4494 #define _IQ21mag(A,B) sqrt((A)*(A) + (B)*(B))
4495 #define _IQ20mag(A,B) sqrt((A)*(A) + (B)*(B))
4496 #define _IQ19mag(A,B) sqrt((A)*(A) + (B)*(B))
4497 #define _IQ18mag(A,B) sqrt((A)*(A) + (B)*(B))
4498 #define _IQ17mag(A,B) sqrt((A)*(A) + (B)*(B))
4499 #define _IQ16mag(A,B) sqrt((A)*(A) + (B)*(B))
4500 #define _IQ15mag(A,B) sqrt((A)*(A) + (B)*(B))
4501 #define _IQ14mag(A,B) sqrt((A)*(A) + (B)*(B))
4502 #define _IQ13mag(A,B) sqrt((A)*(A) + (B)*(B))
4503 #define _IQ12mag(A,B) sqrt((A)*(A) + (B)*(B))
4504 #define _IQ11mag(A,B) sqrt((A)*(A) + (B)*(B))
4505 #define _IQ10mag(A,B) sqrt((A)*(A) + (B)*(B))
4506 #define _IQ9mag(A,B) sqrt((A)*(A) + (B)*(B))
4507 #define _IQ8mag(A,B) sqrt((A)*(A) + (B)*(B))
4508 #define _IQ7mag(A,B) sqrt((A)*(A) + (B)*(B))
4509 #define _IQ6mag(A,B) sqrt((A)*(A) + (B)*(B))
4510 #define _IQ5mag(A,B) sqrt((A)*(A) + (B)*(B))
4511 #define _IQ4mag(A,B) sqrt((A)*(A) + (B)*(B))
4512 #define _IQ3mag(A,B) sqrt((A)*(A) + (B)*(B))
4513 #define _IQ2mag(A,B) sqrt((A)*(A) + (B)*(B))
4514 #define _IQ1mag(A,B) sqrt((A)*(A) + (B)*(B))
4515 //---------------------------------------------------------------------------
4516 #define _atoIQ(A) atof(A)
4517 #define _atoIQ30(A) atof(A)
4518 #define _atoIQ29(A) atof(A)
4519 #define _atoIQ28(A) atof(A)
4520 #define _atoIQ27(A) atof(A)
4521 #define _atoIQ26(A) atof(A)
4522 #define _atoIQ25(A) atof(A)
4523 #define _atoIQ24(A) atof(A)
4524 #define _atoIQ23(A) atof(A)
4525 #define _atoIQ22(A) atof(A)
4526 #define _atoIQ21(A) atof(A)
4527 #define _atoIQ20(A) atof(A)
4528 #define _atoIQ19(A) atof(A)
4529 #define _atoIQ18(A) atof(A)
4530 #define _atoIQ17(A) atof(A)
4531 #define _atoIQ16(A) atof(A)
4532 #define _atoIQ15(A) atof(A)
4533 #define _atoIQ14(A) atof(A)
4534 #define _atoIQ13(A) atof(A)
4535 #define _atoIQ12(A) atof(A)
4536 #define _atoIQ11(A) atof(A)
4537 #define _atoIQ10(A) atof(A)
4538 #define _atoIQ9(A) atof(A)
4539 #define _atoIQ8(A) atof(A)
4540 #define _atoIQ7(A) atof(A)
4541 #define _atoIQ6(A) atof(A)
4542 #define _atoIQ5(A) atof(A)
4543 #define _atoIQ4(A) atof(A)
4544 #define _atoIQ3(A) atof(A)
4545 #define _atoIQ2(A) atof(A)
4546 #define _atoIQ1(A) atof(A)
4547 //---------------------------------------------------------------------------
4548 #define _IQtoa(A, B, C) sprintf(A, B, C)
4549 #define _IQ30toa(A, B, C) sprintf(A, B, C)
4550 #define _IQ29toa(A, B, C) sprintf(A, B, C)
4551 #define _IQ28toa(A, B, C) sprintf(A, B, C)
4552 #define _IQ27toa(A, B, C) sprintf(A, B, C)
4553 #define _IQ26toa(A, B, C) sprintf(A, B, C)
4554 #define _IQ25toa(A, B, C) sprintf(A, B, C)
4555 #define _IQ24toa(A, B, C) sprintf(A, B, C)
4556 #define _IQ23toa(A, B, C) sprintf(A, B, C)
4557 #define _IQ22toa(A, B, C) sprintf(A, B, C)
4558 #define _IQ21toa(A, B, C) sprintf(A, B, C)
4559 #define _IQ20toa(A, B, C) sprintf(A, B, C)
4560 #define _IQ19toa(A, B, C) sprintf(A, B, C)
4561 #define _IQ18toa(A, B, C) sprintf(A, B, C)
4562 #define _IQ17toa(A, B, C) sprintf(A, B, C)
4563 #define _IQ16toa(A, B, C) sprintf(A, B, C)
4564 #define _IQ15toa(A, B, C) sprintf(A, B, C)
4565 #define _IQ14toa(A, B, C) sprintf(A, B, C)
4566 #define _IQ13toa(A, B, C) sprintf(A, B, C)
4567 #define _IQ12toa(A, B, C) sprintf(A, B, C)
4568 #define _IQ11toa(A, B, C) sprintf(A, B, C)
4569 #define _IQ10toa(A, B, C) sprintf(A, B, C)
4570 #define _IQ9toa(A, B, C) sprintf(A, B, C)
4571 #define _IQ8toa(A, B, C) sprintf(A, B, C)
4572 #define _IQ7toa(A, B, C) sprintf(A, B, C)
4573 #define _IQ6toa(A, B, C) sprintf(A, B, C)
4574 #define _IQ5toa(A, B, C) sprintf(A, B, C)
4575 #define _IQ4toa(A, B, C) sprintf(A, B, C)
4576 #define _IQ3toa(A, B, C) sprintf(A, B, C)
4577 #define _IQ2toa(A, B, C) sprintf(A, B, C)
4578 #define _IQ1toa(A, B, C) sprintf(A, B, C)
4579 //---------------------------------------------------------------------------
4580 #define _IQabs(A) fabs(A)
4581 #define _IQ30abs(A) fabs(A)
4582 #define _IQ29abs(A) fabs(A)
4583 #define _IQ28abs(A) fabs(A)
4584 #define _IQ27abs(A) fabs(A)
4585 #define _IQ26abs(A) fabs(A)
4586 #define _IQ25abs(A) fabs(A)
4587 #define _IQ24abs(A) fabs(A)
4588 #define _IQ23abs(A) fabs(A)
4589 #define _IQ22abs(A) fabs(A)
4590 #define _IQ21abs(A) fabs(A)
4591 #define _IQ20abs(A) fabs(A)
4592 #define _IQ19abs(A) fabs(A)
4593 #define _IQ18abs(A) fabs(A)
4594 #define _IQ17abs(A) fabs(A)
4595 #define _IQ16abs(A) fabs(A)
4596 #define _IQ15abs(A) fabs(A)
4597 #define _IQ14abs(A) fabs(A)
4598 #define _IQ13abs(A) fabs(A)
4599 #define _IQ12abs(A) fabs(A)
4600 #define _IQ11abs(A) fabs(A)
4601 #define _IQ10abs(A) fabs(A)
4602 #define _IQ9abs(A) fabs(A)
4603 #define _IQ8abs(A) fabs(A)
4604 #define _IQ7abs(A) fabs(A)
4605 #define _IQ6abs(A) fabs(A)
4606 #define _IQ5abs(A) fabs(A)
4607 #define _IQ4abs(A) fabs(A)
4608 #define _IQ3abs(A) fabs(A)
4609 #define _IQ2abs(A) fabs(A)
4610 #define _IQ1abs(A) fabs(A)
4611 //###########################################################################
4612 #endif // No more.
4613 //###########################################################################
4614
4615 #ifdef __cplusplus
4616 }
4617 #endif // extern "C"
4618
4620 #endif /* __IQMATHLIB_H_INCLUDED__ */
_IQ13int
long _IQ13int(long A)
_IQ12div
long _IQ12div(long A, long B)
_IQ21toF
float _IQ21toF(long A)
_IQ30int
long _IQ30int(long A)
_IQ1sqrt
long _IQ1sqrt(long A)
_atoIQN
long _atoIQN(const char *A, long q_value)
_IQ5acos
long _IQ5acos(long A)
_IQ27mpyI32int
long _IQ27mpyI32int(long A, long B)
_iq27
long _iq27
Definition: 32b/IQmathLib.h:227
_IQ1frac
long _IQ1frac(long A)
_IQ17cosPU
long _IQ17cosPU(long A)
_iq7
long _iq7
Definition: 32b/IQmathLib.h:247
_IQ7mpyI32int
long _IQ7mpyI32int(long A, long B)
_IQ2rmpy
long _IQ2rmpy(long A, long B)
_IQ22toF
float _IQ22toF(long A)
_IQ24isqrt
long _IQ24isqrt(long A)
_IQ12isqrt
long _IQ12isqrt(long A)
_IQ26sinPU
long _IQ26sinPU(long A)
_IQ29asin
long _IQ29asin(long A)
_IQ14rsmpy
long _IQ14rsmpy(long A, long B)
_IQ18cos
long _IQ18cos(long A)
_IQ21mpyI32int
long _IQ21mpyI32int(long A, long B)
_IQ26atan2
long _IQ26atan2(long A, long B)
_IQ26mag
long _IQ26mag(long A, long B)
_IQ3frac
long _IQ3frac(long A)
_IQ21div
long _IQ21div(long A, long B)
_IQ15int
long _IQ15int(long A)
_IQ28atan2PU
long _IQ28atan2PU(long A, long B)
_IQ10atan2
long _IQ10atan2(long A, long B)
_iq25
long _iq25
Definition: 32b/IQmathLib.h:229
_IQ22cosPU
long _IQ22cosPU(long A)
_IQ25rmpy
long _IQ25rmpy(long A, long B)
_IQ12atan2PU
long _IQ12atan2PU(long A, long B)
_IQ18rsmpy
long _IQ18rsmpy(long A, long B)
_IQ24div
long _IQ24div(long A, long B)
_IQ28mag
long _IQ28mag(long A, long B)
_IQ23acos
long _IQ23acos(long A)
_IQ23sqrt
long _IQ23sqrt(long A)
_IQ23toa
#define _IQ23toa(A, B, C)
Definition: 32b/IQmathLib.h:3417
_iq26
long _iq26
Definition: 32b/IQmathLib.h:228
_IQ8cos
long _IQ8cos(long A)
_IQ5cos
long _IQ5cos(long A)
_IQ11mag
long _IQ11mag(long A, long B)
_IQ15cosPU
long _IQ15cosPU(long A)
_IQ4asin
long _IQ4asin(long A)
_IQ25div
long _IQ25div(long A, long B)
_IQ22mag
long _IQ22mag(long A, long B)
_IQ16isqrt
long _IQ16isqrt(long A)
_IQ28acos
long _IQ28acos(long A)
_IQ29mpyI32frac
long _IQ29mpyI32frac(long A, long B)
_IQ23cos
long _IQ23cos(long A)
_IQ23frac
long _IQ23frac(long A)
_IQ11sin
long _IQ11sin(long A)
_IQ24toa
#define _IQ24toa(A, B, C)
Definition: 32b/IQmathLib.h:3416
_IQ26mpyI32int
long _IQ26mpyI32int(long A, long B)
_IQ6mpyI32int
long _IQ6mpyI32int(long A, long B)
_IQ28cosPU
long _IQ28cosPU(long A)
_IQ3toF
float _IQ3toF(long A)
_IQ20atan2
long _IQ20atan2(long A, long B)
_IQ21atan2PU
long _IQ21atan2PU(long A, long B)
_IQ9int
long _IQ9int(long A)
_IQ25asin
long _IQ25asin(long A)
_IQ8toa
#define _IQ8toa(A, B, C)
Definition: 32b/IQmathLib.h:3432
_IQ13mpyI32frac
long _IQ13mpyI32frac(long A, long B)
_IQ14sinPU
long _IQ14sinPU(long A)
_IQ22atan2PU
long _IQ22atan2PU(long A, long B)
_IQ16div
long _IQ16div(long A, long B)
_IQ17rmpy
long _IQ17rmpy(long A, long B)
_IQ14int
long _IQ14int(long A)
_IQ11cos
long _IQ11cos(long A)
_IQ19mag
long _IQ19mag(long A, long B)
_iq4
long _iq4
Definition: 32b/IQmathLib.h:250
_IQ9atan2
long _IQ9atan2(long A, long B)
_IQ16mpyI32frac
long _IQ16mpyI32frac(long A, long B)
_IQ8sinPU
long _IQ8sinPU(long A)
_IQ18atan2PU
long _IQ18atan2PU(long A, long B)
_IQ21frac
long _IQ21frac(long A)
_IQ15toF
float _IQ15toF(long A)
_IQ6mag
long _IQ6mag(long A, long B)
_IQ12rsmpy
long _IQ12rsmpy(long A, long B)
_IQ4atan2PU
long _IQ4atan2PU(long A, long B)
_IQ27atan2
long _IQ27atan2(long A, long B)
_IQ15isqrt
long _IQ15isqrt(long A)
_IQ10mpyI32int
long _IQ10mpyI32int(long A, long B)
_IQ21exp
long _IQ21exp(long A)
_IQ5isqrt
long _IQ5isqrt(long A)
_IQ1rsmpy
long _IQ1rsmpy(long A, long B)
_IQ7acos
long _IQ7acos(long A)
_IQ4acos
long _IQ4acos(long A)
_IQ4rsmpy
long _IQ4rsmpy(long A, long B)
_IQ30sinPU
long _IQ30sinPU(long A)
_IQ10toF
float _IQ10toF(long A)
_IQ19cosPU
long _IQ19cosPU(long A)
_IQ21isqrt
long _IQ21isqrt(long A)
_IQ29rmpy
long _IQ29rmpy(long A, long B)
_IQ21int
long _IQ21int(long A)
_IQ29div
long _IQ29div(long A, long B)
_IQ12cos
long _IQ12cos(long A)
_IQ16rmpy
long _IQ16rmpy(long A, long B)
_IQ28mpyI32frac
long _IQ28mpyI32frac(long A, long B)
_IQ18sinPU
long _IQ18sinPU(long A)
_IQ15rmpy
long _IQ15rmpy(long A, long B)
_iq15
long _iq15
Definition: 32b/IQmathLib.h:239
_IQ11atan2
long _IQ11atan2(long A, long B)
_IQ8int
long _IQ8int(long A)
_IQ2asin
long _IQ2asin(long A)
_IQ18cosPU
long _IQ18cosPU(long A)
_IQ1cosPU
long _IQ1cosPU(long A)
_IQ12rmpy
long _IQ12rmpy(long A, long B)
_IQ27div
long _IQ27div(long A, long B)
_IQ18int
long _IQ18int(long A)
_iq18
long _iq18
Definition: 32b/IQmathLib.h:236
_IQ9cos
long _IQ9cos(long A)
_IQ25cosPU
long _IQ25cosPU(long A)
_IQ19div
long _IQ19div(long A, long B)
_IQ23mpyI32int
long _IQ23mpyI32int(long A, long B)
_IQ23div
long _IQ23div(long A, long B)
_IQ5rmpy
long _IQ5rmpy(long A, long B)
_IQ9sin
long _IQ9sin(long A)
_IQ1cos
long _IQ1cos(long A)
_IQ18mpyI32int
long _IQ18mpyI32int(long A, long B)
_IQ2cos
long _IQ2cos(long A)
_IQ8cosPU
long _IQ8cosPU(long A)
_IQ2sinPU
long _IQ2sinPU(long A)
_IQ8atan2PU
long _IQ8atan2PU(long A, long B)
_IQ29sin
long _IQ29sin(long A)
_IQ28toa
#define _IQ28toa(A, B, C)
Definition: 32b/IQmathLib.h:3412
_IQ12mpyI32frac
long _IQ12mpyI32frac(long A, long B)
_IQ18mpyI32frac
long _IQ18mpyI32frac(long A, long B)
_IQ26asin
long _IQ26asin(long A)
_IQ24sinPU
long _IQ24sinPU(long A)
_IQ23isqrt
long _IQ23isqrt(long A)
_IQ11cosPU
long _IQ11cosPU(long A)
_IQ14atan2
long _IQ14atan2(long A, long B)
_IQ13toa
#define _IQ13toa(A, B, C)
Definition: 32b/IQmathLib.h:3427
_IQ7rmpy
long _IQ7rmpy(long A, long B)
_IQ28mpyI32int
long _IQ28mpyI32int(long A, long B)
_IQ13rsmpy
long _IQ13rsmpy(long A, long B)
_IQ17cos
long _IQ17cos(long A)
_IQ27asin
long _IQ27asin(long A)
_IQ14atan2PU
long _IQ14atan2PU(long A, long B)
_IQ13cos
long _IQ13cos(long A)
_IQ9mpyI32int
long _IQ9mpyI32int(long A, long B)
_IQ18isqrt
long _IQ18isqrt(long A)
_IQ20toF
float _IQ20toF(long A)
_IQ14exp
long _IQ14exp(long A)
_IQ11atan2PU
long _IQ11atan2PU(long A, long B)
_IQ10frac
long _IQ10frac(long A)
_IQ13isqrt
long _IQ13isqrt(long A)
_IQ4rmpy
long _IQ4rmpy(long A, long B)
_IQ2sin
long _IQ2sin(long A)
_IQ10rsmpy
long _IQ10rsmpy(long A, long B)
_IQ21atan2
long _IQ21atan2(long A, long B)
_IQ4mpyI32int
long _IQ4mpyI32int(long A, long B)
_IQ6sin
long _IQ6sin(long A)
_IQ7cosPU
long _IQ7cosPU(long A)
_iq14
long _iq14
Definition: 32b/IQmathLib.h:240
_IQ2div
long _IQ2div(long A, long B)
_IQ4toF
float _IQ4toF(long A)
_IQ8mpyI32frac
long _IQ8mpyI32frac(long A, long B)
_IQ19atan2PU
long _IQ19atan2PU(long A, long B)
_IQ29int
long _IQ29int(long A)
_IQ3cos
long _IQ3cos(long A)
_IQ3exp
long _IQ3exp(long A)
_IQ28sqrt
long _IQ28sqrt(long A)
_IQ15atan2PU
long _IQ15atan2PU(long A, long B)
_IQ23rsmpy
long _IQ23rsmpy(long A, long B)
_IQ9isqrt
long _IQ9isqrt(long A)
_IQ10sinPU
long _IQ10sinPU(long A)
_IQ17isqrt
long _IQ17isqrt(long A)
_IQ28div
long _IQ28div(long A, long B)
_IQ21cos
long _IQ21cos(long A)
_IQ8asin
long _IQ8asin(long A)
_IQ27mag
long _IQ27mag(long A, long B)
_IQ2atan2
long _IQ2atan2(long A, long B)
_IQ4sin
long _IQ4sin(long A)
_IQ24toF
float _IQ24toF(long A)
_IQ1rmpy
long _IQ1rmpy(long A, long B)
_IQ6rsmpy
long _IQ6rsmpy(long A, long B)
_IQ17div
long _IQ17div(long A, long B)
_IQ27mpyI32frac
long _IQ27mpyI32frac(long A, long B)
_IQ8exp
long _IQ8exp(long A)
_IQ20asin
long _IQ20asin(long A)
_IQ22int
long _IQ22int(long A)
_IQ14sin
long _IQ14sin(long A)
_IQ3div
long _IQ3div(long A, long B)
_IQ30asin
long _IQ30asin(long A)
_IQ30cos
long _IQ30cos(long A)
_IQ22isqrt
long _IQ22isqrt(long A)
_IQ29cosPU
long _IQ29cosPU(long A)
_IQ25sqrt
long _IQ25sqrt(long A)
_IQ16exp
long _IQ16exp(long A)
_IQ28sin
long _IQ28sin(long A)
_IQ13mag
long _IQ13mag(long A, long B)
_IQ27rmpy
long _IQ27rmpy(long A, long B)
_IQ28sinPU
long _IQ28sinPU(long A)
_IQ19mpyI32frac
long _IQ19mpyI32frac(long A, long B)
_iq
long _iq
Definition: 32b/IQmathLib.h:223
_IQ3acos
long _IQ3acos(long A)
_IQ22exp
long _IQ22exp(long A)
_IQ22toa
#define _IQ22toa(A, B, C)
Definition: 32b/IQmathLib.h:3419
_IQ25atan2PU
long _IQ25atan2PU(long A, long B)
_IQ30mpyI32int
long _IQ30mpyI32int(long A, long B)
_IQ21sin
long _IQ21sin(long A)
__IQNtoa
int __IQNtoa(char *A, const char *B, long C, int D)
_IQ22frac
long _IQ22frac(long A)
_IQ4mag
long _IQ4mag(long A, long B)
_IQ29exp
long _IQ29exp(long A)
_IQ14div
long _IQ14div(long A, long B)
_IQ2frac
long _IQ2frac(long A)
_IQ18toF
float _IQ18toF(long A)
_IQ11acos
long _IQ11acos(long A)
_IQ8toF
float _IQ8toF(long A)
_IQ15sinPU
long _IQ15sinPU(long A)
_IQ25mpyI32frac
long _IQ25mpyI32frac(long A, long B)
_IQ20sqrt
long _IQ20sqrt(long A)
_IQ22asin
long _IQ22asin(long A)
_IQ10exp
long _IQ10exp(long A)
_IQ16toF
float _IQ16toF(long A)
_IQ9cosPU
long _IQ9cosPU(long A)
_IQ1sinPU
long _IQ1sinPU(long A)
_IQ27cosPU
long _IQ27cosPU(long A)
_IQ14sqrt
long _IQ14sqrt(long A)
_IQ23int
long _IQ23int(long A)
_IQ12cosPU
long _IQ12cosPU(long A)
_IQ14frac
long _IQ14frac(long A)
_IQ22sinPU
long _IQ22sinPU(long A)
_IQ27isqrt
long _IQ27isqrt(long A)
_IQ19toF
float _IQ19toF(long A)
_IQ27int
long _IQ27int(long A)
_IQ24cos
long _IQ24cos(long A)
_IQ30div
long _IQ30div(long A, long B)
_IQ16sinPU
long _IQ16sinPU(long A)
_IQ25toa
#define _IQ25toa(A, B, C)
Definition: 32b/IQmathLib.h:3415
_IQ6div
long _IQ6div(long A, long B)
_IQ21cosPU
long _IQ21cosPU(long A)
_IQ23toF
float _IQ23toF(long A)
_IQ14mpyI32frac
long _IQ14mpyI32frac(long A, long B)
_IQ2exp
long _IQ2exp(long A)
_IQ17toF
float _IQ17toF(long A)
_IQ25sin
long _IQ25sin(long A)
_IQ30rsmpy
long _IQ30rsmpy(long A, long B)
_IQ28int
long _IQ28int(long A)
_IQ24sqrt
long _IQ24sqrt(long A)
_IQ3sin
long _IQ3sin(long A)
_IQ7sqrt
long _IQ7sqrt(long A)
_IQ20exp
long _IQ20exp(long A)
_iq1
long _iq1
Definition: 32b/IQmathLib.h:253
_iq12
long _iq12
Definition: 32b/IQmathLib.h:242
_IQ30sin
long _IQ30sin(long A)
_IQ16sqrt
long _IQ16sqrt(long A)
_IQ6toF
float _IQ6toF(long A)
_IQ29toa
#define _IQ29toa(A, B, C)
Definition: 32b/IQmathLib.h:3411
_IQ30mag
long _IQ30mag(long A, long B)
_IQ29atan2
long _IQ29atan2(long A, long B)
_IQ30atan2PU
long _IQ30atan2PU(long A, long B)
_IQ17sqrt
long _IQ17sqrt(long A)
_IQ6asin
long _IQ6asin(long A)
_IQ24cosPU
long _IQ24cosPU(long A)
_IQ19isqrt
long _IQ19isqrt(long A)
_IQ18div
long _IQ18div(long A, long B)
_IQ11sinPU
long _IQ11sinPU(long A)
_IQ20cosPU
long _IQ20cosPU(long A)
_IQ10int
long _IQ10int(long A)
_IQ11div
long _IQ11div(long A, long B)
_IQ19toa
#define _IQ19toa(A, B, C)
Definition: 32b/IQmathLib.h:3421
_IQ6sinPU
long _IQ6sinPU(long A)
_IQ27toF
float _IQ27toF(long A)
_IQ7div
long _IQ7div(long A, long B)
_IQ30sqrt
long _IQ30sqrt(long A)
_IQ25int
long _IQ25int(long A)
_IQ20mpyI32int
long _IQ20mpyI32int(long A, long B)
_IQ12mag
long _IQ12mag(long A, long B)
_IQ14rmpy
long _IQ14rmpy(long A, long B)
_IQ9acos
long _IQ9acos(long A)
_IQ10sin
long _IQ10sin(long A)
_IQ6sqrt
long _IQ6sqrt(long A)
_IQ22acos
long _IQ22acos(long A)
_IQ11sqrt
long _IQ11sqrt(long A)
_IQ10mag
long _IQ10mag(long A, long B)
_IQ2atan2PU
long _IQ2atan2PU(long A, long B)
_IQ11rmpy
long _IQ11rmpy(long A, long B)
_IQ16mpyI32int
long _IQ16mpyI32int(long A, long B)
_IQ14cos
long _IQ14cos(long A)
_IQ16atan2
long _IQ16atan2(long A, long B)
_IQ15sin
long _IQ15sin(long A)
_IQ14asin
long _IQ14asin(long A)
_IQ15frac
long _IQ15frac(long A)
_IQ18sin
long _IQ18sin(long A)
_IQ12acos
long _IQ12acos(long A)
_IQ14toa
#define _IQ14toa(A, B, C)
Definition: 32b/IQmathLib.h:3426
_IQ1toF
float _IQ1toF(long A)
_IQ27sin
long _IQ27sin(long A)
_IQ18mag
long _IQ18mag(long A, long B)
_IQ6mpyI32frac
long _IQ6mpyI32frac(long A, long B)
_IQ6frac
long _IQ6frac(long A)
_IQ20rmpy
long _IQ20rmpy(long A, long B)
_IQ30isqrt
long _IQ30isqrt(long A)
_IQ13asin
long _IQ13asin(long A)
_IQ15sqrt
long _IQ15sqrt(long A)
_IQ24mag
long _IQ24mag(long A, long B)
_IQ5frac
long _IQ5frac(long A)
_IQ9atan2PU
long _IQ9atan2PU(long A, long B)
_IQ7frac
long _IQ7frac(long A)
_IQ25sinPU
long _IQ25sinPU(long A)
_IQ20acos
long _IQ20acos(long A)
_IQ2mpyI32frac
long _IQ2mpyI32frac(long A, long B)
_IQ24acos
long _IQ24acos(long A)
_IQ11mpyI32frac
long _IQ11mpyI32frac(long A, long B)
_IQ29acos
long _IQ29acos(long A)
_IQ17sinPU
long _IQ17sinPU(long A)
_IQ6cosPU
long _IQ6cosPU(long A)
_iq22
long _iq22
Definition: 32b/IQmathLib.h:232
_IQ26exp
long _IQ26exp(long A)
_IQ7sin
long _IQ7sin(long A)
_IQ14mpyI32int
long _IQ14mpyI32int(long A, long B)
_IQ22sin
long _IQ22sin(long A)
_IQ1sin
long _IQ1sin(long A)
_IQ29sinPU
long _IQ29sinPU(long A)
_IQ1int
long _IQ1int(long A)
_IQ8div
long _IQ8div(long A, long B)
_IQ18acos
long _IQ18acos(long A)
_IQ3int
long _IQ3int(long A)
_IQ28frac
long _IQ28frac(long A)
_IQ3isqrt
long _IQ3isqrt(long A)
_IQ2isqrt
long _IQ2isqrt(long A)
_IQ16cos
long _IQ16cos(long A)
_IQ22cos
long _IQ22cos(long A)
_IQ25frac
long _IQ25frac(long A)
_IQ8frac
long _IQ8frac(long A)
_IQ21acos
long _IQ21acos(long A)
_IQ7int
long _IQ7int(long A)
_iq17
long _iq17
Definition: 32b/IQmathLib.h:237
_iq3
long _iq3
Definition: 32b/IQmathLib.h:251
_IQ8atan2
long _IQ8atan2(long A, long B)
_IQ6acos
long _IQ6acos(long A)
_IQ19sqrt
long _IQ19sqrt(long A)
_IQ12exp
long _IQ12exp(long A)
_IQ26cosPU
long _IQ26cosPU(long A)
_IQ19int
long _IQ19int(long A)
_IQ13sqrt
long _IQ13sqrt(long A)
_IQ7toF
float _IQ7toF(long A)
_iq2
long _iq2
Definition: 32b/IQmathLib.h:252
_IQ3sqrt
long _IQ3sqrt(long A)
_IQ5mpyI32frac
long _IQ5mpyI32frac(long A, long B)
_IQ2mpyI32int
long _IQ2mpyI32int(long A, long B)
_IQ25exp
long _IQ25exp(long A)
_iq24
long _iq24
Definition: 32b/IQmathLib.h:230
_IQ29mpyI32int
long _IQ29mpyI32int(long A, long B)
_iq28
long _iq28
Definition: 32b/IQmathLib.h:226
_IQ8acos
long _IQ8acos(long A)
_IQ15div
long _IQ15div(long A, long B)
_IQ25mag
long _IQ25mag(long A, long B)
_IQ24mpyI32int
long _IQ24mpyI32int(long A, long B)
_IQ26toF
float _IQ26toF(long A)
_IQ15exp
long _IQ15exp(long A)
_IQ5toa
#define _IQ5toa(A, B, C)
Definition: 32b/IQmathLib.h:3435
_IQ1div
long _IQ1div(long A, long B)
_IQ10div
long _IQ10div(long A, long B)
_IQ15toa
#define _IQ15toa(A, B, C)
Definition: 32b/IQmathLib.h:3425
_IQ20sinPU
long _IQ20sinPU(long A)
_IQ12sqrt
long _IQ12sqrt(long A)
_IQ21toa
#define _IQ21toa(A, B, C)
Definition: 32b/IQmathLib.h:3418
_IQ8mpyI32int
long _IQ8mpyI32int(long A, long B)
_IQ20frac
long _IQ20frac(long A)
_IQ16atan2PU
long _IQ16atan2PU(long A, long B)
_IQ21sqrt
long _IQ21sqrt(long A)
_IQ10atan2PU
long _IQ10atan2PU(long A, long B)
_IQ11rsmpy
long _IQ11rsmpy(long A, long B)
_IQ4exp
long _IQ4exp(long A)
_iq30
long _iq30
Definition: 32b/IQmathLib.h:224
_IQ13mpyI32int
long _IQ13mpyI32int(long A, long B)
_IQ29toF
float _IQ29toF(long A)
_IQ13atan2PU
long _IQ13atan2PU(long A, long B)
_IQ3asin
long _IQ3asin(long A)
_IQ28isqrt
long _IQ28isqrt(long A)
_IQ6exp
long _IQ6exp(long A)
_IQ22div
long _IQ22div(long A, long B)
_IQ9mpyI32frac
long _IQ9mpyI32frac(long A, long B)
_IQ2mag
long _IQ2mag(long A, long B)
_IQ2int
long _IQ2int(long A)
_IQ17asin
long _IQ17asin(long A)
_IQ19cos
long _IQ19cos(long A)
_IQ5atan2
long _IQ5atan2(long A, long B)
_IQ18frac
long _IQ18frac(long A)
_IQ4mpyI32frac
long _IQ4mpyI32frac(long A, long B)
_IQ14cosPU
long _IQ14cosPU(long A)
_IQ12atan2
long _IQ12atan2(long A, long B)
_IQ19sin
long _IQ19sin(long A)
_IQ20atan2PU
long _IQ20atan2PU(long A, long B)
_IQ22mpyI32int
long _IQ22mpyI32int(long A, long B)
_IQ9mag
long _IQ9mag(long A, long B)
_IQ26sqrt
long _IQ26sqrt(long A)
_iq6
long _iq6
Definition: 32b/IQmathLib.h:248
_IQ18asin
long _IQ18asin(long A)
_IQ1isqrt
long _IQ1isqrt(long A)
_IQ23exp
long _IQ23exp(long A)
_iq8
long _iq8
Definition: 32b/IQmathLib.h:246
_IQ13sinPU
long _IQ13sinPU(long A)
_IQ22sqrt
long _IQ22sqrt(long A)
_IQ21mag
long _IQ21mag(long A, long B)
_IQ13exp
long _IQ13exp(long A)
_IQ18sqrt
long _IQ18sqrt(long A)
_IQ30atan2
long _IQ30atan2(long A, long B)
_IQ11frac
long _IQ11frac(long A)
_IQ26mpyI32frac
long _IQ26mpyI32frac(long A, long B)
_IQ4int
long _IQ4int(long A)
_IQ11isqrt
long _IQ11isqrt(long A)
_IQ8mag
long _IQ8mag(long A, long B)
_IQ20rsmpy
long _IQ20rsmpy(long A, long B)
_IQ19asin
long _IQ19asin(long A)
_IQ1atan2PU
long _IQ1atan2PU(long A, long B)
_iq5
long _iq5
Definition: 32b/IQmathLib.h:249
_iq9
long _iq9
Definition: 32b/IQmathLib.h:245
_IQ26toa
#define _IQ26toa(A, B, C)
Definition: 32b/IQmathLib.h:3414
_IQ5mag
long _IQ5mag(long A, long B)
_IQ20int
long _IQ20int(long A)
_IQ27rsmpy
long _IQ27rsmpy(long A, long B)
_IQ1mag
long _IQ1mag(long A, long B)
_IQ29frac
long _IQ29frac(long A)
_iq13
long _iq13
Definition: 32b/IQmathLib.h:241
_IQ6atan2
long _IQ6atan2(long A, long B)
_IQ13cosPU
long _IQ13cosPU(long A)
_IQ13toF
float _IQ13toF(long A)
_IQ24exp
long _IQ24exp(long A)
_IQ23rmpy
long _IQ23rmpy(long A, long B)
_IQ3cosPU
long _IQ3cosPU(long A)
_IQ16toa
#define _IQ16toa(A, B, C)
Definition: 32b/IQmathLib.h:3424
_IQ1atan2
long _IQ1atan2(long A, long B)
_iq29
long _iq29
Definition: 32b/IQmathLib.h:225
_IQ26int
long _IQ26int(long A)
_IQ3rmpy
long _IQ3rmpy(long A, long B)
_IQ5exp
long _IQ5exp(long A)
_IQ17atan2PU
long _IQ17atan2PU(long A, long B)
_IQ17frac
long _IQ17frac(long A)
_IQ25atan2
long _IQ25atan2(long A, long B)
_IQ12sin
long _IQ12sin(long A)
_IQ12toa
#define _IQ12toa(A, B, C)
Definition: 32b/IQmathLib.h:3428
_IQ21sinPU
long _IQ21sinPU(long A)
_IQ9sqrt
long _IQ9sqrt(long A)
_IQ7rsmpy
long _IQ7rsmpy(long A, long B)
_IQ7toa
#define _IQ7toa(A, B, C)
Definition: 32b/IQmathLib.h:3433
_IQ16mag
long _IQ16mag(long A, long B)
_IQ20toa
#define _IQ20toa(A, B, C)
Definition: 32b/IQmathLib.h:3420
_IQ6atan2PU
long _IQ6atan2PU(long A, long B)
_IQ11mpyI32int
long _IQ11mpyI32int(long A, long B)
_IQ12mpyI32int
long _IQ12mpyI32int(long A, long B)
_IQ18toa
#define _IQ18toa(A, B, C)
Definition: 32b/IQmathLib.h:3422
_IQ19atan2
long _IQ19atan2(long A, long B)
_IQ7atan2PU
long _IQ7atan2PU(long A, long B)
_IQ6int
long _IQ6int(long A)
_IQ16rsmpy
long _IQ16rsmpy(long A, long B)
_IQ7asin
long _IQ7asin(long A)
_IQ24asin
long _IQ24asin(long A)
_IQ26atan2PU
long _IQ26atan2PU(long A, long B)
_IQ7cos
long _IQ7cos(long A)
_iq10
long _iq10
Definition: 32b/IQmathLib.h:244
_IQ21rmpy
long _IQ21rmpy(long A, long B)
_IQ27toa
#define _IQ27toa(A, B, C)
Definition: 32b/IQmathLib.h:3413
_IQ20isqrt
long _IQ20isqrt(long A)
_iq11
long _iq11
Definition: 32b/IQmathLib.h:243
_IQ18rmpy
long _IQ18rmpy(long A, long B)
_IQ17mpyI32frac
long _IQ17mpyI32frac(long A, long B)
_IQ22atan2
long _IQ22atan2(long A, long B)
_IQ29cos
long _IQ29cos(long A)
_IQ6isqrt
long _IQ6isqrt(long A)
_IQ20cos
long _IQ20cos(long A)
_IQ3atan2PU
long _IQ3atan2PU(long A, long B)
_IQ22rsmpy
long _IQ22rsmpy(long A, long B)
_IQ3mag
long _IQ3mag(long A, long B)
_IQ14isqrt
long _IQ14isqrt(long A)
_iq23
long _iq23
Definition: 32b/IQmathLib.h:231
_IQ20mag
long _IQ20mag(long A, long B)
_IQ1mpyI32int
long _IQ1mpyI32int(long A, long B)
_IQ26sin
long _IQ26sin(long A)
_IQ21mpyI32frac
long _IQ21mpyI32frac(long A, long B)
_IQ10cos
long _IQ10cos(long A)
_IQ12frac
long _IQ12frac(long A)
_IQ16frac
long _IQ16frac(long A)
_IQ26cos
long _IQ26cos(long A)
_IQ10sqrt
long _IQ10sqrt(long A)
_IQ5sin
long _IQ5sin(long A)
_IQ8rmpy
long _IQ8rmpy(long A, long B)
_IQ23cosPU
long _IQ23cosPU(long A)
_IQ15acos
long _IQ15acos(long A)
_IQ3mpyI32frac
long _IQ3mpyI32frac(long A, long B)
_IQ8sqrt
long _IQ8sqrt(long A)
_IQ12int
long _IQ12int(long A)
_IQ29rsmpy
long _IQ29rsmpy(long A, long B)
_IQ26acos
long _IQ26acos(long A)
_IQ1mpyI32frac
long _IQ1mpyI32frac(long A, long B)
_IQ17exp
long _IQ17exp(long A)
_IQ3toa
#define _IQ3toa(A, B, C)
Definition: 32b/IQmathLib.h:3437
_IQ11toa
#define _IQ11toa(A, B, C)
Definition: 32b/IQmathLib.h:3429
_IQ5sqrt
long _IQ5sqrt(long A)
_IQ4sqrt
long _IQ4sqrt(long A)
_IQ11toF
float _IQ11toF(long A)
_IQ16asin
long _IQ16asin(long A)
_IQ15mpyI32frac
long _IQ15mpyI32frac(long A, long B)
_IQ5toF
float _IQ5toF(long A)
_IQ17atan2
long _IQ17atan2(long A, long B)
_IQ7mpyI32frac
long _IQ7mpyI32frac(long A, long B)
_IQ4cos
long _IQ4cos(long A)
_IQ20mpyI32frac
long _IQ20mpyI32frac(long A, long B)
_IQ28rmpy
long _IQ28rmpy(long A, long B)
_IQ18atan2
long _IQ18atan2(long A, long B)
_IQ4atan2
long _IQ4atan2(long A, long B)
_IQ30acos
long _IQ30acos(long A)
_IQ29mag
long _IQ29mag(long A, long B)
_iq19
long _iq19
Definition: 32b/IQmathLib.h:235
_IQ3mpyI32int
long _IQ3mpyI32int(long A, long B)
_IQ27atan2PU
long _IQ27atan2PU(long A, long B)
_IQ9sinPU
long _IQ9sinPU(long A)
_IQ27acos
long _IQ27acos(long A)
_IQ16int
long _IQ16int(long A)
_IQ4sinPU
long _IQ4sinPU(long A)
_IQ5atan2PU
long _IQ5atan2PU(long A, long B)
_IQ5int
long _IQ5int(long A)
_IQ30toa
#define _IQ30toa(A, B, C)
Definition: 32b/IQmathLib.h:3410
_IQ23atan2PU
long _IQ23atan2PU(long A, long B)
_IQ24atan2PU
long _IQ24atan2PU(long A, long B)
_IQ26div
long _IQ26div(long A, long B)
_IQ26isqrt
long _IQ26isqrt(long A)
_IQ2cosPU
long _IQ2cosPU(long A)
_IQ18exp
long _IQ18exp(long A)
_IQ19acos
long _IQ19acos(long A)
_IQ19exp
long _IQ19exp(long A)
_iq20
long _iq20
Definition: 32b/IQmathLib.h:234
_IQ10cosPU
long _IQ10cosPU(long A)
_IQ24atan2
long _IQ24atan2(long A, long B)
_IQ15rsmpy
long _IQ15rsmpy(long A, long B)
_IQ9toF
float _IQ9toF(long A)
_IQ8rsmpy
long _IQ8rsmpy(long A, long B)
_IQ13atan2
long _IQ13atan2(long A, long B)
_IQ5div
long _IQ5div(long A, long B)
_IQ23sin
long _IQ23sin(long A)
_IQ12asin
long _IQ12asin(long A)
_IQ13acos
long _IQ13acos(long A)
_IQ4cosPU
long _IQ4cosPU(long A)
_IQ10rmpy
long _IQ10rmpy(long A, long B)
_IQ17int
long _IQ17int(long A)
_IQ14mag
long _IQ14mag(long A, long B)
_IQ24mpyI32frac
long _IQ24mpyI32frac(long A, long B)
_IQ10toa
#define _IQ10toa(A, B, C)
Definition: 32b/IQmathLib.h:3430
_IQ28exp
long _IQ28exp(long A)
_IQ15asin
long _IQ15asin(long A)
_IQ24frac
long _IQ24frac(long A)
_IQ25acos
long _IQ25acos(long A)
_IQ30exp
long _IQ30exp(long A)
_IQ17toa
#define _IQ17toa(A, B, C)
Definition: 32b/IQmathLib.h:3423
_IQ19rmpy
long _IQ19rmpy(long A, long B)
_IQ4div
long _IQ4div(long A, long B)
_IQ14acos
long _IQ14acos(long A)
_IQ17mag
long _IQ17mag(long A, long B)
_IQ3atan2
long _IQ3atan2(long A, long B)
_IQ7mag
long _IQ7mag(long A, long B)
_IQ24sin
long _IQ24sin(long A)
_IQ28atan2
long _IQ28atan2(long A, long B)
_IQ10acos
long _IQ10acos(long A)
_IQ15mag
long _IQ15mag(long A, long B)
_IQ9asin
long _IQ9asin(long A)
_IQ5asin
long _IQ5asin(long A)
_IQ3rsmpy
long _IQ3rsmpy(long A, long B)
_IQ21asin
long _IQ21asin(long A)
_IQ12toF
float _IQ12toF(long A)
_IQ7exp
long _IQ7exp(long A)
_IQ11asin
long _IQ11asin(long A)
_IQ4isqrt
long _IQ4isqrt(long A)
_IQ15cos
long _IQ15cos(long A)
_IQ26rmpy
long _IQ26rmpy(long A, long B)
_IQ19mpyI32int
long _IQ19mpyI32int(long A, long B)
_IQ30mpyI32frac
long _IQ30mpyI32frac(long A, long B)
_IQ10isqrt
long _IQ10isqrt(long A)
_IQ14toF
float _IQ14toF(long A)
_IQ8isqrt
long _IQ8isqrt(long A)
_IQ27frac
long _IQ27frac(long A)
_IQ30rmpy
long _IQ30rmpy(long A, long B)
_IQ10asin
long _IQ10asin(long A)
_IQ13div
long _IQ13div(long A, long B)
_IQ15mpyI32int
long _IQ15mpyI32int(long A, long B)
_iq21
long _iq21
Definition: 32b/IQmathLib.h:233
_IQ1toa
#define _IQ1toa(A, B, C)
Definition: 32b/IQmathLib.h:3439
_IQ24rmpy
long _IQ24rmpy(long A, long B)
_IQ29atan2PU
long _IQ29atan2PU(long A, long B)
_IQ19rsmpy
long _IQ19rsmpy(long A, long B)
_IQ13frac
long _IQ13frac(long A)
_IQ9exp
long _IQ9exp(long A)
_IQ9rmpy
long _IQ9rmpy(long A, long B)
_IQ7atan2
long _IQ7atan2(long A, long B)
_IQ19frac
long _IQ19frac(long A)
_IQ17sin
long _IQ17sin(long A)
_IQ28cos
long _IQ28cos(long A)
_IQ19sinPU
long _IQ19sinPU(long A)
_IQ25toF
float _IQ25toF(long A)
_IQ4frac
long _IQ4frac(long A)
_IQ15atan2
long _IQ15atan2(long A, long B)
_IQ27sqrt
long _IQ27sqrt(long A)
_IQ16cosPU
long _IQ16cosPU(long A)
_IQ2sqrt
long _IQ2sqrt(long A)
_IQ9div
long _IQ9div(long A, long B)
_IQ5sinPU
long _IQ5sinPU(long A)
_IQ5rsmpy
long _IQ5rsmpy(long A, long B)
_IQ17rsmpy
long _IQ17rsmpy(long A, long B)
_IQ23asin
long _IQ23asin(long A)
_IQ21rsmpy
long _IQ21rsmpy(long A, long B)
_IQ20div
long _IQ20div(long A, long B)
_IQ17mpyI32int
long _IQ17mpyI32int(long A, long B)
_IQ23atan2
long _IQ23atan2(long A, long B)
_IQ12sinPU
long _IQ12sinPU(long A)
_IQ17acos
long _IQ17acos(long A)
_IQ22rmpy
long _IQ22rmpy(long A, long B)
_IQ5cosPU
long _IQ5cosPU(long A)
_IQ25cos
long _IQ25cos(long A)
_IQ30toF
float _IQ30toF(long A)
_IQ27cos
long _IQ27cos(long A)
_IQ22mpyI32frac
long _IQ22mpyI32frac(long A, long B)
_IQ5mpyI32int
long _IQ5mpyI32int(long A, long B)
_IQ24rsmpy
long _IQ24rsmpy(long A, long B)
_IQ6cos
long _IQ6cos(long A)
_IQ16sin
long _IQ16sin(long A)
_IQ29isqrt
long _IQ29isqrt(long A)
_IQ6rmpy
long _IQ6rmpy(long A, long B)
_IQ2acos
long _IQ2acos(long A)
_IQ10mpyI32frac
long _IQ10mpyI32frac(long A, long B)
_IQ3sinPU
long _IQ3sinPU(long A)
_IQ11exp
long _IQ11exp(long A)
_IQ26rsmpy
long _IQ26rsmpy(long A, long B)
_IQ9frac
long _IQ9frac(long A)
_IQ6toa
#define _IQ6toa(A, B, C)
Definition: 32b/IQmathLib.h:3434
_IQ30frac
long _IQ30frac(long A)
_IQ7isqrt
long _IQ7isqrt(long A)
_IQ26frac
long _IQ26frac(long A)
_IQ28toF
float _IQ28toF(long A)
_iq16
long _iq16
Definition: 32b/IQmathLib.h:238
_IQ1exp
long _IQ1exp(long A)
_IQ2rsmpy
long _IQ2rsmpy(long A, long B)
_IQ7sinPU
long _IQ7sinPU(long A)
_IQ9toa
#define _IQ9toa(A, B, C)
Definition: 32b/IQmathLib.h:3431
_IQ1asin
long _IQ1asin(long A)
_IQ1acos
long _IQ1acos(long A)
_IQ20sin
long _IQ20sin(long A)
_IQ4toa
#define _IQ4toa(A, B, C)
Definition: 32b/IQmathLib.h:3436
_IQ25rsmpy
long _IQ25rsmpy(long A, long B)
_IQ23sinPU
long _IQ23sinPU(long A)
_IQ28asin
long _IQ28asin(long A)
_IQ16acos
long _IQ16acos(long A)
_IQ25mpyI32int
long _IQ25mpyI32int(long A, long B)
_IQ11int
long _IQ11int(long A)
_IQ28rsmpy
long _IQ28rsmpy(long A, long B)
_IQ2toF
float _IQ2toF(long A)
_IQ23mag
long _IQ23mag(long A, long B)
_IQ13sin
long _IQ13sin(long A)
_IQ13rmpy
long _IQ13rmpy(long A, long B)
_IQ27exp
long _IQ27exp(long A)
_IQ8sin
long _IQ8sin(long A)
_IQ23mpyI32frac
long _IQ23mpyI32frac(long A, long B)
_IQ2toa
#define _IQ2toa(A, B, C)
Definition: 32b/IQmathLib.h:3438
_IQ29sqrt
long _IQ29sqrt(long A)
_IQ9rsmpy
long _IQ9rsmpy(long A, long B)
_IQ24int
long _IQ24int(long A)
_IQ25isqrt
long _IQ25isqrt(long A)
_IQ27sinPU
long _IQ27sinPU(long A)
_IQ30cosPU
long _IQ30cosPU(long A)