GteConstants.h
Go to the documentation of this file.
1 // David Eberly, Geometric Tools, Redmond WA 98052
2 // Copyright (c) 1998-2017
3 // Distributed under the Boost Software License, Version 1.0.
4 // http://www.boost.org/LICENSE_1_0.txt
5 // http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
6 // File Version: 3.0.0 (2016/06/19)
7 
8 #pragma once
9 
10 #include <GTEngineDEF.h>
11 
12 // This file is for sharing of constants among the CPU, SSE2, and GPU. The
13 // hard-coded numbers lead to correctly rounded approximations of the
14 // constants when using 'float' or 'double'.
15 
16 // Constants involving pi.
17 #define GTE_C_PI 3.1415926535897931
18 #define GTE_C_HALF_PI 1.5707963267948966
19 #define GTE_C_QUARTER_PI 0.7853981633974483
20 #define GTE_C_TWO_PI 6.2831853071795862
21 #define GTE_C_INV_PI 0.3183098861837907
22 #define GTE_C_INV_TWO_PI 0.1591549430918953
23 #define GTE_C_INV_HALF_PI 0.6366197723675813
24 
25 // Conversions between degrees and radians.
26 #define GTE_C_DEG_TO_RAD 0.0174532925199433
27 #define GTE_C_RAD_TO_DEG 57.295779513082321
28 
29 // Common constants.
30 #define GTE_C_SQRT_2 1.4142135623730951
31 #define GTE_C_INV_SQRT_2 0.7071067811865475
32 #define GTE_C_LN_2 0.6931471805599453
33 #define GTE_C_INV_LN_2 1.4426950408889634
34 #define GTE_C_LN_10 2.3025850929940459
35 #define GTE_C_INV_LN_10 0.43429448190325176
36 
37 // Constants for minimax polynomial approximations to sqrt(x).
38 // The algorithm minimizes the maximum absolute error on [1,2].
39 #define GTE_C_SQRT_DEG1_C0 +1.0
40 #define GTE_C_SQRT_DEG1_C1 +4.1421356237309505e-01
41 #define GTE_C_SQRT_DEG1_MAX_ERROR 1.7766952966368793e-2
42 
43 #define GTE_C_SQRT_DEG2_C0 +1.0
44 #define GTE_C_SQRT_DEG2_C1 +4.8563183076125260e-01
45 #define GTE_C_SQRT_DEG2_C2 -7.1418268388157458e-02
46 #define GTE_C_SQRT_DEG2_MAX_ERROR 1.1795695163108744e-3
47 
48 #define GTE_C_SQRT_DEG3_C0 +1.0
49 #define GTE_C_SQRT_DEG3_C1 +4.9750045320242231e-01
50 #define GTE_C_SQRT_DEG3_C2 -1.0787308044477850e-01
51 #define GTE_C_SQRT_DEG3_C3 +2.4586189615451115e-02
52 #define GTE_C_SQRT_DEG3_MAX_ERROR 1.1309620116468910e-4
53 
54 #define GTE_C_SQRT_DEG4_C0 +1.0
55 #define GTE_C_SQRT_DEG4_C1 +4.9955939832918816e-01
56 #define GTE_C_SQRT_DEG4_C2 -1.2024066151943025e-01
57 #define GTE_C_SQRT_DEG4_C3 +4.5461507257698486e-02
58 #define GTE_C_SQRT_DEG4_C4 -1.0566681694362146e-02
59 #define GTE_C_SQRT_DEG4_MAX_ERROR 1.2741170151556180e-5
60 
61 #define GTE_C_SQRT_DEG5_C0 +1.0
62 #define GTE_C_SQRT_DEG5_C1 +4.9992197660031912e-01
63 #define GTE_C_SQRT_DEG5_C2 -1.2378506719245053e-01
64 #define GTE_C_SQRT_DEG5_C3 +5.6122776972699739e-02
65 #define GTE_C_SQRT_DEG5_C4 -2.3128836281145482e-02
66 #define GTE_C_SQRT_DEG5_C5 +5.0827122737047148e-03
67 #define GTE_C_SQRT_DEG5_MAX_ERROR 1.5725568940708201e-6
68 
69 #define GTE_C_SQRT_DEG6_C0 +1.0
70 #define GTE_C_SQRT_DEG6_C1 +4.9998616695784914e-01
71 #define GTE_C_SQRT_DEG6_C2 -1.2470733323278438e-01
72 #define GTE_C_SQRT_DEG6_C3 +6.0388587356982271e-02
73 #define GTE_C_SQRT_DEG6_C4 -3.1692053551807930e-02
74 #define GTE_C_SQRT_DEG6_C5 +1.2856590305148075e-02
75 #define GTE_C_SQRT_DEG6_C6 -2.6183954624343642e-03
76 #define GTE_C_SQRT_DEG6_MAX_ERROR 2.0584155535630089e-7
77 
78 #define GTE_C_SQRT_DEG7_C0 +1.0
79 #define GTE_C_SQRT_DEG7_C1 +4.9999754817809228e-01
80 #define GTE_C_SQRT_DEG7_C2 -1.2493243476353655e-01
81 #define GTE_C_SQRT_DEG7_C3 +6.1859954146370910e-02
82 #define GTE_C_SQRT_DEG7_C4 -3.6091595023208356e-02
83 #define GTE_C_SQRT_DEG7_C5 +1.9483946523450868e-02
84 #define GTE_C_SQRT_DEG7_C6 -7.5166134568007692e-03
85 #define GTE_C_SQRT_DEG7_C7 +1.4127567687864939e-03
86 #define GTE_C_SQRT_DEG7_MAX_ERROR 2.8072302919734948e-8
87 
88 #define GTE_C_SQRT_DEG8_C0 +1.0
89 #define GTE_C_SQRT_DEG8_C1 +4.9999956583056759e-01
90 #define GTE_C_SQRT_DEG8_C2 -1.2498490369914350e-01
91 #define GTE_C_SQRT_DEG8_C3 +6.2318494667579216e-02
92 #define GTE_C_SQRT_DEG8_C4 -3.7982961896432244e-02
93 #define GTE_C_SQRT_DEG8_C5 +2.3642612312869460e-02
94 #define GTE_C_SQRT_DEG8_C6 -1.2529377587270574e-02
95 #define GTE_C_SQRT_DEG8_C7 +4.5382426960713929e-03
96 #define GTE_C_SQRT_DEG8_C8 -7.8810995273670414e-04
97 #define GTE_C_SQRT_DEG8_MAX_ERROR 3.9460605685825989e-9
98 
99 // Constants for minimax polynomial approximations to 1/sqrt(x).
100 // The algorithm minimizes the maximum absolute error on [1,2].
101 #define GTE_C_INVSQRT_DEG1_C0 +1.0
102 #define GTE_C_INVSQRT_DEG1_C1 -2.9289321881345254e-01
103 #define GTE_C_INVSQRT_DEG1_MAX_ERROR 3.7814314552701983e-2
104 
105 #define GTE_C_INVSQRT_DEG2_C0 +1.0
106 #define GTE_C_INVSQRT_DEG2_C1 -4.4539812104566801e-01
107 #define GTE_C_INVSQRT_DEG2_C2 +1.5250490223221547e-01
108 #define GTE_C_INVSQRT_DEG2_MAX_ERROR 4.1953446330581234e-3
109 
110 #define GTE_C_INVSQRT_DEG3_C0 +1.0
111 #define GTE_C_INVSQRT_DEG3_C1 -4.8703230993068791e-01
112 #define GTE_C_INVSQRT_DEG3_C2 +2.8163710486669835e-01
113 #define GTE_C_INVSQRT_DEG3_C3 -8.7498013749463421e-02
114 #define GTE_C_INVSQRT_DEG3_MAX_ERROR 5.6307702007266786e-4
115 
116 #define GTE_C_INVSQRT_DEG4_C0 +1.0
117 #define GTE_C_INVSQRT_DEG4_C1 -4.9710061558048779e-01
118 #define GTE_C_INVSQRT_DEG4_C2 +3.4266247597676802e-01
119 #define GTE_C_INVSQRT_DEG4_C3 -1.9106356536293490e-01
120 #define GTE_C_INVSQRT_DEG4_C4 +5.2608486153198797e-02
121 #define GTE_C_INVSQRT_DEG4_MAX_ERROR 8.1513919987605266e-5
122 
123 #define GTE_C_INVSQRT_DEG5_C0 +1.0
124 #define GTE_C_INVSQRT_DEG5_C1 -4.9937760586004143e-01
125 #define GTE_C_INVSQRT_DEG5_C2 +3.6508741295133973e-01
126 #define GTE_C_INVSQRT_DEG5_C3 -2.5884890281853501e-01
127 #define GTE_C_INVSQRT_DEG5_C4 +1.3275782221320753e-01
128 #define GTE_C_INVSQRT_DEG5_C5 -3.2511945299404488e-02
129 #define GTE_C_INVSQRT_DEG5_MAX_ERROR 1.2289367475583346e-5
130 
131 #define GTE_C_INVSQRT_DEG6_C0 +1.0
132 #define GTE_C_INVSQRT_DEG6_C1 -4.9987029229547453e-01
133 #define GTE_C_INVSQRT_DEG6_C2 +3.7220923604495226e-01
134 #define GTE_C_INVSQRT_DEG6_C3 -2.9193067713256937e-01
135 #define GTE_C_INVSQRT_DEG6_C4 +1.9937605991094642e-01
136 #define GTE_C_INVSQRT_DEG6_C5 -9.3135712130901993e-02
137 #define GTE_C_INVSQRT_DEG6_C6 +2.0458166789566690e-02
138 #define GTE_C_INVSQRT_DEG6_MAX_ERROR 1.9001451223750465e-6
139 
140 #define GTE_C_INVSQRT_DEG7_C0 +1.0
141 #define GTE_C_INVSQRT_DEG7_C1 -4.9997357250704977e-01
142 #define GTE_C_INVSQRT_DEG7_C2 +3.7426216884998809e-01
143 #define GTE_C_INVSQRT_DEG7_C3 -3.0539882498248971e-01
144 #define GTE_C_INVSQRT_DEG7_C4 +2.3976005607005391e-01
145 #define GTE_C_INVSQRT_DEG7_C5 -1.5410326351684489e-01
146 #define GTE_C_INVSQRT_DEG7_C6 +6.5598809723041995e-02
147 #define GTE_C_INVSQRT_DEG7_C7 -1.3038592450470787e-02
148 #define GTE_C_INVSQRT_DEG7_MAX_ERROR 2.9887724993168940e-7
149 
150 #define GTE_C_INVSQRT_DEG8_C0 +1.0
151 #define GTE_C_INVSQRT_DEG8_C1 -4.9999471066120371e-01
152 #define GTE_C_INVSQRT_DEG8_C2 +3.7481415745794067e-01
153 #define GTE_C_INVSQRT_DEG8_C3 -3.1023804387422160e-01
154 #define GTE_C_INVSQRT_DEG8_C4 +2.5977002682930106e-01
155 #define GTE_C_INVSQRT_DEG8_C5 -1.9818790717727097e-01
156 #define GTE_C_INVSQRT_DEG8_C6 +1.1882414252613671e-01
157 #define GTE_C_INVSQRT_DEG8_C7 -4.6270038088550791e-02
158 #define GTE_C_INVSQRT_DEG8_C8 +8.3891541755747312e-03
159 #define GTE_C_INVSQRT_DEG8_MAX_ERROR 4.7596926146947771e-8
160 
161 // Constants for minimax polynomial approximations to sin(x).
162 // The algorithm minimizes the maximum absolute error on [-pi/2,pi/2].
163 #define GTE_C_SIN_DEG3_C0 +1.0
164 #define GTE_C_SIN_DEG3_C1 -1.4727245910375519e-01
165 #define GTE_C_SIN_DEG3_MAX_ERROR 1.3481903639145865e-2
166 
167 #define GTE_C_SIN_DEG5_C0 +1.0
168 #define GTE_C_SIN_DEG5_C1 -1.6600599923812209e-01
169 #define GTE_C_SIN_DEG5_C2 +7.5924178409012000e-03
170 #define GTE_C_SIN_DEG5_MAX_ERROR 1.4001209384639779e-4
171 
172 #define GTE_C_SIN_DEG7_C0 +1.0
173 #define GTE_C_SIN_DEG7_C1 -1.6665578084732124e-01
174 #define GTE_C_SIN_DEG7_C2 +8.3109378830028557e-03
175 #define GTE_C_SIN_DEG7_C3 -1.8447486103462252e-04
176 #define GTE_C_SIN_DEG7_MAX_ERROR 1.0205878936686563e-6
177 
178 #define GTE_C_SIN_DEG9_C0 +1.0
179 #define GTE_C_SIN_DEG9_C1 -1.6666656235308897e-01
180 #define GTE_C_SIN_DEG9_C2 +8.3329962509886002e-03
181 #define GTE_C_SIN_DEG9_C3 -1.9805100675274190e-04
182 #define GTE_C_SIN_DEG9_C4 +2.5967200279475300e-06
183 #define GTE_C_SIN_DEG9_MAX_ERROR 5.2010746265374053e-9
184 
185 #define GTE_C_SIN_DEG11_C0 +1.0
186 #define GTE_C_SIN_DEG11_C1 -1.6666666601721269e-01
187 #define GTE_C_SIN_DEG11_C2 +8.3333303183525942e-03
188 #define GTE_C_SIN_DEG11_C3 -1.9840782426250314e-04
189 #define GTE_C_SIN_DEG11_C4 +2.7521557770526783e-06
190 #define GTE_C_SIN_DEG11_C5 -2.3828544692960918e-08
191 #define GTE_C_SIN_DEG11_MAX_ERROR 1.9295870457014530e-11
192 
193 // Constants for minimax polynomial approximations to cos(x).
194 // The algorithm minimizes the maximum absolute error on [-pi/2,pi/2].
195 #define GTE_C_COS_DEG2_C0 +1.0
196 #define GTE_C_COS_DEG2_C1 -4.0528473456935105e-01
197 #define GTE_C_COS_DEG2_MAX_ERROR 5.4870946878404048e-2
198 
199 #define GTE_C_COS_DEG4_C0 +1.0
200 #define GTE_C_COS_DEG4_C1 -4.9607181958647262e-01
201 #define GTE_C_COS_DEG4_C2 +3.6794619653489236e-02
202 #define GTE_C_COS_DEG4_MAX_ERROR 9.1879932449712154e-4
203 
204 #define GTE_C_COS_DEG6_C0 +1.0
205 #define GTE_C_COS_DEG6_C1 -4.9992746217057404e-01
206 #define GTE_C_COS_DEG6_C2 +4.1493920348353308e-02
207 #define GTE_C_COS_DEG6_C3 -1.2712435011987822e-03
208 #define GTE_C_COS_DEG6_MAX_ERROR 9.2028470133065365e-6
209 
210 #define GTE_C_COS_DEG8_C0 +1.0
211 #define GTE_C_COS_DEG8_C1 -4.9999925121358291e-01
212 #define GTE_C_COS_DEG8_C2 +4.1663780117805693e-02
213 #define GTE_C_COS_DEG8_C3 -1.3854239405310942e-03
214 #define GTE_C_COS_DEG8_C4 +2.3154171575501259e-05
215 #define GTE_C_COS_DEG8_MAX_ERROR 5.9804533020235695e-8
216 
217 #define GTE_C_COS_DEG10_C0 +1.0
218 #define GTE_C_COS_DEG10_C1 -4.9999999508695869e-01
219 #define GTE_C_COS_DEG10_C2 +4.1666638865338612e-02
220 #define GTE_C_COS_DEG10_C3 -1.3888377661039897e-03
221 #define GTE_C_COS_DEG10_C4 +2.4760495088926859e-05
222 #define GTE_C_COS_DEG10_C5 -2.6051615464872668e-07
223 #define GTE_C_COS_DEG10_MAX_ERROR 2.7006769043325107e-10
224 
225 // Constants for minimax polynomial approximations to tan(x).
226 // The algorithm minimizes the maximum absolute error on [-pi/4,pi/4].
227 #define GTE_C_TAN_DEG3_C0 1.0
228 #define GTE_C_TAN_DEG3_C1 4.4295926544736286e-01
229 #define GTE_C_TAN_DEG3_MAX_ERROR 1.1661892256204731e-2
230 
231 #define GTE_C_TAN_DEG5_C0 1.0
232 #define GTE_C_TAN_DEG5_C1 3.1401320403542421e-01
233 #define GTE_C_TAN_DEG5_C2 2.0903948109240345e-01
234 #define GTE_C_TAN_DEG5_MAX_ERROR 5.8431854390143118e-4
235 
236 #define GTE_C_TAN_DEG7_C0 1.0
237 #define GTE_C_TAN_DEG7_C1 3.3607213284422555e-01
238 #define GTE_C_TAN_DEG7_C2 1.1261037305184907e-01
239 #define GTE_C_TAN_DEG7_C3 9.8352099470524479e-02
240 #define GTE_C_TAN_DEG7_MAX_ERROR 3.5418688397723108e-5
241 
242 #define GTE_C_TAN_DEG9_C0 1.0
243 #define GTE_C_TAN_DEG9_C1 3.3299232843941784e-01
244 #define GTE_C_TAN_DEG9_C2 1.3747843432474838e-01
245 #define GTE_C_TAN_DEG9_C3 3.7696344813028304e-02
246 #define GTE_C_TAN_DEG9_C4 4.6097377279281204e-02
247 #define GTE_C_TAN_DEG9_MAX_ERROR 2.2988173242199927e-6
248 
249 #define GTE_C_TAN_DEG11_C0 1.0
250 #define GTE_C_TAN_DEG11_C1 3.3337224456224224e-01
251 #define GTE_C_TAN_DEG11_C2 1.3264516053824593e-01
252 #define GTE_C_TAN_DEG11_C3 5.8145237645931047e-02
253 #define GTE_C_TAN_DEG11_C4 1.0732193237572574e-02
254 #define GTE_C_TAN_DEG11_C5 2.1558456793513869e-02
255 #define GTE_C_TAN_DEG11_MAX_ERROR 1.5426257940140409e-7
256 
257 #define GTE_C_TAN_DEG13_C0 1.0
258 #define GTE_C_TAN_DEG13_C1 3.3332916426394554e-01
259 #define GTE_C_TAN_DEG13_C2 1.3343404625112498e-01
260 #define GTE_C_TAN_DEG13_C3 5.3104565343119248e-02
261 #define GTE_C_TAN_DEG13_C4 2.5355038312682154e-02
262 #define GTE_C_TAN_DEG13_C5 1.8253255966556026e-03
263 #define GTE_C_TAN_DEG13_C6 1.0069407176615641e-02
264 #define GTE_C_TAN_DEG13_MAX_ERROR 1.0550264249037378e-8
265 
266 // Constants for minimax polynomial approximations to acos(x), where the
267 // approximation is of the form acos(x) = sqrt(1 - x)*p(x) with p(x) a
268 // polynomial. The algorithm minimizes the maximum error
269 // |acos(x)/sqrt(1-x) - p(x)| on [0,1]. At the same time we get an
270 // approximation for asin(x) = pi/2 - acos(x).
271 #define GTE_C_ACOS_DEG1_C0 +1.5707963267948966
272 #define GTE_C_ACOS_DEG1_C1 -1.5658276442180141e-01
273 #define GTE_C_ACOS_DEG1_MAX_ERROR 1.1659002803738105e-2
274 
275 #define GTE_C_ACOS_DEG2_C0 +1.5707963267948966
276 #define GTE_C_ACOS_DEG2_C1 -2.0347053865798365e-01
277 #define GTE_C_ACOS_DEG2_C2 +4.6887774236182234e-02
278 #define GTE_C_ACOS_DEG2_MAX_ERROR 9.0311602490029258e-4
279 
280 #define GTE_C_ACOS_DEG3_C0 +1.5707963267948966
281 #define GTE_C_ACOS_DEG3_C1 -2.1253291899190285e-01
282 #define GTE_C_ACOS_DEG3_C2 +7.4773789639484223e-02
283 #define GTE_C_ACOS_DEG3_C3 -1.8823635069382449e-02
284 #define GTE_C_ACOS_DEG3_MAX_ERROR 9.3066396954288172e-5
285 
286 #define GTE_C_ACOS_DEG4_C0 +1.5707963267948966
287 #define GTE_C_ACOS_DEG4_C1 -2.1422258835275865e-01
288 #define GTE_C_ACOS_DEG4_C2 +8.4936675142844198e-02
289 #define GTE_C_ACOS_DEG4_C3 -3.5991475120957794e-02
290 #define GTE_C_ACOS_DEG4_C4 +8.6946239090712751e-03
291 #define GTE_C_ACOS_DEG4_MAX_ERROR 1.0930595804481413e-5
292 
293 #define GTE_C_ACOS_DEG5_C0 +1.5707963267948966
294 #define GTE_C_ACOS_DEG5_C1 -2.1453292139805524e-01
295 #define GTE_C_ACOS_DEG5_C2 +8.7973089282889383e-02
296 #define GTE_C_ACOS_DEG5_C3 -4.5130266382166440e-02
297 #define GTE_C_ACOS_DEG5_C4 +1.9467466687281387e-02
298 #define GTE_C_ACOS_DEG5_C5 -4.3601326117634898e-03
299 #define GTE_C_ACOS_DEG5_MAX_ERROR 1.3861070257241426-6
300 
301 #define GTE_C_ACOS_DEG6_C0 +1.5707963267948966
302 #define GTE_C_ACOS_DEG6_C1 -2.1458939285677325e-01
303 #define GTE_C_ACOS_DEG6_C2 +8.8784960563641491e-02
304 #define GTE_C_ACOS_DEG6_C3 -4.8887131453156485e-02
305 #define GTE_C_ACOS_DEG6_C4 +2.7011519960012720e-02
306 #define GTE_C_ACOS_DEG6_C5 -1.1210537323478320e-02
307 #define GTE_C_ACOS_DEG6_C6 +2.3078166879102469e-03
308 #define GTE_C_ACOS_DEG6_MAX_ERROR 1.8491291330427484e-7
309 
310 #define GTE_C_ACOS_DEG7_C0 +1.5707963267948966
311 #define GTE_C_ACOS_DEG7_C1 -2.1459960076929829e-01
312 #define GTE_C_ACOS_DEG7_C2 +8.8986946573346160e-02
313 #define GTE_C_ACOS_DEG7_C3 -5.0207843052845647e-02
314 #define GTE_C_ACOS_DEG7_C4 +3.0961594977611639e-02
315 #define GTE_C_ACOS_DEG7_C5 -1.7162031184398074e-02
316 #define GTE_C_ACOS_DEG7_C6 +6.7072304676685235e-03
317 #define GTE_C_ACOS_DEG7_C7 -1.2690614339589956e-03
318 #define GTE_C_ACOS_DEG7_MAX_ERROR 2.5574620927948377e-8
319 
320 #define GTE_C_ACOS_DEG8_C0 +1.5707963267948966
321 #define GTE_C_ACOS_DEG8_C1 -2.1460143648688035e-01
322 #define GTE_C_ACOS_DEG8_C2 +8.9034700107934128e-02
323 #define GTE_C_ACOS_DEG8_C3 -5.0625279962389413e-02
324 #define GTE_C_ACOS_DEG8_C4 +3.2683762943179318e-02
325 #define GTE_C_ACOS_DEG8_C5 -2.0949278766238422e-02
326 #define GTE_C_ACOS_DEG8_C6 +1.1272900916992512e-02
327 #define GTE_C_ACOS_DEG8_C7 -4.1160981058965262e-03
328 #define GTE_C_ACOS_DEG8_C8 +7.1796493341480527e-04
329 #define GTE_C_ACOS_DEG8_MAX_ERROR 3.6340015129032732e-9
330 
331 // Constants for minimax polynomial approximations to atan(x).
332 // The algorithm minimizes the maximum absolute error on [-1,1].
333 #define GTE_C_ATAN_DEG3_C0 +1.0
334 #define GTE_C_ATAN_DEG3_C1 -2.1460183660255172e-01
335 #define GTE_C_ATAN_DEG3_MAX_ERROR 1.5970326392614240e-2
336 
337 #define GTE_C_ATAN_DEG5_C0 +1.0
338 #define GTE_C_ATAN_DEG5_C1 -3.0189478312144946e-01
339 #define GTE_C_ATAN_DEG5_C2 +8.7292946518897740e-02
340 #define GTE_C_ATAN_DEG5_MAX_ERROR 1.3509832247372636e-3
341 
342 #define GTE_C_ATAN_DEG7_C0 +1.0
343 #define GTE_C_ATAN_DEG7_C1 -3.2570157599356531e-01
344 #define GTE_C_ATAN_DEG7_C2 +1.5342994884206673e-01
345 #define GTE_C_ATAN_DEG7_C3 -4.2330209451053591e-02
346 #define GTE_C_ATAN_DEG7_MAX_ERROR 1.5051227215514412e-4
347 
348 #define GTE_C_ATAN_DEG9_C0 +1.0
349 #define GTE_C_ATAN_DEG9_C1 -3.3157878236439586e-01
350 #define GTE_C_ATAN_DEG9_C2 +1.8383034738018011e-01
351 #define GTE_C_ATAN_DEG9_C3 -8.9253037587244677e-02
352 #define GTE_C_ATAN_DEG9_C4 +2.2399635968909593e-02
353 #define GTE_C_ATAN_DEG9_MAX_ERROR 1.8921598624582064e-5
354 
355 #define GTE_C_ATAN_DEG11_C0 +1.0
356 #define GTE_C_ATAN_DEG11_C1 -3.3294527685374087e-01
357 #define GTE_C_ATAN_DEG11_C2 +1.9498657165383548e-01
358 #define GTE_C_ATAN_DEG11_C3 -1.1921576270475498e-01
359 #define GTE_C_ATAN_DEG11_C4 +5.5063351366968050e-02
360 #define GTE_C_ATAN_DEG11_C5 -1.2490720064867844e-02
361 #define GTE_C_ATAN_DEG11_MAX_ERROR 2.5477724974187765e-6
362 
363 #define GTE_C_ATAN_DEG13_C0 +1.0
364 #define GTE_C_ATAN_DEG13_C1 -3.3324998579202170e-01
365 #define GTE_C_ATAN_DEG13_C2 +1.9856563505717162e-01
366 #define GTE_C_ATAN_DEG13_C3 -1.3374657325451267e-01
367 #define GTE_C_ATAN_DEG13_C4 +8.1675882859940430e-02
368 #define GTE_C_ATAN_DEG13_C5 -3.5059680836411644e-02
369 #define GTE_C_ATAN_DEG13_C6 +7.2128853633444123e-03
370 #define GTE_C_ATAN_DEG13_MAX_ERROR 3.5859104691865484e-7
371 
372 // Constants for minimax polynomial approximations to exp2(x) = 2^x.
373 // The algorithm minimizes the maximum absolute error on [0,1].
374 #define GTE_C_EXP2_DEG1_C0 1.0
375 #define GTE_C_EXP2_DEG1_C1 1.0
376 #define GTE_C_EXP2_DEG1_MAX_ERROR 8.6071332055934313e-2
377 
378 #define GTE_C_EXP2_DEG2_C0 1.0
379 #define GTE_C_EXP2_DEG2_C1 6.5571332605741528e-01
380 #define GTE_C_EXP2_DEG2_C2 3.4428667394258472e-01
381 #define GTE_C_EXP2_DEG2_MAX_ERROR 3.8132476831060358e-3
382 
383 #define GTE_C_EXP2_DEG3_C0 1.0
384 #define GTE_C_EXP2_DEG3_C1 6.9589012084456225e-01
385 #define GTE_C_EXP2_DEG3_C2 2.2486494900110188e-01
386 #define GTE_C_EXP2_DEG3_C3 7.9244930154334980e-02
387 #define GTE_C_EXP2_DEG3_MAX_ERROR 1.4694877755186408e-4
388 
389 #define GTE_C_EXP2_DEG4_C0 1.0
390 #define GTE_C_EXP2_DEG4_C1 6.9300392358459195e-01
391 #define GTE_C_EXP2_DEG4_C2 2.4154981722455560e-01
392 #define GTE_C_EXP2_DEG4_C3 5.1744260331489045e-02
393 #define GTE_C_EXP2_DEG4_C4 1.3701998859367848e-02
394 #define GTE_C_EXP2_DEG4_MAX_ERROR 4.7617792624521371e-6
395 
396 #define GTE_C_EXP2_DEG5_C0 1.0
397 #define GTE_C_EXP2_DEG5_C1 6.9315298010274962e-01
398 #define GTE_C_EXP2_DEG5_C2 2.4014712313022102e-01
399 #define GTE_C_EXP2_DEG5_C3 5.5855296413199085e-02
400 #define GTE_C_EXP2_DEG5_C4 8.9477503096873079e-03
401 #define GTE_C_EXP2_DEG5_C5 1.8968500441332026e-03
402 #define GTE_C_EXP2_DEG5_MAX_ERROR 1.3162098333463490e-7
403 
404 #define GTE_C_EXP2_DEG6_C0 1.0
405 #define GTE_C_EXP2_DEG6_C1 6.9314698914837525e-01
406 #define GTE_C_EXP2_DEG6_C2 2.4023013440952923e-01
407 #define GTE_C_EXP2_DEG6_C3 5.5481276898206033e-02
408 #define GTE_C_EXP2_DEG6_C4 9.6838443037086108e-03
409 #define GTE_C_EXP2_DEG6_C5 1.2388324048515642e-03
410 #define GTE_C_EXP2_DEG6_C6 2.1892283501756538e-04
411 #define GTE_C_EXP2_DEG6_MAX_ERROR 3.1589168225654163e-9
412 
413 #define GTE_C_EXP2_DEG7_C0 1.0
414 #define GTE_C_EXP2_DEG7_C1 6.9314718588750690e-01
415 #define GTE_C_EXP2_DEG7_C2 2.4022637363165700e-01
416 #define GTE_C_EXP2_DEG7_C3 5.5505235570535660e-02
417 #define GTE_C_EXP2_DEG7_C4 9.6136265387940512e-03
418 #define GTE_C_EXP2_DEG7_C5 1.3429234504656051e-03
419 #define GTE_C_EXP2_DEG7_C6 1.4299202757683815e-04
420 #define GTE_C_EXP2_DEG7_C7 2.1662892777385423e-05
421 #define GTE_C_EXP2_DEG7_MAX_ERROR 6.6864513925679603e-11
422 
423 // Constants for minimax polynomial approximations to log2(x).
424 // The algorithm minimizes the maximum absolute error on [1,2].
425 // The polynomials all have constant term zero.
426 #define GTE_C_LOG2_DEG1_C1 +1.0
427 #define GTE_C_LOG2_DEG1_MAX_ERROR 8.6071332055934202e-2
428 
429 #define GTE_C_LOG2_DEG2_C1 +1.3465553856377803
430 #define GTE_C_LOG2_DEG2_C2 -3.4655538563778032e-01
431 #define GTE_C_LOG2_DEG2_MAX_ERROR 7.6362868906658110e-3
432 
433 #define GTE_C_LOG2_DEG3_C1 +1.4228653756681227
434 #define GTE_C_LOG2_DEG3_C2 -5.8208556916449616e-01
435 #define GTE_C_LOG2_DEG3_C3 +1.5922019349637218e-01
436 #define GTE_C_LOG2_DEG3_MAX_ERROR 8.7902902652883808e-4
437 
438 #define GTE_C_LOG2_DEG4_C1 +1.4387257478171547
439 #define GTE_C_LOG2_DEG4_C2 -6.7778401359918661e-01
440 #define GTE_C_LOG2_DEG4_C3 +3.2118898377713379e-01
441 #define GTE_C_LOG2_DEG4_C4 -8.2130717995088531e-02
442 #define GTE_C_LOG2_DEG4_MAX_ERROR 1.1318551355360418e-4
443 
444 #define GTE_C_LOG2_DEG5_C1 +1.4419170408633741
445 #define GTE_C_LOG2_DEG5_C2 -7.0909645927612530e-01
446 #define GTE_C_LOG2_DEG5_C3 +4.1560609399164150e-01
447 #define GTE_C_LOG2_DEG5_C4 -1.9357573729558908e-01
448 #define GTE_C_LOG2_DEG5_C5 +4.5149061716699634e-02
449 #define GTE_C_LOG2_DEG5_MAX_ERROR 1.5521274478735858e-5
450 
451 #define GTE_C_LOG2_DEG6_C1 +1.4425449435950917
452 #define GTE_C_LOG2_DEG6_C2 -7.1814525675038965e-01
453 #define GTE_C_LOG2_DEG6_C3 +4.5754919692564044e-01
454 #define GTE_C_LOG2_DEG6_C4 -2.7790534462849337e-01
455 #define GTE_C_LOG2_DEG6_C5 +1.2179791068763279e-01
456 #define GTE_C_LOG2_DEG6_C6 -2.5841449829670182e-02
457 #define GTE_C_LOG2_DEG6_MAX_ERROR 2.2162051216689793e-6
458 
459 #define GTE_C_LOG2_DEG7_C1 +1.4426664401536078
460 #define GTE_C_LOG2_DEG7_C2 -7.2055423726162360e-01
461 #define GTE_C_LOG2_DEG7_C3 +4.7332419162501083e-01
462 #define GTE_C_LOG2_DEG7_C4 -3.2514018752954144e-01
463 #define GTE_C_LOG2_DEG7_C5 +1.9302965529095673e-01
464 #define GTE_C_LOG2_DEG7_C6 -7.8534970641157997e-02
465 #define GTE_C_LOG2_DEG7_C7 +1.5209108363023915e-02
466 #define GTE_C_LOG2_DEG7_MAX_ERROR 3.2546531700261561e-7
467 
468 #define GTE_C_LOG2_DEG8_C1 +1.4426896453621882
469 #define GTE_C_LOG2_DEG8_C2 -7.2115893912535967e-01
470 #define GTE_C_LOG2_DEG8_C3 +4.7861716616785088e-01
471 #define GTE_C_LOG2_DEG8_C4 -3.4699935395019565e-01
472 #define GTE_C_LOG2_DEG8_C5 +2.4114048765477492e-01
473 #define GTE_C_LOG2_DEG8_C6 -1.3657398692885181e-01
474 #define GTE_C_LOG2_DEG8_C7 +5.1421382871922106e-02
475 #define GTE_C_LOG2_DEG8_C8 -9.1364020499895560e-03
476 #define GTE_C_LOG2_DEG8_MAX_ERROR 4.8796219218050219e-8


geometric_tools_engine
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 03:59:59