MotorWare f2806x Module API Documentation

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

IQlog.h
Go to the documentation of this file.
1 //###########################################################################
2 //
3 // FILE: IQlog.h
4 //
5 // TITLE: IQ log (natural) Math library functions definitions.
6 //
7 //###########################################################################
8 //
9 // Ver | dd-mmm-yyyy | Who | Description of changes
10 // =====|=============|=======|==============================================
11 // 1.0 | 2 Aug 2010 | A. T. | Original Release.
12 // -----|-------------|-------|----------------------------------------------
13 //
14 //###########################################################################
15 //
16
17 #ifndef __IQLOG_H_INCLUDED__
18 #define __IQLOG_H_INCLUDED__
19
20 //###########################################################################
21 #if MATH_TYPE == IQ_MATH
22 //###########################################################################
23 // If IQ_MATH is used, the following IQmath library function definitions
24 // are used:
25 //===========================================================================
26 extern long _IQ30log(long A);
27 extern long _IQ29log(long A);
28 extern long _IQ28log(long A);
29 extern long _IQ27log(long A);
30 extern long _IQ26log(long A);
31 extern long _IQ25log(long A);
32 extern long _IQ24log(long A);
33 extern long _IQ23log(long A);
34 extern long _IQ22log(long A);
35 extern long _IQ21log(long A);
36 extern long _IQ20log(long A);
37 extern long _IQ19log(long A);
38 extern long _IQ18log(long A);
39 extern long _IQ17log(long A);
40 extern long _IQ16log(long A);
41 extern long _IQ15log(long A);
42 extern long _IQ14log(long A);
43 extern long _IQ13log(long A);
44 extern long _IQ12log(long A);
45 extern long _IQ11log(long A);
46 extern long _IQ10log(long A);
47 extern long _IQ9log(long A);
48 extern long _IQ8log(long A);
49 extern long _IQ7log(long A);
50 extern long _IQ6log(long A);
51 extern long _IQ5log(long A);
52 extern long _IQ4log(long A);
53 extern long _IQ3log(long A);
54 extern long _IQ2log(long A);
55 extern long _IQ1log(long A);
56
57 #if GLOBAL_Q == 30
58 #define _IQlog(A) _IQ30log(A)
59 #endif
60 #if GLOBAL_Q == 29
61 #define _IQlog(A) _IQ29log(A)
62 #endif
63 #if GLOBAL_Q == 28
64 #define _IQlog(A) _IQ28log(A)
65 #endif
66 #if GLOBAL_Q == 27
67 #define _IQlog(A) _IQ27log(A)
68 #endif
69 #if GLOBAL_Q == 26
70 #define _IQlog(A) _IQ26log(A)
71 #endif
72 #if GLOBAL_Q == 25
73 #define _IQlog(A) _IQ25log(A)
74 #endif
75 #if GLOBAL_Q == 24
76 #define _IQlog(A) _IQ24log(A)
77 #endif
78 #if GLOBAL_Q == 23
79 #define _IQlog(A) _IQ23log(A)
80 #endif
81 #if GLOBAL_Q == 22
82 #define _IQlog(A) _IQ22log(A)
83 #endif
84 #if GLOBAL_Q == 21
85 #define _IQlog(A) _IQ21log(A)
86 #endif
87 #if GLOBAL_Q == 20
88 #define _IQlog(A) _IQ20log(A)
89 #endif
90 #if GLOBAL_Q == 19
91 #define _IQlog(A) _IQ19log(A)
92 #endif
93 #if GLOBAL_Q == 18
94 #define _IQlog(A) _IQ18log(A)
95 #endif
96 #if GLOBAL_Q == 17
97 #define _IQlog(A) _IQ17log(A)
98 #endif
99 #if GLOBAL_Q == 16
100 #define _IQlog(A) _IQ16log(A)
101 #endif
102 #if GLOBAL_Q == 15
103 #define _IQlog(A) _IQ15log(A)
104 #endif
105 #if GLOBAL_Q == 14
106 #define _IQlog(A) _IQ14log(A)
107 #endif
108 #if GLOBAL_Q == 13
109 #define _IQlog(A) _IQ13log(A)
110 #endif
111 #if GLOBAL_Q == 12
112 #define _IQlog(A) _IQ12log(A)
113 #endif
114 #if GLOBAL_Q == 11
115 #define _IQlog(A) _IQ11log(A)
116 #endif
117 #if GLOBAL_Q == 10
118 #define _IQlog(A) _IQ10log(A)
119 #endif
120 #if GLOBAL_Q == 9
121 #define _IQlog(A) _IQ9log(A)
122 #endif
123 #if GLOBAL_Q == 8
124 #define _IQlog(A) _IQ8log(A)
125 #endif
126 #if GLOBAL_Q == 7
127 #define _IQlog(A) _IQ7log(A)
128 #endif
129 #if GLOBAL_Q == 6
130 #define _IQlog(A) _IQ6log(A)
131 #endif
132 #if GLOBAL_Q == 5
133 #define _IQlog(A) _IQ5log(A)
134 #endif
135 #if GLOBAL_Q == 4
136 #define _IQlog(A) _IQ4log(A)
137 #endif
138 #if GLOBAL_Q == 3
139 #define _IQlog(A) _IQ3log(A)
140 #endif
141 #if GLOBAL_Q == 2
142 #define _IQlog(A) _IQ2log(A)
143 #endif
144 #if GLOBAL_Q == 1
145 #define _IQlog(A) _IQ1log(A)
146 #endif
147 //###########################################################################
148 #else // MATH_TYPE == FLOAT_MATH
149 //###########################################################################
150 // If FLOAT_MATH is used, the IQmath library function are replaced by
151 // equivalent floating point operations:
152 //===========================================================================
153 #define _IQlog(A) log(A)
154 #define _IQ30log(A) log(A)
155 #define _IQ29log(A) log(A)
156 #define _IQ28log(A) log(A)
157 #define _IQ27log(A) log(A)
158 #define _IQ26log(A) log(A)
159 #define _IQ25log(A) log(A)
160 #define _IQ24log(A) log(A)
161 #define _IQ23log(A) log(A)
162 #define _IQ22log(A) log(A)
163 #define _IQ21log(A) log(A)
164 #define _IQ20log(A) log(A)
165 #define _IQ19log(A) log(A)
166 #define _IQ18log(A) log(A)
167 #define _IQ17log(A) log(A)
168 #define _IQ16log(A) log(A)
169 #define _IQ15log(A) log(A)
170 #define _IQ14log(A) log(A)
171 #define _IQ13log(A) log(A)
172 #define _IQ12log(A) log(A)
173 #define _IQ11log(A) log(A)
174 #define _IQ10log(A) log(A)
175 #define _IQ9log(A) log(A)
176 #define _IQ8log(A) log(A)
177 #define _IQ7log(A) log(A)
178 #define _IQ6log(A) log(A)
179 #define _IQ5log(A) log(A)
180 #define _IQ4log(A) log(A)
181 #define _IQ3log(A) log(A)
182 #define _IQ2log(A) log(A)
183 #define _IQ1log(A) log(A)
184 //###########################################################################
185 #endif // No more.
186 //###########################################################################
187
188 #endif /* __IQLOG_H_INCLUDED__ */
_IQ20log
long _IQ20log(long A)
_IQ30log
long _IQ30log(long A)
_IQ26log
long _IQ26log(long A)
_IQ25log
long _IQ25log(long A)
_IQ4log
long _IQ4log(long A)
_IQ18log
long _IQ18log(long A)
_IQ17log
long _IQ17log(long A)
_IQ14log
long _IQ14log(long A)
_IQ21log
long _IQ21log(long A)
_IQ3log
long _IQ3log(long A)
_IQ2log
long _IQ2log(long A)
_IQ13log
long _IQ13log(long A)
_IQ16log
long _IQ16log(long A)
_IQ8log
long _IQ8log(long A)
_IQ29log
long _IQ29log(long A)
_IQ11log
long _IQ11log(long A)
_IQ24log
long _IQ24log(long A)
_IQ15log
long _IQ15log(long A)
_IQ27log
long _IQ27log(long A)
_IQ10log
long _IQ10log(long A)
_IQ6log
long _IQ6log(long A)
_IQ12log
long _IQ12log(long A)
_IQ1log
long _IQ1log(long A)
_IQ9log
long _IQ9log(long A)
_IQ19log
long _IQ19log(long A)
_IQ23log
long _IQ23log(long A)
_IQ7log
long _IQ7log(long A)
_IQ5log
long _IQ5log(long A)
_IQ22log
long _IQ22log(long A)
_IQ28log
long _IQ28log(long A)