1 /* Automatically generated code, do not edit */
2 /* Generated from source file: side2.pck */
3 
side2_3d_filter(const double * p0,const double * p1,const double * p2,const double * q0,const double * q1)4 inline int side2_3d_filter( const double* p0, const double* p1, const double* p2, const double* q0, const double* q1) {
5     double p1_0_p0_0 = (p1[0] - p0[0]);
6     double p1_1_p0_1 = (p1[1] - p0[1]);
7     double p1_2_p0_2 = (p1[2] - p0[2]);
8     double l1;
9     l1 = (1 * (((p1_0_p0_0 * p1_0_p0_0) + (p1_1_p0_1 * p1_1_p0_1)) + (p1_2_p0_2 * p1_2_p0_2)));
10     double p2_0_p0_0 = (p2[0] - p0[0]);
11     double p2_1_p0_1 = (p2[1] - p0[1]);
12     double p2_2_p0_2 = (p2[2] - p0[2]);
13     double l2;
14     l2 = (1 * (((p2_0_p0_0 * p2_0_p0_0) + (p2_1_p0_1 * p2_1_p0_1)) + (p2_2_p0_2 * p2_2_p0_2)));
15     double q0_0_p0_0 = (q0[0] - p0[0]);
16     double q0_1_p0_1 = (q0[1] - p0[1]);
17     double q0_2_p0_2 = (q0[2] - p0[2]);
18     double a10;
19     a10 = (2 * (((p1_0_p0_0 * q0_0_p0_0) + (p1_1_p0_1 * q0_1_p0_1)) + (p1_2_p0_2 * q0_2_p0_2)));
20     double q1_0_p0_0 = (q1[0] - p0[0]);
21     double q1_1_p0_1 = (q1[1] - p0[1]);
22     double q1_2_p0_2 = (q1[2] - p0[2]);
23     double a11;
24     a11 = (2 * (((p1_0_p0_0 * q1_0_p0_0) + (p1_1_p0_1 * q1_1_p0_1)) + (p1_2_p0_2 * q1_2_p0_2)));
25     double a20;
26     a20 = (2 * (((p2_0_p0_0 * q0_0_p0_0) + (p2_1_p0_1 * q0_1_p0_1)) + (p2_2_p0_2 * q0_2_p0_2)));
27     double a21;
28     a21 = (2 * (((p2_0_p0_0 * q1_0_p0_0) + (p2_1_p0_1 * q1_1_p0_1)) + (p2_2_p0_2 * q1_2_p0_2)));
29     double Delta;
30     Delta = (a11 - a10);
31     double DeltaLambda0;
32     DeltaLambda0 = (a11 - l1);
33     double DeltaLambda1;
34     DeltaLambda1 = (l1 - a10);
35     double r;
36     r = (((Delta * l2) - (a20 * DeltaLambda0)) - (a21 * DeltaLambda1));
37     double eps;
38     double max1 = fabs(p1_0_p0_0);
39     if( (max1 < fabs(p1_1_p0_1)) )
40     {
41         max1 = fabs(p1_1_p0_1);
42     }
43     if( (max1 < fabs(p1_2_p0_2)) )
44     {
45         max1 = fabs(p1_2_p0_2);
46     }
47     double max2 = fabs(q0_0_p0_0);
48     if( (max2 < fabs(q0_1_p0_1)) )
49     {
50         max2 = fabs(q0_1_p0_1);
51     }
52     if( (max2 < fabs(q0_2_p0_2)) )
53     {
54         max2 = fabs(q0_2_p0_2);
55     }
56     if( (max2 < fabs(q1_0_p0_0)) )
57     {
58         max2 = fabs(q1_0_p0_0);
59     }
60     if( (max2 < fabs(q1_1_p0_1)) )
61     {
62         max2 = fabs(q1_1_p0_1);
63     }
64     if( (max2 < fabs(q1_2_p0_2)) )
65     {
66         max2 = fabs(q1_2_p0_2);
67     }
68     double lower_bound_1;
69     double upper_bound_1;
70     int Delta_sign;
71     int int_tmp_result;
72     lower_bound_1 = max1;
73     upper_bound_1 = max1;
74     if( (max2 < lower_bound_1) )
75     {
76         lower_bound_1 = max2;
77     }
78     else
79     {
80         if( (max2 > upper_bound_1) )
81         {
82             upper_bound_1 = max2;
83         }
84     }
85     if( (lower_bound_1 < 2.23755023300058943229e-147) )
86     {
87         return FPG_UNCERTAIN_VALUE;
88     }
89     else
90     {
91         if( (upper_bound_1 > 3.74144419156711063983e+50) )
92         {
93             return FPG_UNCERTAIN_VALUE;
94         }
95         eps = (4.44425370757048798480e-15 * (max1 * max2));
96         if( (Delta > eps) )
97         {
98             int_tmp_result = 1;
99         }
100         else
101         {
102             if( (Delta < -eps) )
103             {
104                 int_tmp_result = -1;
105             }
106             else
107             {
108                 return FPG_UNCERTAIN_VALUE;
109             }
110         }
111     }
112     Delta_sign = int_tmp_result;
113     double max3 = max1;
114     if( (max3 < max2) )
115     {
116         max3 = max2;
117     }
118     double max4 = max2;
119     if( (max4 < fabs(p2_0_p0_0)) )
120     {
121         max4 = fabs(p2_0_p0_0);
122     }
123     if( (max4 < fabs(p2_1_p0_1)) )
124     {
125         max4 = fabs(p2_1_p0_1);
126     }
127     if( (max4 < fabs(p2_2_p0_2)) )
128     {
129         max4 = fabs(p2_2_p0_2);
130     }
131     if( (max3 < max4) )
132     {
133         max3 = max4;
134     }
135     int r_sign;
136     int int_tmp_result_FFWKCAA;
137     lower_bound_1 = max1;
138     upper_bound_1 = max1;
139     if( (max3 < lower_bound_1) )
140     {
141         lower_bound_1 = max3;
142     }
143     else
144     {
145         if( (max3 > upper_bound_1) )
146         {
147             upper_bound_1 = max3;
148         }
149     }
150     if( (max4 < lower_bound_1) )
151     {
152         lower_bound_1 = max4;
153     }
154     if( (lower_bound_1 < 2.22985945097100191780e-74) )
155     {
156         return FPG_UNCERTAIN_VALUE;
157     }
158     else
159     {
160         if( (upper_bound_1 > 3.74144419156711063983e+50) )
161         {
162             return FPG_UNCERTAIN_VALUE;
163         }
164         eps = (8.99983341597279045654e-14 * (((max1 * max4) * max4) * max3));
165         if( (r > eps) )
166         {
167             int_tmp_result_FFWKCAA = 1;
168         }
169         else
170         {
171             if( (r < -eps) )
172             {
173                 int_tmp_result_FFWKCAA = -1;
174             }
175             else
176             {
177                 return FPG_UNCERTAIN_VALUE;
178             }
179         }
180     }
181     r_sign = int_tmp_result_FFWKCAA;
182     return (Delta_sign * r_sign);
183 }
184 
185 
side2_4d_filter(const double * p0,const double * p1,const double * p2,const double * q0,const double * q1)186 inline int side2_4d_filter( const double* p0, const double* p1, const double* p2, const double* q0, const double* q1) {
187     double p1_0_p0_0 = (p1[0] - p0[0]);
188     double p1_1_p0_1 = (p1[1] - p0[1]);
189     double p1_2_p0_2 = (p1[2] - p0[2]);
190     double p1_3_p0_3 = (p1[3] - p0[3]);
191     double l1;
192     l1 = (1 * ((((p1_0_p0_0 * p1_0_p0_0) + (p1_1_p0_1 * p1_1_p0_1)) + (p1_2_p0_2 * p1_2_p0_2)) + (p1_3_p0_3 * p1_3_p0_3)));
193     double p2_0_p0_0 = (p2[0] - p0[0]);
194     double p2_1_p0_1 = (p2[1] - p0[1]);
195     double p2_2_p0_2 = (p2[2] - p0[2]);
196     double p2_3_p0_3 = (p2[3] - p0[3]);
197     double l2;
198     l2 = (1 * ((((p2_0_p0_0 * p2_0_p0_0) + (p2_1_p0_1 * p2_1_p0_1)) + (p2_2_p0_2 * p2_2_p0_2)) + (p2_3_p0_3 * p2_3_p0_3)));
199     double q0_0_p0_0 = (q0[0] - p0[0]);
200     double q0_1_p0_1 = (q0[1] - p0[1]);
201     double q0_2_p0_2 = (q0[2] - p0[2]);
202     double q0_3_p0_3 = (q0[3] - p0[3]);
203     double a10;
204     a10 = (2 * ((((p1_0_p0_0 * q0_0_p0_0) + (p1_1_p0_1 * q0_1_p0_1)) + (p1_2_p0_2 * q0_2_p0_2)) + (p1_3_p0_3 * q0_3_p0_3)));
205     double q1_0_p0_0 = (q1[0] - p0[0]);
206     double q1_1_p0_1 = (q1[1] - p0[1]);
207     double q1_2_p0_2 = (q1[2] - p0[2]);
208     double q1_3_p0_3 = (q1[3] - p0[3]);
209     double a11;
210     a11 = (2 * ((((p1_0_p0_0 * q1_0_p0_0) + (p1_1_p0_1 * q1_1_p0_1)) + (p1_2_p0_2 * q1_2_p0_2)) + (p1_3_p0_3 * q1_3_p0_3)));
211     double a20;
212     a20 = (2 * ((((p2_0_p0_0 * q0_0_p0_0) + (p2_1_p0_1 * q0_1_p0_1)) + (p2_2_p0_2 * q0_2_p0_2)) + (p2_3_p0_3 * q0_3_p0_3)));
213     double a21;
214     a21 = (2 * ((((p2_0_p0_0 * q1_0_p0_0) + (p2_1_p0_1 * q1_1_p0_1)) + (p2_2_p0_2 * q1_2_p0_2)) + (p2_3_p0_3 * q1_3_p0_3)));
215     double Delta;
216     Delta = (a11 - a10);
217     double DeltaLambda0;
218     DeltaLambda0 = (a11 - l1);
219     double DeltaLambda1;
220     DeltaLambda1 = (l1 - a10);
221     double r;
222     r = (((Delta * l2) - (a20 * DeltaLambda0)) - (a21 * DeltaLambda1));
223     double eps;
224     double max1 = fabs(p1_2_p0_2);
225     if( (max1 < fabs(p1_0_p0_0)) )
226     {
227         max1 = fabs(p1_0_p0_0);
228     }
229     if( (max1 < fabs(p1_1_p0_1)) )
230     {
231         max1 = fabs(p1_1_p0_1);
232     }
233     if( (max1 < fabs(p1_3_p0_3)) )
234     {
235         max1 = fabs(p1_3_p0_3);
236     }
237     double max2 = fabs(q0_0_p0_0);
238     if( (max2 < fabs(q0_1_p0_1)) )
239     {
240         max2 = fabs(q0_1_p0_1);
241     }
242     if( (max2 < fabs(q0_2_p0_2)) )
243     {
244         max2 = fabs(q0_2_p0_2);
245     }
246     if( (max2 < fabs(q0_3_p0_3)) )
247     {
248         max2 = fabs(q0_3_p0_3);
249     }
250     if( (max2 < fabs(q1_0_p0_0)) )
251     {
252         max2 = fabs(q1_0_p0_0);
253     }
254     if( (max2 < fabs(q1_1_p0_1)) )
255     {
256         max2 = fabs(q1_1_p0_1);
257     }
258     if( (max2 < fabs(q1_2_p0_2)) )
259     {
260         max2 = fabs(q1_2_p0_2);
261     }
262     if( (max2 < fabs(q1_3_p0_3)) )
263     {
264         max2 = fabs(q1_3_p0_3);
265     }
266     double lower_bound_1;
267     double upper_bound_1;
268     int Delta_sign;
269     int int_tmp_result;
270     lower_bound_1 = max1;
271     upper_bound_1 = max1;
272     if( (max2 < lower_bound_1) )
273     {
274         lower_bound_1 = max2;
275     }
276     else
277     {
278         if( (max2 > upper_bound_1) )
279         {
280             upper_bound_1 = max2;
281         }
282     }
283     if( (lower_bound_1 < 1.85816790703293534018e-147) )
284     {
285         return FPG_UNCERTAIN_VALUE;
286     }
287     else
288     {
289         if( (upper_bound_1 > 1.87072209578355531992e+50) )
290         {
291             return FPG_UNCERTAIN_VALUE;
292         }
293         eps = (6.44428177279185717888e-15 * (max1 * max2));
294         if( (Delta > eps) )
295         {
296             int_tmp_result = 1;
297         }
298         else
299         {
300             if( (Delta < -eps) )
301             {
302                 int_tmp_result = -1;
303             }
304             else
305             {
306                 return FPG_UNCERTAIN_VALUE;
307             }
308         }
309     }
310     Delta_sign = int_tmp_result;
311     double max3 = max1;
312     if( (max3 < max2) )
313     {
314         max3 = max2;
315     }
316     double max4 = max2;
317     if( (max4 < fabs(p2_0_p0_0)) )
318     {
319         max4 = fabs(p2_0_p0_0);
320     }
321     if( (max4 < fabs(p2_2_p0_2)) )
322     {
323         max4 = fabs(p2_2_p0_2);
324     }
325     if( (max4 < fabs(p2_1_p0_1)) )
326     {
327         max4 = fabs(p2_1_p0_1);
328     }
329     if( (max4 < fabs(p2_3_p0_3)) )
330     {
331         max4 = fabs(p2_3_p0_3);
332     }
333     if( (max3 < max4) )
334     {
335         max3 = max4;
336     }
337     int r_sign;
338     int int_tmp_result_FFWKCAA;
339     lower_bound_1 = max3;
340     upper_bound_1 = max3;
341     if( (max1 < lower_bound_1) )
342     {
343         lower_bound_1 = max1;
344     }
345     if( (max4 < lower_bound_1) )
346     {
347         lower_bound_1 = max4;
348     }
349     if( (lower_bound_1 < 1.89528395402941802921e-74) )
350     {
351         return FPG_UNCERTAIN_VALUE;
352     }
353     else
354     {
355         if( (upper_bound_1 > 1.87072209578355531992e+50) )
356         {
357             return FPG_UNCERTAIN_VALUE;
358         }
359         eps = (1.72443682410932010423e-13 * (((max1 * max4) * max4) * max3));
360         if( (r > eps) )
361         {
362             int_tmp_result_FFWKCAA = 1;
363         }
364         else
365         {
366             if( (r < -eps) )
367             {
368                 int_tmp_result_FFWKCAA = -1;
369             }
370             else
371             {
372                 return FPG_UNCERTAIN_VALUE;
373             }
374         }
375     }
376     r_sign = int_tmp_result_FFWKCAA;
377     return (Delta_sign * r_sign);
378 }
379 
380 
side2_6d_filter(const double * p0,const double * p1,const double * p2,const double * q0,const double * q1)381 inline int side2_6d_filter( const double* p0, const double* p1, const double* p2, const double* q0, const double* q1) {
382     double p1_0_p0_0 = (p1[0] - p0[0]);
383     double p1_1_p0_1 = (p1[1] - p0[1]);
384     double p1_2_p0_2 = (p1[2] - p0[2]);
385     double p1_3_p0_3 = (p1[3] - p0[3]);
386     double p1_4_p0_4 = (p1[4] - p0[4]);
387     double p1_5_p0_5 = (p1[5] - p0[5]);
388     double l1;
389     l1 = (1 * ((((((p1_0_p0_0 * p1_0_p0_0) + (p1_1_p0_1 * p1_1_p0_1)) + (p1_2_p0_2 * p1_2_p0_2)) + (p1_3_p0_3 * p1_3_p0_3)) + (p1_4_p0_4 * p1_4_p0_4)) + (p1_5_p0_5 * p1_5_p0_5)));
390     double p2_0_p0_0 = (p2[0] - p0[0]);
391     double p2_1_p0_1 = (p2[1] - p0[1]);
392     double p2_2_p0_2 = (p2[2] - p0[2]);
393     double p2_3_p0_3 = (p2[3] - p0[3]);
394     double p2_4_p0_4 = (p2[4] - p0[4]);
395     double p2_5_p0_5 = (p2[5] - p0[5]);
396     double l2;
397     l2 = (1 * ((((((p2_0_p0_0 * p2_0_p0_0) + (p2_1_p0_1 * p2_1_p0_1)) + (p2_2_p0_2 * p2_2_p0_2)) + (p2_3_p0_3 * p2_3_p0_3)) + (p2_4_p0_4 * p2_4_p0_4)) + (p2_5_p0_5 * p2_5_p0_5)));
398     double q0_0_p0_0 = (q0[0] - p0[0]);
399     double q0_1_p0_1 = (q0[1] - p0[1]);
400     double q0_2_p0_2 = (q0[2] - p0[2]);
401     double q0_3_p0_3 = (q0[3] - p0[3]);
402     double q0_4_p0_4 = (q0[4] - p0[4]);
403     double q0_5_p0_5 = (q0[5] - p0[5]);
404     double a10;
405     a10 = (2 * ((((((p1_0_p0_0 * q0_0_p0_0) + (p1_1_p0_1 * q0_1_p0_1)) + (p1_2_p0_2 * q0_2_p0_2)) + (p1_3_p0_3 * q0_3_p0_3)) + (p1_4_p0_4 * q0_4_p0_4)) + (p1_5_p0_5 * q0_5_p0_5)));
406     double q1_0_p0_0 = (q1[0] - p0[0]);
407     double q1_1_p0_1 = (q1[1] - p0[1]);
408     double q1_2_p0_2 = (q1[2] - p0[2]);
409     double q1_3_p0_3 = (q1[3] - p0[3]);
410     double q1_4_p0_4 = (q1[4] - p0[4]);
411     double q1_5_p0_5 = (q1[5] - p0[5]);
412     double a11;
413     a11 = (2 * ((((((p1_0_p0_0 * q1_0_p0_0) + (p1_1_p0_1 * q1_1_p0_1)) + (p1_2_p0_2 * q1_2_p0_2)) + (p1_3_p0_3 * q1_3_p0_3)) + (p1_4_p0_4 * q1_4_p0_4)) + (p1_5_p0_5 * q1_5_p0_5)));
414     double a20;
415     a20 = (2 * ((((((p2_0_p0_0 * q0_0_p0_0) + (p2_1_p0_1 * q0_1_p0_1)) + (p2_2_p0_2 * q0_2_p0_2)) + (p2_3_p0_3 * q0_3_p0_3)) + (p2_4_p0_4 * q0_4_p0_4)) + (p2_5_p0_5 * q0_5_p0_5)));
416     double a21;
417     a21 = (2 * ((((((p2_0_p0_0 * q1_0_p0_0) + (p2_1_p0_1 * q1_1_p0_1)) + (p2_2_p0_2 * q1_2_p0_2)) + (p2_3_p0_3 * q1_3_p0_3)) + (p2_4_p0_4 * q1_4_p0_4)) + (p2_5_p0_5 * q1_5_p0_5)));
418     double Delta;
419     Delta = (a11 - a10);
420     double DeltaLambda0;
421     DeltaLambda0 = (a11 - l1);
422     double DeltaLambda1;
423     DeltaLambda1 = (l1 - a10);
424     double r;
425     r = (((Delta * l2) - (a20 * DeltaLambda0)) - (a21 * DeltaLambda1));
426     double eps;
427     double max1 = fabs(p1_1_p0_1);
428     if( (max1 < fabs(p1_2_p0_2)) )
429     {
430         max1 = fabs(p1_2_p0_2);
431     }
432     if( (max1 < fabs(p1_3_p0_3)) )
433     {
434         max1 = fabs(p1_3_p0_3);
435     }
436     if( (max1 < fabs(p1_0_p0_0)) )
437     {
438         max1 = fabs(p1_0_p0_0);
439     }
440     if( (max1 < fabs(p1_4_p0_4)) )
441     {
442         max1 = fabs(p1_4_p0_4);
443     }
444     if( (max1 < fabs(p1_5_p0_5)) )
445     {
446         max1 = fabs(p1_5_p0_5);
447     }
448     double max2 = fabs(q0_0_p0_0);
449     if( (max2 < fabs(q0_1_p0_1)) )
450     {
451         max2 = fabs(q0_1_p0_1);
452     }
453     if( (max2 < fabs(q0_2_p0_2)) )
454     {
455         max2 = fabs(q0_2_p0_2);
456     }
457     if( (max2 < fabs(q0_3_p0_3)) )
458     {
459         max2 = fabs(q0_3_p0_3);
460     }
461     if( (max2 < fabs(q0_4_p0_4)) )
462     {
463         max2 = fabs(q0_4_p0_4);
464     }
465     if( (max2 < fabs(q0_5_p0_5)) )
466     {
467         max2 = fabs(q0_5_p0_5);
468     }
469     if( (max2 < fabs(q1_0_p0_0)) )
470     {
471         max2 = fabs(q1_0_p0_0);
472     }
473     if( (max2 < fabs(q1_1_p0_1)) )
474     {
475         max2 = fabs(q1_1_p0_1);
476     }
477     if( (max2 < fabs(q1_2_p0_2)) )
478     {
479         max2 = fabs(q1_2_p0_2);
480     }
481     if( (max2 < fabs(q1_3_p0_3)) )
482     {
483         max2 = fabs(q1_3_p0_3);
484     }
485     if( (max2 < fabs(q1_4_p0_4)) )
486     {
487         max2 = fabs(q1_4_p0_4);
488     }
489     if( (max2 < fabs(q1_5_p0_5)) )
490     {
491         max2 = fabs(q1_5_p0_5);
492     }
493     double lower_bound_1;
494     double upper_bound_1;
495     int Delta_sign;
496     int int_tmp_result;
497     lower_bound_1 = max1;
498     upper_bound_1 = max1;
499     if( (max2 < lower_bound_1) )
500     {
501         lower_bound_1 = max2;
502     }
503     else
504     {
505         if( (max2 > upper_bound_1) )
506         {
507             upper_bound_1 = max2;
508         }
509     }
510     if( (lower_bound_1 < 1.41511993781011659868e-147) )
511     {
512         return FPG_UNCERTAIN_VALUE;
513     }
514     else
515     {
516         if( (upper_bound_1 > 1.87072209578355531992e+50) )
517         {
518             return FPG_UNCERTAIN_VALUE;
519         }
520         eps = (1.11111223981318615596e-14 * (max1 * max2));
521         if( (Delta > eps) )
522         {
523             int_tmp_result = 1;
524         }
525         else
526         {
527             if( (Delta < -eps) )
528             {
529                 int_tmp_result = -1;
530             }
531             else
532             {
533                 return FPG_UNCERTAIN_VALUE;
534             }
535         }
536     }
537     Delta_sign = int_tmp_result;
538     double max3 = max1;
539     if( (max3 < max2) )
540     {
541         max3 = max2;
542     }
543     double max4 = max2;
544     if( (max4 < fabs(p2_2_p0_2)) )
545     {
546         max4 = fabs(p2_2_p0_2);
547     }
548     if( (max4 < fabs(p2_4_p0_4)) )
549     {
550         max4 = fabs(p2_4_p0_4);
551     }
552     if( (max4 < fabs(p2_3_p0_3)) )
553     {
554         max4 = fabs(p2_3_p0_3);
555     }
556     if( (max4 < fabs(p2_0_p0_0)) )
557     {
558         max4 = fabs(p2_0_p0_0);
559     }
560     if( (max4 < fabs(p2_1_p0_1)) )
561     {
562         max4 = fabs(p2_1_p0_1);
563     }
564     if( (max4 < fabs(p2_5_p0_5)) )
565     {
566         max4 = fabs(p2_5_p0_5);
567     }
568     if( (max3 < max4) )
569     {
570         max3 = max4;
571     }
572     int r_sign;
573     int int_tmp_result_FFWKCAA;
574     lower_bound_1 = max1;
575     upper_bound_1 = max1;
576     if( (max3 < lower_bound_1) )
577     {
578         lower_bound_1 = max3;
579     }
580     else
581     {
582         if( (max3 > upper_bound_1) )
583         {
584             upper_bound_1 = max3;
585         }
586     }
587     if( (max4 < lower_bound_1) )
588     {
589         lower_bound_1 = max4;
590     }
591     if( (lower_bound_1 < 1.49958502193059513986e-74) )
592     {
593         return FPG_UNCERTAIN_VALUE;
594     }
595     else
596     {
597         if( (upper_bound_1 > 1.87072209578355531992e+50) )
598         {
599             return FPG_UNCERTAIN_VALUE;
600         }
601         eps = (4.40007476026584016994e-13 * (((max1 * max4) * max4) * max3));
602         if( (r > eps) )
603         {
604             int_tmp_result_FFWKCAA = 1;
605         }
606         else
607         {
608             if( (r < -eps) )
609             {
610                 int_tmp_result_FFWKCAA = -1;
611             }
612             else
613             {
614                 return FPG_UNCERTAIN_VALUE;
615             }
616         }
617     }
618     r_sign = int_tmp_result_FFWKCAA;
619     return (Delta_sign * r_sign);
620 }
621 
622 
side2_7d_filter(const double * p0,const double * p1,const double * p2,const double * q0,const double * q1)623 inline int side2_7d_filter( const double* p0, const double* p1, const double* p2, const double* q0, const double* q1) {
624     double p1_0_p0_0 = (p1[0] - p0[0]);
625     double p1_1_p0_1 = (p1[1] - p0[1]);
626     double p1_2_p0_2 = (p1[2] - p0[2]);
627     double p1_3_p0_3 = (p1[3] - p0[3]);
628     double p1_4_p0_4 = (p1[4] - p0[4]);
629     double p1_5_p0_5 = (p1[5] - p0[5]);
630     double p1_6_p0_6 = (p1[6] - p0[6]);
631     double l1;
632     l1 = (1 * (((((((p1_0_p0_0 * p1_0_p0_0) + (p1_1_p0_1 * p1_1_p0_1)) + (p1_2_p0_2 * p1_2_p0_2)) + (p1_3_p0_3 * p1_3_p0_3)) + (p1_4_p0_4 * p1_4_p0_4)) + (p1_5_p0_5 * p1_5_p0_5)) + (p1_6_p0_6 * p1_6_p0_6)));
633     double p2_0_p0_0 = (p2[0] - p0[0]);
634     double p2_1_p0_1 = (p2[1] - p0[1]);
635     double p2_2_p0_2 = (p2[2] - p0[2]);
636     double p2_3_p0_3 = (p2[3] - p0[3]);
637     double p2_4_p0_4 = (p2[4] - p0[4]);
638     double p2_5_p0_5 = (p2[5] - p0[5]);
639     double p2_6_p0_6 = (p2[6] - p0[6]);
640     double l2;
641     l2 = (1 * (((((((p2_0_p0_0 * p2_0_p0_0) + (p2_1_p0_1 * p2_1_p0_1)) + (p2_2_p0_2 * p2_2_p0_2)) + (p2_3_p0_3 * p2_3_p0_3)) + (p2_4_p0_4 * p2_4_p0_4)) + (p2_5_p0_5 * p2_5_p0_5)) + (p2_6_p0_6 * p2_6_p0_6)));
642     double q0_0_p0_0 = (q0[0] - p0[0]);
643     double q0_1_p0_1 = (q0[1] - p0[1]);
644     double q0_2_p0_2 = (q0[2] - p0[2]);
645     double q0_3_p0_3 = (q0[3] - p0[3]);
646     double q0_4_p0_4 = (q0[4] - p0[4]);
647     double q0_5_p0_5 = (q0[5] - p0[5]);
648     double q0_6_p0_6 = (q0[6] - p0[6]);
649     double a10;
650     a10 = (2 * (((((((p1_0_p0_0 * q0_0_p0_0) + (p1_1_p0_1 * q0_1_p0_1)) + (p1_2_p0_2 * q0_2_p0_2)) + (p1_3_p0_3 * q0_3_p0_3)) + (p1_4_p0_4 * q0_4_p0_4)) + (p1_5_p0_5 * q0_5_p0_5)) + (p1_6_p0_6 * q0_6_p0_6)));
651     double q1_0_p0_0 = (q1[0] - p0[0]);
652     double q1_1_p0_1 = (q1[1] - p0[1]);
653     double q1_2_p0_2 = (q1[2] - p0[2]);
654     double q1_3_p0_3 = (q1[3] - p0[3]);
655     double q1_4_p0_4 = (q1[4] - p0[4]);
656     double q1_5_p0_5 = (q1[5] - p0[5]);
657     double q1_6_p0_6 = (q1[6] - p0[6]);
658     double a11;
659     a11 = (2 * (((((((p1_0_p0_0 * q1_0_p0_0) + (p1_1_p0_1 * q1_1_p0_1)) + (p1_2_p0_2 * q1_2_p0_2)) + (p1_3_p0_3 * q1_3_p0_3)) + (p1_4_p0_4 * q1_4_p0_4)) + (p1_5_p0_5 * q1_5_p0_5)) + (p1_6_p0_6 * q1_6_p0_6)));
660     double a20;
661     a20 = (2 * (((((((p2_0_p0_0 * q0_0_p0_0) + (p2_1_p0_1 * q0_1_p0_1)) + (p2_2_p0_2 * q0_2_p0_2)) + (p2_3_p0_3 * q0_3_p0_3)) + (p2_4_p0_4 * q0_4_p0_4)) + (p2_5_p0_5 * q0_5_p0_5)) + (p2_6_p0_6 * q0_6_p0_6)));
662     double a21;
663     a21 = (2 * (((((((p2_0_p0_0 * q1_0_p0_0) + (p2_1_p0_1 * q1_1_p0_1)) + (p2_2_p0_2 * q1_2_p0_2)) + (p2_3_p0_3 * q1_3_p0_3)) + (p2_4_p0_4 * q1_4_p0_4)) + (p2_5_p0_5 * q1_5_p0_5)) + (p2_6_p0_6 * q1_6_p0_6)));
664     double Delta;
665     Delta = (a11 - a10);
666     double DeltaLambda0;
667     DeltaLambda0 = (a11 - l1);
668     double DeltaLambda1;
669     DeltaLambda1 = (l1 - a10);
670     double r;
671     r = (((Delta * l2) - (a20 * DeltaLambda0)) - (a21 * DeltaLambda1));
672     double eps;
673     double max1 = fabs(p1_2_p0_2);
674     if( (max1 < fabs(p1_1_p0_1)) )
675     {
676         max1 = fabs(p1_1_p0_1);
677     }
678     if( (max1 < fabs(p1_0_p0_0)) )
679     {
680         max1 = fabs(p1_0_p0_0);
681     }
682     if( (max1 < fabs(p1_4_p0_4)) )
683     {
684         max1 = fabs(p1_4_p0_4);
685     }
686     if( (max1 < fabs(p1_3_p0_3)) )
687     {
688         max1 = fabs(p1_3_p0_3);
689     }
690     if( (max1 < fabs(p1_5_p0_5)) )
691     {
692         max1 = fabs(p1_5_p0_5);
693     }
694     if( (max1 < fabs(p1_6_p0_6)) )
695     {
696         max1 = fabs(p1_6_p0_6);
697     }
698     double max2 = fabs(q0_0_p0_0);
699     if( (max2 < fabs(q0_1_p0_1)) )
700     {
701         max2 = fabs(q0_1_p0_1);
702     }
703     if( (max2 < fabs(q0_2_p0_2)) )
704     {
705         max2 = fabs(q0_2_p0_2);
706     }
707     if( (max2 < fabs(q0_3_p0_3)) )
708     {
709         max2 = fabs(q0_3_p0_3);
710     }
711     if( (max2 < fabs(q0_4_p0_4)) )
712     {
713         max2 = fabs(q0_4_p0_4);
714     }
715     if( (max2 < fabs(q0_5_p0_5)) )
716     {
717         max2 = fabs(q0_5_p0_5);
718     }
719     if( (max2 < fabs(q0_6_p0_6)) )
720     {
721         max2 = fabs(q0_6_p0_6);
722     }
723     if( (max2 < fabs(q1_0_p0_0)) )
724     {
725         max2 = fabs(q1_0_p0_0);
726     }
727     if( (max2 < fabs(q1_1_p0_1)) )
728     {
729         max2 = fabs(q1_1_p0_1);
730     }
731     if( (max2 < fabs(q1_2_p0_2)) )
732     {
733         max2 = fabs(q1_2_p0_2);
734     }
735     if( (max2 < fabs(q1_3_p0_3)) )
736     {
737         max2 = fabs(q1_3_p0_3);
738     }
739     if( (max2 < fabs(q1_4_p0_4)) )
740     {
741         max2 = fabs(q1_4_p0_4);
742     }
743     if( (max2 < fabs(q1_5_p0_5)) )
744     {
745         max2 = fabs(q1_5_p0_5);
746     }
747     if( (max2 < fabs(q1_6_p0_6)) )
748     {
749         max2 = fabs(q1_6_p0_6);
750     }
751     double lower_bound_1;
752     double upper_bound_1;
753     int Delta_sign;
754     int int_tmp_result;
755     lower_bound_1 = max1;
756     upper_bound_1 = max1;
757     if( (max2 < lower_bound_1) )
758     {
759         lower_bound_1 = max2;
760     }
761     else
762     {
763         if( (max2 > upper_bound_1) )
764         {
765             upper_bound_1 = max2;
766         }
767     }
768     if( (lower_bound_1 < 1.27080861580266953580e-147) )
769     {
770         return FPG_UNCERTAIN_VALUE;
771     }
772     else
773     {
774         if( (upper_bound_1 > 1.87072209578355531992e+50) )
775         {
776             return FPG_UNCERTAIN_VALUE;
777         }
778         eps = (1.37779349582504943796e-14 * (max1 * max2));
779         if( (Delta > eps) )
780         {
781             int_tmp_result = 1;
782         }
783         else
784         {
785             if( (Delta < -eps) )
786             {
787                 int_tmp_result = -1;
788             }
789             else
790             {
791                 return FPG_UNCERTAIN_VALUE;
792             }
793         }
794     }
795     Delta_sign = int_tmp_result;
796     double max3 = max1;
797     if( (max3 < max2) )
798     {
799         max3 = max2;
800     }
801     double max4 = max2;
802     if( (max4 < fabs(p2_0_p0_0)) )
803     {
804         max4 = fabs(p2_0_p0_0);
805     }
806     if( (max4 < fabs(p2_1_p0_1)) )
807     {
808         max4 = fabs(p2_1_p0_1);
809     }
810     if( (max4 < fabs(p2_2_p0_2)) )
811     {
812         max4 = fabs(p2_2_p0_2);
813     }
814     if( (max4 < fabs(p2_3_p0_3)) )
815     {
816         max4 = fabs(p2_3_p0_3);
817     }
818     if( (max4 < fabs(p2_4_p0_4)) )
819     {
820         max4 = fabs(p2_4_p0_4);
821     }
822     if( (max4 < fabs(p2_5_p0_5)) )
823     {
824         max4 = fabs(p2_5_p0_5);
825     }
826     if( (max4 < fabs(p2_6_p0_6)) )
827     {
828         max4 = fabs(p2_6_p0_6);
829     }
830     if( (max3 < max4) )
831     {
832         max3 = max4;
833     }
834     int r_sign;
835     int int_tmp_result_FFWKCAA;
836     lower_bound_1 = max1;
837     upper_bound_1 = max1;
838     if( (max3 < lower_bound_1) )
839     {
840         lower_bound_1 = max3;
841     }
842     else
843     {
844         if( (max3 > upper_bound_1) )
845         {
846             upper_bound_1 = max3;
847         }
848     }
849     if( (max4 < lower_bound_1) )
850     {
851         lower_bound_1 = max4;
852     }
853     if( (lower_bound_1 < 1.36918881183883509035e-74) )
854     {
855         return FPG_UNCERTAIN_VALUE;
856     }
857     else
858     {
859         if( (upper_bound_1 > 1.87072209578355531992e+50) )
860         {
861             return FPG_UNCERTAIN_VALUE;
862         }
863         eps = (6.33127335329798996022e-13 * (((max1 * max4) * max4) * max3));
864         if( (r > eps) )
865         {
866             int_tmp_result_FFWKCAA = 1;
867         }
868         else
869         {
870             if( (r < -eps) )
871             {
872                 int_tmp_result_FFWKCAA = -1;
873             }
874             else
875             {
876                 return FPG_UNCERTAIN_VALUE;
877             }
878         }
879     }
880     r_sign = int_tmp_result_FFWKCAA;
881     return (Delta_sign * r_sign);
882 }
883 
884 
side2_8d_filter(const double * p0,const double * p1,const double * p2,const double * q0,const double * q1)885 inline int side2_8d_filter( const double* p0, const double* p1, const double* p2, const double* q0, const double* q1) {
886     double p1_0_p0_0 = (p1[0] - p0[0]);
887     double p1_1_p0_1 = (p1[1] - p0[1]);
888     double p1_2_p0_2 = (p1[2] - p0[2]);
889     double p1_3_p0_3 = (p1[3] - p0[3]);
890     double p1_4_p0_4 = (p1[4] - p0[4]);
891     double p1_5_p0_5 = (p1[5] - p0[5]);
892     double p1_6_p0_6 = (p1[6] - p0[6]);
893     double p1_7_p0_7 = (p1[7] - p0[7]);
894     double l1;
895     l1 = (1 * ((((((((p1_0_p0_0 * p1_0_p0_0) + (p1_1_p0_1 * p1_1_p0_1)) + (p1_2_p0_2 * p1_2_p0_2)) + (p1_3_p0_3 * p1_3_p0_3)) + (p1_4_p0_4 * p1_4_p0_4)) + (p1_5_p0_5 * p1_5_p0_5)) + (p1_6_p0_6 * p1_6_p0_6)) + (p1_7_p0_7 * p1_7_p0_7)));
896     double p2_0_p0_0 = (p2[0] - p0[0]);
897     double p2_1_p0_1 = (p2[1] - p0[1]);
898     double p2_2_p0_2 = (p2[2] - p0[2]);
899     double p2_3_p0_3 = (p2[3] - p0[3]);
900     double p2_4_p0_4 = (p2[4] - p0[4]);
901     double p2_5_p0_5 = (p2[5] - p0[5]);
902     double p2_6_p0_6 = (p2[6] - p0[6]);
903     double p2_7_p0_7 = (p2[7] - p0[7]);
904     double l2;
905     l2 = (1 * ((((((((p2_0_p0_0 * p2_0_p0_0) + (p2_1_p0_1 * p2_1_p0_1)) + (p2_2_p0_2 * p2_2_p0_2)) + (p2_3_p0_3 * p2_3_p0_3)) + (p2_4_p0_4 * p2_4_p0_4)) + (p2_5_p0_5 * p2_5_p0_5)) + (p2_6_p0_6 * p2_6_p0_6)) + (p2_7_p0_7 * p2_7_p0_7)));
906     double q0_0_p0_0 = (q0[0] - p0[0]);
907     double q0_1_p0_1 = (q0[1] - p0[1]);
908     double q0_2_p0_2 = (q0[2] - p0[2]);
909     double q0_3_p0_3 = (q0[3] - p0[3]);
910     double q0_4_p0_4 = (q0[4] - p0[4]);
911     double q0_5_p0_5 = (q0[5] - p0[5]);
912     double q0_6_p0_6 = (q0[6] - p0[6]);
913     double q0_7_p0_7 = (q0[7] - p0[7]);
914     double a10;
915     a10 = (2 * ((((((((p1_0_p0_0 * q0_0_p0_0) + (p1_1_p0_1 * q0_1_p0_1)) + (p1_2_p0_2 * q0_2_p0_2)) + (p1_3_p0_3 * q0_3_p0_3)) + (p1_4_p0_4 * q0_4_p0_4)) + (p1_5_p0_5 * q0_5_p0_5)) + (p1_6_p0_6 * q0_6_p0_6)) + (p1_7_p0_7 * q0_7_p0_7)));
916     double q1_0_p0_0 = (q1[0] - p0[0]);
917     double q1_1_p0_1 = (q1[1] - p0[1]);
918     double q1_2_p0_2 = (q1[2] - p0[2]);
919     double q1_3_p0_3 = (q1[3] - p0[3]);
920     double q1_4_p0_4 = (q1[4] - p0[4]);
921     double q1_5_p0_5 = (q1[5] - p0[5]);
922     double q1_6_p0_6 = (q1[6] - p0[6]);
923     double q1_7_p0_7 = (q1[7] - p0[7]);
924     double a11;
925     a11 = (2 * ((((((((p1_0_p0_0 * q1_0_p0_0) + (p1_1_p0_1 * q1_1_p0_1)) + (p1_2_p0_2 * q1_2_p0_2)) + (p1_3_p0_3 * q1_3_p0_3)) + (p1_4_p0_4 * q1_4_p0_4)) + (p1_5_p0_5 * q1_5_p0_5)) + (p1_6_p0_6 * q1_6_p0_6)) + (p1_7_p0_7 * q1_7_p0_7)));
926     double a20;
927     a20 = (2 * ((((((((p2_0_p0_0 * q0_0_p0_0) + (p2_1_p0_1 * q0_1_p0_1)) + (p2_2_p0_2 * q0_2_p0_2)) + (p2_3_p0_3 * q0_3_p0_3)) + (p2_4_p0_4 * q0_4_p0_4)) + (p2_5_p0_5 * q0_5_p0_5)) + (p2_6_p0_6 * q0_6_p0_6)) + (p2_7_p0_7 * q0_7_p0_7)));
928     double a21;
929     a21 = (2 * ((((((((p2_0_p0_0 * q1_0_p0_0) + (p2_1_p0_1 * q1_1_p0_1)) + (p2_2_p0_2 * q1_2_p0_2)) + (p2_3_p0_3 * q1_3_p0_3)) + (p2_4_p0_4 * q1_4_p0_4)) + (p2_5_p0_5 * q1_5_p0_5)) + (p2_6_p0_6 * q1_6_p0_6)) + (p2_7_p0_7 * q1_7_p0_7)));
930     double Delta;
931     Delta = (a11 - a10);
932     double DeltaLambda0;
933     DeltaLambda0 = (a11 - l1);
934     double DeltaLambda1;
935     DeltaLambda1 = (l1 - a10);
936     double r;
937     r = (((Delta * l2) - (a20 * DeltaLambda0)) - (a21 * DeltaLambda1));
938     double eps;
939     double max1 = fabs(p1_4_p0_4);
940     if( (max1 < fabs(p1_3_p0_3)) )
941     {
942         max1 = fabs(p1_3_p0_3);
943     }
944     if( (max1 < fabs(p1_7_p0_7)) )
945     {
946         max1 = fabs(p1_7_p0_7);
947     }
948     if( (max1 < fabs(p1_0_p0_0)) )
949     {
950         max1 = fabs(p1_0_p0_0);
951     }
952     if( (max1 < fabs(p1_6_p0_6)) )
953     {
954         max1 = fabs(p1_6_p0_6);
955     }
956     if( (max1 < fabs(p1_2_p0_2)) )
957     {
958         max1 = fabs(p1_2_p0_2);
959     }
960     if( (max1 < fabs(p1_1_p0_1)) )
961     {
962         max1 = fabs(p1_1_p0_1);
963     }
964     if( (max1 < fabs(p1_5_p0_5)) )
965     {
966         max1 = fabs(p1_5_p0_5);
967     }
968     double max2 = fabs(q0_0_p0_0);
969     if( (max2 < fabs(q0_1_p0_1)) )
970     {
971         max2 = fabs(q0_1_p0_1);
972     }
973     if( (max2 < fabs(q0_2_p0_2)) )
974     {
975         max2 = fabs(q0_2_p0_2);
976     }
977     if( (max2 < fabs(q0_3_p0_3)) )
978     {
979         max2 = fabs(q0_3_p0_3);
980     }
981     if( (max2 < fabs(q0_4_p0_4)) )
982     {
983         max2 = fabs(q0_4_p0_4);
984     }
985     if( (max2 < fabs(q0_5_p0_5)) )
986     {
987         max2 = fabs(q0_5_p0_5);
988     }
989     if( (max2 < fabs(q0_6_p0_6)) )
990     {
991         max2 = fabs(q0_6_p0_6);
992     }
993     if( (max2 < fabs(q0_7_p0_7)) )
994     {
995         max2 = fabs(q0_7_p0_7);
996     }
997     if( (max2 < fabs(q1_0_p0_0)) )
998     {
999         max2 = fabs(q1_0_p0_0);
1000     }
1001     if( (max2 < fabs(q1_1_p0_1)) )
1002     {
1003         max2 = fabs(q1_1_p0_1);
1004     }
1005     if( (max2 < fabs(q1_2_p0_2)) )
1006     {
1007         max2 = fabs(q1_2_p0_2);
1008     }
1009     if( (max2 < fabs(q1_3_p0_3)) )
1010     {
1011         max2 = fabs(q1_3_p0_3);
1012     }
1013     if( (max2 < fabs(q1_4_p0_4)) )
1014     {
1015         max2 = fabs(q1_4_p0_4);
1016     }
1017     if( (max2 < fabs(q1_5_p0_5)) )
1018     {
1019         max2 = fabs(q1_5_p0_5);
1020     }
1021     if( (max2 < fabs(q1_6_p0_6)) )
1022     {
1023         max2 = fabs(q1_6_p0_6);
1024     }
1025     if( (max2 < fabs(q1_7_p0_7)) )
1026     {
1027         max2 = fabs(q1_7_p0_7);
1028     }
1029     double lower_bound_1;
1030     double upper_bound_1;
1031     int Delta_sign;
1032     int int_tmp_result;
1033     lower_bound_1 = max2;
1034     upper_bound_1 = max2;
1035     if( (max1 < lower_bound_1) )
1036     {
1037         lower_bound_1 = max1;
1038     }
1039     else
1040     {
1041         if( (max1 > upper_bound_1) )
1042         {
1043             upper_bound_1 = max1;
1044         }
1045     }
1046     if( (lower_bound_1 < 1.15542931091530087067e-147) )
1047     {
1048         return FPG_UNCERTAIN_VALUE;
1049     }
1050     else
1051     {
1052         if( (upper_bound_1 > 1.87072209578355531992e+50) )
1053         {
1054             return FPG_UNCERTAIN_VALUE;
1055         }
1056         eps = (1.66670090166682227006e-14 * (max1 * max2));
1057         if( (Delta > eps) )
1058         {
1059             int_tmp_result = 1;
1060         }
1061         else
1062         {
1063             if( (Delta < -eps) )
1064             {
1065                 int_tmp_result = -1;
1066             }
1067             else
1068             {
1069                 return FPG_UNCERTAIN_VALUE;
1070             }
1071         }
1072     }
1073     Delta_sign = int_tmp_result;
1074     double max3 = max2;
1075     if( (max3 < max1) )
1076     {
1077         max3 = max1;
1078     }
1079     double max4 = max2;
1080     if( (max4 < fabs(p2_4_p0_4)) )
1081     {
1082         max4 = fabs(p2_4_p0_4);
1083     }
1084     if( (max4 < fabs(p2_2_p0_2)) )
1085     {
1086         max4 = fabs(p2_2_p0_2);
1087     }
1088     if( (max4 < fabs(p2_0_p0_0)) )
1089     {
1090         max4 = fabs(p2_0_p0_0);
1091     }
1092     if( (max4 < fabs(p2_1_p0_1)) )
1093     {
1094         max4 = fabs(p2_1_p0_1);
1095     }
1096     if( (max4 < fabs(p2_3_p0_3)) )
1097     {
1098         max4 = fabs(p2_3_p0_3);
1099     }
1100     if( (max4 < fabs(p2_5_p0_5)) )
1101     {
1102         max4 = fabs(p2_5_p0_5);
1103     }
1104     if( (max4 < fabs(p2_6_p0_6)) )
1105     {
1106         max4 = fabs(p2_6_p0_6);
1107     }
1108     if( (max4 < fabs(p2_7_p0_7)) )
1109     {
1110         max4 = fabs(p2_7_p0_7);
1111     }
1112     if( (max3 < max4) )
1113     {
1114         max3 = max4;
1115     }
1116     int r_sign;
1117     int int_tmp_result_FFWKCAA;
1118     lower_bound_1 = max1;
1119     upper_bound_1 = max1;
1120     if( (max3 < lower_bound_1) )
1121     {
1122         lower_bound_1 = max3;
1123     }
1124     else
1125     {
1126         if( (max3 > upper_bound_1) )
1127         {
1128             upper_bound_1 = max3;
1129         }
1130     }
1131     if( (max4 < lower_bound_1) )
1132     {
1133         lower_bound_1 = max4;
1134     }
1135     if( (lower_bound_1 < 1.26419510663115923609e-74) )
1136     {
1137         return FPG_UNCERTAIN_VALUE;
1138     }
1139     else
1140     {
1141         if( (upper_bound_1 > 1.87072209578355531992e+50) )
1142         {
1143             return FPG_UNCERTAIN_VALUE;
1144         }
1145         eps = (8.71140112255785451890e-13 * (((max1 * max4) * max4) * max3));
1146         if( (r > eps) )
1147         {
1148             int_tmp_result_FFWKCAA = 1;
1149         }
1150         else
1151         {
1152             if( (r < -eps) )
1153             {
1154                 int_tmp_result_FFWKCAA = -1;
1155             }
1156             else
1157             {
1158                 return FPG_UNCERTAIN_VALUE;
1159             }
1160         }
1161     }
1162     r_sign = int_tmp_result_FFWKCAA;
1163     return (Delta_sign * r_sign);
1164 }
1165 
1166