4inline 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]);
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]);
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]);
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]);
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)));
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)));
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)));
32 DeltaLambda0 = (a11 - l1);
34 DeltaLambda1 = (l1 - a10);
36 r = (((Delta * l2) - (a20 * DeltaLambda0)) - (a21 * DeltaLambda1));
38 double max1 = fabs(p1_0_p0_0);
39 if( (max1 < fabs(p1_1_p0_1)) )
41 max1 = fabs(p1_1_p0_1);
43 if( (max1 < fabs(p1_2_p0_2)) )
45 max1 = fabs(p1_2_p0_2);
47 double max2 = fabs(q0_0_p0_0);
48 if( (max2 < fabs(q0_1_p0_1)) )
50 max2 = fabs(q0_1_p0_1);
52 if( (max2 < fabs(q0_2_p0_2)) )
54 max2 = fabs(q0_2_p0_2);
56 if( (max2 < fabs(q1_0_p0_0)) )
58 max2 = fabs(q1_0_p0_0);
60 if( (max2 < fabs(q1_1_p0_1)) )
62 max2 = fabs(q1_1_p0_1);
64 if( (max2 < fabs(q1_2_p0_2)) )
66 max2 = fabs(q1_2_p0_2);
74 if( (max2 < lower_bound_1) )
80 if( (max2 > upper_bound_1) )
85 if( (lower_bound_1 < 2.23755023300058943229e-147) )
87 return FPG_UNCERTAIN_VALUE;
91 if( (upper_bound_1 > 3.74144419156711063983e+50) )
93 return FPG_UNCERTAIN_VALUE;
95 eps = (4.44425370757048798480e-15 * (max1 * max2));
108 return FPG_UNCERTAIN_VALUE;
112 Delta_sign = int_tmp_result;
119 if( (max4 < fabs(p2_0_p0_0)) )
121 max4 = fabs(p2_0_p0_0);
123 if( (max4 < fabs(p2_1_p0_1)) )
125 max4 = fabs(p2_1_p0_1);
127 if( (max4 < fabs(p2_2_p0_2)) )
129 max4 = fabs(p2_2_p0_2);
136 int int_tmp_result_FFWKCAA;
137 lower_bound_1 = max1;
138 upper_bound_1 = max1;
139 if( (max3 < lower_bound_1) )
141 lower_bound_1 = max3;
145 if( (max3 > upper_bound_1) )
147 upper_bound_1 = max3;
150 if( (max4 < lower_bound_1) )
152 lower_bound_1 = max4;
154 if( (lower_bound_1 < 2.22985945097100191780e-74) )
156 return FPG_UNCERTAIN_VALUE;
160 if( (upper_bound_1 > 3.74144419156711063983e+50) )
162 return FPG_UNCERTAIN_VALUE;
164 eps = (8.99983341597279045654e-14 * (((max1 * max4) * max4) * max3));
167 int_tmp_result_FFWKCAA = 1;
173 int_tmp_result_FFWKCAA = -1;
177 return FPG_UNCERTAIN_VALUE;
181 r_sign = int_tmp_result_FFWKCAA;
182 return (Delta_sign * r_sign);
186inline 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]);
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]);
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]);
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]);
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)));
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)));
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)));
218 DeltaLambda0 = (a11 - l1);
220 DeltaLambda1 = (l1 - a10);
222 r = (((Delta * l2) - (a20 * DeltaLambda0)) - (a21 * DeltaLambda1));
224 double max1 = fabs(p1_2_p0_2);
225 if( (max1 < fabs(p1_0_p0_0)) )
227 max1 = fabs(p1_0_p0_0);
229 if( (max1 < fabs(p1_1_p0_1)) )
231 max1 = fabs(p1_1_p0_1);
233 if( (max1 < fabs(p1_3_p0_3)) )
235 max1 = fabs(p1_3_p0_3);
237 double max2 = fabs(q0_0_p0_0);
238 if( (max2 < fabs(q0_1_p0_1)) )
240 max2 = fabs(q0_1_p0_1);
242 if( (max2 < fabs(q0_2_p0_2)) )
244 max2 = fabs(q0_2_p0_2);
246 if( (max2 < fabs(q0_3_p0_3)) )
248 max2 = fabs(q0_3_p0_3);
250 if( (max2 < fabs(q1_0_p0_0)) )
252 max2 = fabs(q1_0_p0_0);
254 if( (max2 < fabs(q1_1_p0_1)) )
256 max2 = fabs(q1_1_p0_1);
258 if( (max2 < fabs(q1_2_p0_2)) )
260 max2 = fabs(q1_2_p0_2);
262 if( (max2 < fabs(q1_3_p0_3)) )
264 max2 = fabs(q1_3_p0_3);
266 double lower_bound_1;
267 double upper_bound_1;
270 lower_bound_1 = max1;
271 upper_bound_1 = max1;
272 if( (max2 < lower_bound_1) )
274 lower_bound_1 = max2;
278 if( (max2 > upper_bound_1) )
280 upper_bound_1 = max2;
283 if( (lower_bound_1 < 1.85816790703293534018e-147) )
285 return FPG_UNCERTAIN_VALUE;
289 if( (upper_bound_1 > 1.87072209578355531992e+50) )
291 return FPG_UNCERTAIN_VALUE;
293 eps = (6.44428177279185717888e-15 * (max1 * max2));
306 return FPG_UNCERTAIN_VALUE;
310 Delta_sign = int_tmp_result;
317 if( (max4 < fabs(p2_0_p0_0)) )
319 max4 = fabs(p2_0_p0_0);
321 if( (max4 < fabs(p2_2_p0_2)) )
323 max4 = fabs(p2_2_p0_2);
325 if( (max4 < fabs(p2_1_p0_1)) )
327 max4 = fabs(p2_1_p0_1);
329 if( (max4 < fabs(p2_3_p0_3)) )
331 max4 = fabs(p2_3_p0_3);
338 int int_tmp_result_FFWKCAA;
339 lower_bound_1 = max3;
340 upper_bound_1 = max3;
341 if( (max1 < lower_bound_1) )
343 lower_bound_1 = max1;
345 if( (max4 < lower_bound_1) )
347 lower_bound_1 = max4;
349 if( (lower_bound_1 < 1.89528395402941802921e-74) )
351 return FPG_UNCERTAIN_VALUE;
355 if( (upper_bound_1 > 1.87072209578355531992e+50) )
357 return FPG_UNCERTAIN_VALUE;
359 eps = (1.72443682410932010423e-13 * (((max1 * max4) * max4) * max3));
362 int_tmp_result_FFWKCAA = 1;
368 int_tmp_result_FFWKCAA = -1;
372 return FPG_UNCERTAIN_VALUE;
376 r_sign = int_tmp_result_FFWKCAA;
377 return (Delta_sign * r_sign);
381inline 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]);
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]);
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]);
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]);
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)));
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)));
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)));
421 DeltaLambda0 = (a11 - l1);
423 DeltaLambda1 = (l1 - a10);
425 r = (((Delta * l2) - (a20 * DeltaLambda0)) - (a21 * DeltaLambda1));
427 double max1 = fabs(p1_1_p0_1);
428 if( (max1 < fabs(p1_2_p0_2)) )
430 max1 = fabs(p1_2_p0_2);
432 if( (max1 < fabs(p1_3_p0_3)) )
434 max1 = fabs(p1_3_p0_3);
436 if( (max1 < fabs(p1_0_p0_0)) )
438 max1 = fabs(p1_0_p0_0);
440 if( (max1 < fabs(p1_4_p0_4)) )
442 max1 = fabs(p1_4_p0_4);
444 if( (max1 < fabs(p1_5_p0_5)) )
446 max1 = fabs(p1_5_p0_5);
448 double max2 = fabs(q0_0_p0_0);
449 if( (max2 < fabs(q0_1_p0_1)) )
451 max2 = fabs(q0_1_p0_1);
453 if( (max2 < fabs(q0_2_p0_2)) )
455 max2 = fabs(q0_2_p0_2);
457 if( (max2 < fabs(q0_3_p0_3)) )
459 max2 = fabs(q0_3_p0_3);
461 if( (max2 < fabs(q0_4_p0_4)) )
463 max2 = fabs(q0_4_p0_4);
465 if( (max2 < fabs(q0_5_p0_5)) )
467 max2 = fabs(q0_5_p0_5);
469 if( (max2 < fabs(q1_0_p0_0)) )
471 max2 = fabs(q1_0_p0_0);
473 if( (max2 < fabs(q1_1_p0_1)) )
475 max2 = fabs(q1_1_p0_1);
477 if( (max2 < fabs(q1_2_p0_2)) )
479 max2 = fabs(q1_2_p0_2);
481 if( (max2 < fabs(q1_3_p0_3)) )
483 max2 = fabs(q1_3_p0_3);
485 if( (max2 < fabs(q1_4_p0_4)) )
487 max2 = fabs(q1_4_p0_4);
489 if( (max2 < fabs(q1_5_p0_5)) )
491 max2 = fabs(q1_5_p0_5);
493 double lower_bound_1;
494 double upper_bound_1;
497 lower_bound_1 = max1;
498 upper_bound_1 = max1;
499 if( (max2 < lower_bound_1) )
501 lower_bound_1 = max2;
505 if( (max2 > upper_bound_1) )
507 upper_bound_1 = max2;
510 if( (lower_bound_1 < 1.41511993781011659868e-147) )
512 return FPG_UNCERTAIN_VALUE;
516 if( (upper_bound_1 > 1.87072209578355531992e+50) )
518 return FPG_UNCERTAIN_VALUE;
520 eps = (1.11111223981318615596e-14 * (max1 * max2));
533 return FPG_UNCERTAIN_VALUE;
537 Delta_sign = int_tmp_result;
544 if( (max4 < fabs(p2_2_p0_2)) )
546 max4 = fabs(p2_2_p0_2);
548 if( (max4 < fabs(p2_4_p0_4)) )
550 max4 = fabs(p2_4_p0_4);
552 if( (max4 < fabs(p2_3_p0_3)) )
554 max4 = fabs(p2_3_p0_3);
556 if( (max4 < fabs(p2_0_p0_0)) )
558 max4 = fabs(p2_0_p0_0);
560 if( (max4 < fabs(p2_1_p0_1)) )
562 max4 = fabs(p2_1_p0_1);
564 if( (max4 < fabs(p2_5_p0_5)) )
566 max4 = fabs(p2_5_p0_5);
573 int int_tmp_result_FFWKCAA;
574 lower_bound_1 = max1;
575 upper_bound_1 = max1;
576 if( (max3 < lower_bound_1) )
578 lower_bound_1 = max3;
582 if( (max3 > upper_bound_1) )
584 upper_bound_1 = max3;
587 if( (max4 < lower_bound_1) )
589 lower_bound_1 = max4;
591 if( (lower_bound_1 < 1.49958502193059513986e-74) )
593 return FPG_UNCERTAIN_VALUE;
597 if( (upper_bound_1 > 1.87072209578355531992e+50) )
599 return FPG_UNCERTAIN_VALUE;
601 eps = (4.40007476026584016994e-13 * (((max1 * max4) * max4) * max3));
604 int_tmp_result_FFWKCAA = 1;
610 int_tmp_result_FFWKCAA = -1;
614 return FPG_UNCERTAIN_VALUE;
618 r_sign = int_tmp_result_FFWKCAA;
619 return (Delta_sign * r_sign);
623inline 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]);
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]);
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]);
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]);
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)));
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)));
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)));
667 DeltaLambda0 = (a11 - l1);
669 DeltaLambda1 = (l1 - a10);
671 r = (((Delta * l2) - (a20 * DeltaLambda0)) - (a21 * DeltaLambda1));
673 double max1 = fabs(p1_2_p0_2);
674 if( (max1 < fabs(p1_1_p0_1)) )
676 max1 = fabs(p1_1_p0_1);
678 if( (max1 < fabs(p1_0_p0_0)) )
680 max1 = fabs(p1_0_p0_0);
682 if( (max1 < fabs(p1_4_p0_4)) )
684 max1 = fabs(p1_4_p0_4);
686 if( (max1 < fabs(p1_3_p0_3)) )
688 max1 = fabs(p1_3_p0_3);
690 if( (max1 < fabs(p1_5_p0_5)) )
692 max1 = fabs(p1_5_p0_5);
694 if( (max1 < fabs(p1_6_p0_6)) )
696 max1 = fabs(p1_6_p0_6);
698 double max2 = fabs(q0_0_p0_0);
699 if( (max2 < fabs(q0_1_p0_1)) )
701 max2 = fabs(q0_1_p0_1);
703 if( (max2 < fabs(q0_2_p0_2)) )
705 max2 = fabs(q0_2_p0_2);
707 if( (max2 < fabs(q0_3_p0_3)) )
709 max2 = fabs(q0_3_p0_3);
711 if( (max2 < fabs(q0_4_p0_4)) )
713 max2 = fabs(q0_4_p0_4);
715 if( (max2 < fabs(q0_5_p0_5)) )
717 max2 = fabs(q0_5_p0_5);
719 if( (max2 < fabs(q0_6_p0_6)) )
721 max2 = fabs(q0_6_p0_6);
723 if( (max2 < fabs(q1_0_p0_0)) )
725 max2 = fabs(q1_0_p0_0);
727 if( (max2 < fabs(q1_1_p0_1)) )
729 max2 = fabs(q1_1_p0_1);
731 if( (max2 < fabs(q1_2_p0_2)) )
733 max2 = fabs(q1_2_p0_2);
735 if( (max2 < fabs(q1_3_p0_3)) )
737 max2 = fabs(q1_3_p0_3);
739 if( (max2 < fabs(q1_4_p0_4)) )
741 max2 = fabs(q1_4_p0_4);
743 if( (max2 < fabs(q1_5_p0_5)) )
745 max2 = fabs(q1_5_p0_5);
747 if( (max2 < fabs(q1_6_p0_6)) )
749 max2 = fabs(q1_6_p0_6);
751 double lower_bound_1;
752 double upper_bound_1;
755 lower_bound_1 = max1;
756 upper_bound_1 = max1;
757 if( (max2 < lower_bound_1) )
759 lower_bound_1 = max2;
763 if( (max2 > upper_bound_1) )
765 upper_bound_1 = max2;
768 if( (lower_bound_1 < 1.27080861580266953580e-147) )
770 return FPG_UNCERTAIN_VALUE;
774 if( (upper_bound_1 > 1.87072209578355531992e+50) )
776 return FPG_UNCERTAIN_VALUE;
778 eps = (1.37779349582504943796e-14 * (max1 * max2));
791 return FPG_UNCERTAIN_VALUE;
795 Delta_sign = int_tmp_result;
802 if( (max4 < fabs(p2_0_p0_0)) )
804 max4 = fabs(p2_0_p0_0);
806 if( (max4 < fabs(p2_1_p0_1)) )
808 max4 = fabs(p2_1_p0_1);
810 if( (max4 < fabs(p2_2_p0_2)) )
812 max4 = fabs(p2_2_p0_2);
814 if( (max4 < fabs(p2_3_p0_3)) )
816 max4 = fabs(p2_3_p0_3);
818 if( (max4 < fabs(p2_4_p0_4)) )
820 max4 = fabs(p2_4_p0_4);
822 if( (max4 < fabs(p2_5_p0_5)) )
824 max4 = fabs(p2_5_p0_5);
826 if( (max4 < fabs(p2_6_p0_6)) )
828 max4 = fabs(p2_6_p0_6);
835 int int_tmp_result_FFWKCAA;
836 lower_bound_1 = max1;
837 upper_bound_1 = max1;
838 if( (max3 < lower_bound_1) )
840 lower_bound_1 = max3;
844 if( (max3 > upper_bound_1) )
846 upper_bound_1 = max3;
849 if( (max4 < lower_bound_1) )
851 lower_bound_1 = max4;
853 if( (lower_bound_1 < 1.36918881183883509035e-74) )
855 return FPG_UNCERTAIN_VALUE;
859 if( (upper_bound_1 > 1.87072209578355531992e+50) )
861 return FPG_UNCERTAIN_VALUE;
863 eps = (6.33127335329798996022e-13 * (((max1 * max4) * max4) * max3));
866 int_tmp_result_FFWKCAA = 1;
872 int_tmp_result_FFWKCAA = -1;
876 return FPG_UNCERTAIN_VALUE;
880 r_sign = int_tmp_result_FFWKCAA;
881 return (Delta_sign * r_sign);
885inline 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]);
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]);
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]);
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]);
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)));
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)));
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)));
933 DeltaLambda0 = (a11 - l1);
935 DeltaLambda1 = (l1 - a10);
937 r = (((Delta * l2) - (a20 * DeltaLambda0)) - (a21 * DeltaLambda1));
939 double max1 = fabs(p1_4_p0_4);
940 if( (max1 < fabs(p1_3_p0_3)) )
942 max1 = fabs(p1_3_p0_3);
944 if( (max1 < fabs(p1_7_p0_7)) )
946 max1 = fabs(p1_7_p0_7);
948 if( (max1 < fabs(p1_0_p0_0)) )
950 max1 = fabs(p1_0_p0_0);
952 if( (max1 < fabs(p1_6_p0_6)) )
954 max1 = fabs(p1_6_p0_6);
956 if( (max1 < fabs(p1_2_p0_2)) )
958 max1 = fabs(p1_2_p0_2);
960 if( (max1 < fabs(p1_1_p0_1)) )
962 max1 = fabs(p1_1_p0_1);
964 if( (max1 < fabs(p1_5_p0_5)) )
966 max1 = fabs(p1_5_p0_5);
968 double max2 = fabs(q0_0_p0_0);
969 if( (max2 < fabs(q0_1_p0_1)) )
971 max2 = fabs(q0_1_p0_1);
973 if( (max2 < fabs(q0_2_p0_2)) )
975 max2 = fabs(q0_2_p0_2);
977 if( (max2 < fabs(q0_3_p0_3)) )
979 max2 = fabs(q0_3_p0_3);
981 if( (max2 < fabs(q0_4_p0_4)) )
983 max2 = fabs(q0_4_p0_4);
985 if( (max2 < fabs(q0_5_p0_5)) )
987 max2 = fabs(q0_5_p0_5);
989 if( (max2 < fabs(q0_6_p0_6)) )
991 max2 = fabs(q0_6_p0_6);
993 if( (max2 < fabs(q0_7_p0_7)) )
995 max2 = fabs(q0_7_p0_7);
997 if( (max2 < fabs(q1_0_p0_0)) )
999 max2 = fabs(q1_0_p0_0);
1001 if( (max2 < fabs(q1_1_p0_1)) )
1003 max2 = fabs(q1_1_p0_1);
1005 if( (max2 < fabs(q1_2_p0_2)) )
1007 max2 = fabs(q1_2_p0_2);
1009 if( (max2 < fabs(q1_3_p0_3)) )
1011 max2 = fabs(q1_3_p0_3);
1013 if( (max2 < fabs(q1_4_p0_4)) )
1015 max2 = fabs(q1_4_p0_4);
1017 if( (max2 < fabs(q1_5_p0_5)) )
1019 max2 = fabs(q1_5_p0_5);
1021 if( (max2 < fabs(q1_6_p0_6)) )
1023 max2 = fabs(q1_6_p0_6);
1025 if( (max2 < fabs(q1_7_p0_7)) )
1027 max2 = fabs(q1_7_p0_7);
1029 double lower_bound_1;
1030 double upper_bound_1;
1033 lower_bound_1 = max2;
1034 upper_bound_1 = max2;
1035 if( (max1 < lower_bound_1) )
1037 lower_bound_1 = max1;
1041 if( (max1 > upper_bound_1) )
1043 upper_bound_1 = max1;
1046 if( (lower_bound_1 < 1.15542931091530087067e-147) )
1048 return FPG_UNCERTAIN_VALUE;
1052 if( (upper_bound_1 > 1.87072209578355531992e+50) )
1054 return FPG_UNCERTAIN_VALUE;
1056 eps = (1.66670090166682227006e-14 * (max1 * max2));
1063 if( (Delta < -eps) )
1065 int_tmp_result = -1;
1069 return FPG_UNCERTAIN_VALUE;
1073 Delta_sign = int_tmp_result;
1080 if( (max4 < fabs(p2_4_p0_4)) )
1082 max4 = fabs(p2_4_p0_4);
1084 if( (max4 < fabs(p2_2_p0_2)) )
1086 max4 = fabs(p2_2_p0_2);
1088 if( (max4 < fabs(p2_0_p0_0)) )
1090 max4 = fabs(p2_0_p0_0);
1092 if( (max4 < fabs(p2_1_p0_1)) )
1094 max4 = fabs(p2_1_p0_1);
1096 if( (max4 < fabs(p2_3_p0_3)) )
1098 max4 = fabs(p2_3_p0_3);
1100 if( (max4 < fabs(p2_5_p0_5)) )
1102 max4 = fabs(p2_5_p0_5);
1104 if( (max4 < fabs(p2_6_p0_6)) )
1106 max4 = fabs(p2_6_p0_6);
1108 if( (max4 < fabs(p2_7_p0_7)) )
1110 max4 = fabs(p2_7_p0_7);
1117 int int_tmp_result_FFWKCAA;
1118 lower_bound_1 = max1;
1119 upper_bound_1 = max1;
1120 if( (max3 < lower_bound_1) )
1122 lower_bound_1 = max3;
1126 if( (max3 > upper_bound_1) )
1128 upper_bound_1 = max3;
1131 if( (max4 < lower_bound_1) )
1133 lower_bound_1 = max4;
1135 if( (lower_bound_1 < 1.26419510663115923609e-74) )
1137 return FPG_UNCERTAIN_VALUE;
1141 if( (upper_bound_1 > 1.87072209578355531992e+50) )
1143 return FPG_UNCERTAIN_VALUE;
1145 eps = (8.71140112255785451890e-13 * (((max1 * max4) * max4) * max3));
1148 int_tmp_result_FFWKCAA = 1;
1154 int_tmp_result_FFWKCAA = -1;
1158 return FPG_UNCERTAIN_VALUE;
1162 r_sign = int_tmp_result_FFWKCAA;
1163 return (Delta_sign * r_sign);