4inline int side3_2d_filter(
const double* p0,
const double* p1,
const double* p2,
const double* p3,
const double* q0,
const double* q1,
const double* q2) {
5 double p1_0_p0_0 = (p1[0] - p0[0]);
6 double p1_1_p0_1 = (p1[1] - p0[1]);
8 l1 = (1 * ((p1_0_p0_0 * p1_0_p0_0) + (p1_1_p0_1 * p1_1_p0_1)));
9 double p2_0_p0_0 = (p2[0] - p0[0]);
10 double p2_1_p0_1 = (p2[1] - p0[1]);
12 l2 = (1 * ((p2_0_p0_0 * p2_0_p0_0) + (p2_1_p0_1 * p2_1_p0_1)));
13 double p3_0_p0_0 = (p3[0] - p0[0]);
14 double p3_1_p0_1 = (p3[1] - p0[1]);
16 l3 = (1 * ((p3_0_p0_0 * p3_0_p0_0) + (p3_1_p0_1 * p3_1_p0_1)));
17 double q0_0_p0_0 = (q0[0] - p0[0]);
18 double q0_1_p0_1 = (q0[1] - p0[1]);
20 a10 = (2 * ((p1_0_p0_0 * q0_0_p0_0) + (p1_1_p0_1 * q0_1_p0_1)));
21 double q1_0_p0_0 = (q1[0] - p0[0]);
22 double q1_1_p0_1 = (q1[1] - p0[1]);
24 a11 = (2 * ((p1_0_p0_0 * q1_0_p0_0) + (p1_1_p0_1 * q1_1_p0_1)));
25 double q2_0_p0_0 = (q2[0] - p0[0]);
26 double q2_1_p0_1 = (q2[1] - p0[1]);
28 a12 = (2 * ((p1_0_p0_0 * q2_0_p0_0) + (p1_1_p0_1 * q2_1_p0_1)));
30 a20 = (2 * ((p2_0_p0_0 * q0_0_p0_0) + (p2_1_p0_1 * q0_1_p0_1)));
32 a21 = (2 * ((p2_0_p0_0 * q1_0_p0_0) + (p2_1_p0_1 * q1_1_p0_1)));
34 a22 = (2 * ((p2_0_p0_0 * q2_0_p0_0) + (p2_1_p0_1 * q2_1_p0_1)));
36 a30 = (2 * ((p3_0_p0_0 * q0_0_p0_0) + (p3_1_p0_1 * q0_1_p0_1)));
38 a31 = (2 * ((p3_0_p0_0 * q1_0_p0_0) + (p3_1_p0_1 * q1_1_p0_1)));
40 a32 = (2 * ((p3_0_p0_0 * q2_0_p0_0) + (p3_1_p0_1 * q2_1_p0_1)));
42 b00 = ((a11 * a22) - (a12 * a21));
48 b10 = ((a12 * a20) - (a10 * a22));
54 b20 = ((a10 * a21) - (a11 * a20));
60 Delta = ((b00 + b10) + b20);
62 DeltaLambda0 = (((b01 * l1) + (b02 * l2)) + b00);
64 DeltaLambda1 = (((b11 * l1) + (b12 * l2)) + b10);
66 DeltaLambda2 = (((b21 * l1) + (b22 * l2)) + b20);
68 r = ((Delta * l3) - (((a30 * DeltaLambda0) + (a31 * DeltaLambda1)) + (a32 * DeltaLambda2)));
70 double max1 = fabs(p2_0_p0_0);
71 if( (max1 < fabs(p2_1_p0_1)) )
73 max1 = fabs(p2_1_p0_1);
75 double max2 = fabs(q0_0_p0_0);
76 if( (max2 < fabs(q0_1_p0_1)) )
78 max2 = fabs(q0_1_p0_1);
80 if( (max2 < fabs(q1_0_p0_0)) )
82 max2 = fabs(q1_0_p0_0);
84 if( (max2 < fabs(q1_1_p0_1)) )
86 max2 = fabs(q1_1_p0_1);
88 if( (max2 < fabs(q2_0_p0_0)) )
90 max2 = fabs(q2_0_p0_0);
92 if( (max2 < fabs(q2_1_p0_1)) )
94 max2 = fabs(q2_1_p0_1);
96 double max3 = fabs(p1_0_p0_0);
97 if( (max3 < fabs(p1_1_p0_1)) )
99 max3 = fabs(p1_1_p0_1);
101 double lower_bound_1;
102 double upper_bound_1;
105 lower_bound_1 = max2;
106 upper_bound_1 = max2;
107 if( (max1 < lower_bound_1) )
109 lower_bound_1 = max1;
113 if( (max1 > upper_bound_1) )
115 upper_bound_1 = max1;
118 if( (max3 < lower_bound_1) )
120 lower_bound_1 = max3;
124 if( (max3 > upper_bound_1) )
126 upper_bound_1 = max3;
129 if( (lower_bound_1 < 2.79532528033945620759e-74) )
131 return FPG_UNCERTAIN_VALUE;
135 if( (upper_bound_1 > 2.59614842926741294957e+33) )
137 return FPG_UNCERTAIN_VALUE;
139 eps = (3.64430756537603111258e-14 * (((max3 * max2) * max1) * max2));
152 return FPG_UNCERTAIN_VALUE;
156 Delta_sign = int_tmp_result;
181 if( (max7 < fabs(p3_1_p0_1)) )
183 max7 = fabs(p3_1_p0_1);
185 if( (max7 < fabs(p3_0_p0_0)) )
187 max7 = fabs(p3_0_p0_0);
206 int int_tmp_result_FFWKCAA;
207 lower_bound_1 = max2;
208 upper_bound_1 = max2;
209 if( (max1 < lower_bound_1) )
211 lower_bound_1 = max1;
213 if( (max4 < lower_bound_1) )
215 lower_bound_1 = max4;
219 if( (max4 > upper_bound_1) )
221 upper_bound_1 = max4;
224 if( (max5 < lower_bound_1) )
226 lower_bound_1 = max5;
228 if( (max6 < lower_bound_1) )
230 lower_bound_1 = max6;
232 if( (max7 < lower_bound_1) )
234 lower_bound_1 = max7;
236 if( (lower_bound_1 < 6.01986729486167248087e-50) )
238 return FPG_UNCERTAIN_VALUE;
242 if( (upper_bound_1 > 2.59614842926741294957e+33) )
244 return FPG_UNCERTAIN_VALUE;
246 eps = (4.67544471613800658534e-13 * (((((max7 * max2) * max1) * max6) * max5) * max4));
249 int_tmp_result_FFWKCAA = 1;
255 int_tmp_result_FFWKCAA = -1;
259 return FPG_UNCERTAIN_VALUE;
263 r_sign = int_tmp_result_FFWKCAA;
264 return (Delta_sign * r_sign);
268inline int side3_3d_filter(
const double* p0,
const double* p1,
const double* p2,
const double* p3,
const double* q0,
const double* q1,
const double* q2) {
269 double p1_0_p0_0 = (p1[0] - p0[0]);
270 double p1_1_p0_1 = (p1[1] - p0[1]);
271 double p1_2_p0_2 = (p1[2] - p0[2]);
273 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)));
274 double p2_0_p0_0 = (p2[0] - p0[0]);
275 double p2_1_p0_1 = (p2[1] - p0[1]);
276 double p2_2_p0_2 = (p2[2] - p0[2]);
278 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)));
279 double p3_0_p0_0 = (p3[0] - p0[0]);
280 double p3_1_p0_1 = (p3[1] - p0[1]);
281 double p3_2_p0_2 = (p3[2] - p0[2]);
283 l3 = (1 * (((p3_0_p0_0 * p3_0_p0_0) + (p3_1_p0_1 * p3_1_p0_1)) + (p3_2_p0_2 * p3_2_p0_2)));
284 double q0_0_p0_0 = (q0[0] - p0[0]);
285 double q0_1_p0_1 = (q0[1] - p0[1]);
286 double q0_2_p0_2 = (q0[2] - p0[2]);
288 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)));
289 double q1_0_p0_0 = (q1[0] - p0[0]);
290 double q1_1_p0_1 = (q1[1] - p0[1]);
291 double q1_2_p0_2 = (q1[2] - p0[2]);
293 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)));
294 double q2_0_p0_0 = (q2[0] - p0[0]);
295 double q2_1_p0_1 = (q2[1] - p0[1]);
296 double q2_2_p0_2 = (q2[2] - p0[2]);
298 a12 = (2 * (((p1_0_p0_0 * q2_0_p0_0) + (p1_1_p0_1 * q2_1_p0_1)) + (p1_2_p0_2 * q2_2_p0_2)));
300 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)));
302 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)));
304 a22 = (2 * (((p2_0_p0_0 * q2_0_p0_0) + (p2_1_p0_1 * q2_1_p0_1)) + (p2_2_p0_2 * q2_2_p0_2)));
306 a30 = (2 * (((p3_0_p0_0 * q0_0_p0_0) + (p3_1_p0_1 * q0_1_p0_1)) + (p3_2_p0_2 * q0_2_p0_2)));
308 a31 = (2 * (((p3_0_p0_0 * q1_0_p0_0) + (p3_1_p0_1 * q1_1_p0_1)) + (p3_2_p0_2 * q1_2_p0_2)));
310 a32 = (2 * (((p3_0_p0_0 * q2_0_p0_0) + (p3_1_p0_1 * q2_1_p0_1)) + (p3_2_p0_2 * q2_2_p0_2)));
312 b00 = ((a11 * a22) - (a12 * a21));
318 b10 = ((a12 * a20) - (a10 * a22));
324 b20 = ((a10 * a21) - (a11 * a20));
330 Delta = ((b00 + b10) + b20);
332 DeltaLambda0 = (((b01 * l1) + (b02 * l2)) + b00);
334 DeltaLambda1 = (((b11 * l1) + (b12 * l2)) + b10);
336 DeltaLambda2 = (((b21 * l1) + (b22 * l2)) + b20);
338 r = ((Delta * l3) - (((a30 * DeltaLambda0) + (a31 * DeltaLambda1)) + (a32 * DeltaLambda2)));
340 double max1 = fabs(p1_1_p0_1);
341 if( (max1 < fabs(p1_2_p0_2)) )
343 max1 = fabs(p1_2_p0_2);
345 if( (max1 < fabs(p1_0_p0_0)) )
347 max1 = fabs(p1_0_p0_0);
349 double max2 = fabs(q0_2_p0_2);
350 if( (max2 < fabs(q0_0_p0_0)) )
352 max2 = fabs(q0_0_p0_0);
354 if( (max2 < fabs(q0_1_p0_1)) )
356 max2 = fabs(q0_1_p0_1);
358 if( (max2 < fabs(q1_0_p0_0)) )
360 max2 = fabs(q1_0_p0_0);
362 if( (max2 < fabs(q1_1_p0_1)) )
364 max2 = fabs(q1_1_p0_1);
366 if( (max2 < fabs(q1_2_p0_2)) )
368 max2 = fabs(q1_2_p0_2);
370 if( (max2 < fabs(q2_0_p0_0)) )
372 max2 = fabs(q2_0_p0_0);
374 if( (max2 < fabs(q2_1_p0_1)) )
376 max2 = fabs(q2_1_p0_1);
378 if( (max2 < fabs(q2_2_p0_2)) )
380 max2 = fabs(q2_2_p0_2);
382 double max3 = fabs(p2_2_p0_2);
383 if( (max3 < fabs(p2_0_p0_0)) )
385 max3 = fabs(p2_0_p0_0);
387 if( (max3 < fabs(p2_1_p0_1)) )
389 max3 = fabs(p2_1_p0_1);
391 double lower_bound_1;
392 double upper_bound_1;
395 lower_bound_1 = max1;
396 upper_bound_1 = max1;
397 if( (max2 < lower_bound_1) )
399 lower_bound_1 = max2;
403 if( (max2 > upper_bound_1) )
405 upper_bound_1 = max2;
408 if( (max3 < lower_bound_1) )
410 lower_bound_1 = max3;
414 if( (max3 > upper_bound_1) )
416 upper_bound_1 = max3;
419 if( (lower_bound_1 < 2.22985945097100191780e-74) )
421 return FPG_UNCERTAIN_VALUE;
425 if( (upper_bound_1 > 2.59614842926741294957e+33) )
427 return FPG_UNCERTAIN_VALUE;
429 eps = (8.99983341597279045654e-14 * (((max1 * max2) * max3) * max2));
442 return FPG_UNCERTAIN_VALUE;
446 Delta_sign = int_tmp_result;
462 if( (max6 < fabs(p3_0_p0_0)) )
464 max6 = fabs(p3_0_p0_0);
466 if( (max6 < fabs(p3_1_p0_1)) )
468 max6 = fabs(p3_1_p0_1);
470 if( (max6 < fabs(p3_2_p0_2)) )
472 max6 = fabs(p3_2_p0_2);
500 int int_tmp_result_FFWKCAA;
501 lower_bound_1 = max2;
502 upper_bound_1 = max2;
503 if( (max3 < lower_bound_1) )
505 lower_bound_1 = max3;
507 if( (max4 < lower_bound_1) )
509 lower_bound_1 = max4;
513 if( (max4 > upper_bound_1) )
515 upper_bound_1 = max4;
518 if( (max5 < lower_bound_1) )
520 lower_bound_1 = max5;
522 if( (max6 < lower_bound_1) )
524 lower_bound_1 = max6;
526 if( (max7 < lower_bound_1) )
528 lower_bound_1 = max7;
530 if( (lower_bound_1 < 4.84416636653081796592e-50) )
532 return FPG_UNCERTAIN_VALUE;
536 if( (upper_bound_1 > 2.59614842926741294957e+33) )
538 return FPG_UNCERTAIN_VALUE;
540 eps = (1.72198804259438718181e-12 * (((((max6 * max2) * max3) * max7) * max5) * max4));
543 int_tmp_result_FFWKCAA = 1;
549 int_tmp_result_FFWKCAA = -1;
553 return FPG_UNCERTAIN_VALUE;
557 r_sign = int_tmp_result_FFWKCAA;
558 return (Delta_sign * r_sign);
562inline int side3_4d_filter(
const double* p0,
const double* p1,
const double* p2,
const double* p3,
const double* q0,
const double* q1,
const double* q2) {
563 double p1_0_p0_0 = (p1[0] - p0[0]);
564 double p1_1_p0_1 = (p1[1] - p0[1]);
565 double p1_2_p0_2 = (p1[2] - p0[2]);
566 double p1_3_p0_3 = (p1[3] - p0[3]);
568 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)));
569 double p2_0_p0_0 = (p2[0] - p0[0]);
570 double p2_1_p0_1 = (p2[1] - p0[1]);
571 double p2_2_p0_2 = (p2[2] - p0[2]);
572 double p2_3_p0_3 = (p2[3] - p0[3]);
574 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)));
575 double p3_0_p0_0 = (p3[0] - p0[0]);
576 double p3_1_p0_1 = (p3[1] - p0[1]);
577 double p3_2_p0_2 = (p3[2] - p0[2]);
578 double p3_3_p0_3 = (p3[3] - p0[3]);
580 l3 = (1 * ((((p3_0_p0_0 * p3_0_p0_0) + (p3_1_p0_1 * p3_1_p0_1)) + (p3_2_p0_2 * p3_2_p0_2)) + (p3_3_p0_3 * p3_3_p0_3)));
581 double q0_0_p0_0 = (q0[0] - p0[0]);
582 double q0_1_p0_1 = (q0[1] - p0[1]);
583 double q0_2_p0_2 = (q0[2] - p0[2]);
584 double q0_3_p0_3 = (q0[3] - p0[3]);
586 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)));
587 double q1_0_p0_0 = (q1[0] - p0[0]);
588 double q1_1_p0_1 = (q1[1] - p0[1]);
589 double q1_2_p0_2 = (q1[2] - p0[2]);
590 double q1_3_p0_3 = (q1[3] - p0[3]);
592 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)));
593 double q2_0_p0_0 = (q2[0] - p0[0]);
594 double q2_1_p0_1 = (q2[1] - p0[1]);
595 double q2_2_p0_2 = (q2[2] - p0[2]);
596 double q2_3_p0_3 = (q2[3] - p0[3]);
598 a12 = (2 * ((((p1_0_p0_0 * q2_0_p0_0) + (p1_1_p0_1 * q2_1_p0_1)) + (p1_2_p0_2 * q2_2_p0_2)) + (p1_3_p0_3 * q2_3_p0_3)));
600 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)));
602 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)));
604 a22 = (2 * ((((p2_0_p0_0 * q2_0_p0_0) + (p2_1_p0_1 * q2_1_p0_1)) + (p2_2_p0_2 * q2_2_p0_2)) + (p2_3_p0_3 * q2_3_p0_3)));
606 a30 = (2 * ((((p3_0_p0_0 * q0_0_p0_0) + (p3_1_p0_1 * q0_1_p0_1)) + (p3_2_p0_2 * q0_2_p0_2)) + (p3_3_p0_3 * q0_3_p0_3)));
608 a31 = (2 * ((((p3_0_p0_0 * q1_0_p0_0) + (p3_1_p0_1 * q1_1_p0_1)) + (p3_2_p0_2 * q1_2_p0_2)) + (p3_3_p0_3 * q1_3_p0_3)));
610 a32 = (2 * ((((p3_0_p0_0 * q2_0_p0_0) + (p3_1_p0_1 * q2_1_p0_1)) + (p3_2_p0_2 * q2_2_p0_2)) + (p3_3_p0_3 * q2_3_p0_3)));
612 b00 = ((a11 * a22) - (a12 * a21));
618 b10 = ((a12 * a20) - (a10 * a22));
624 b20 = ((a10 * a21) - (a11 * a20));
630 Delta = ((b00 + b10) + b20);
632 DeltaLambda0 = (((b01 * l1) + (b02 * l2)) + b00);
634 DeltaLambda1 = (((b11 * l1) + (b12 * l2)) + b10);
636 DeltaLambda2 = (((b21 * l1) + (b22 * l2)) + b20);
638 r = ((Delta * l3) - (((a30 * DeltaLambda0) + (a31 * DeltaLambda1)) + (a32 * DeltaLambda2)));
640 double max1 = fabs(p1_3_p0_3);
641 if( (max1 < fabs(p1_1_p0_1)) )
643 max1 = fabs(p1_1_p0_1);
645 if( (max1 < fabs(p1_2_p0_2)) )
647 max1 = fabs(p1_2_p0_2);
649 if( (max1 < fabs(p1_0_p0_0)) )
651 max1 = fabs(p1_0_p0_0);
653 double max2 = fabs(p2_3_p0_3);
654 if( (max2 < fabs(p2_2_p0_2)) )
656 max2 = fabs(p2_2_p0_2);
658 if( (max2 < fabs(p2_0_p0_0)) )
660 max2 = fabs(p2_0_p0_0);
662 if( (max2 < fabs(p2_1_p0_1)) )
664 max2 = fabs(p2_1_p0_1);
666 double max3 = fabs(q0_1_p0_1);
667 if( (max3 < fabs(q0_0_p0_0)) )
669 max3 = fabs(q0_0_p0_0);
671 if( (max3 < fabs(q0_2_p0_2)) )
673 max3 = fabs(q0_2_p0_2);
675 if( (max3 < fabs(q0_3_p0_3)) )
677 max3 = fabs(q0_3_p0_3);
679 if( (max3 < fabs(q1_0_p0_0)) )
681 max3 = fabs(q1_0_p0_0);
683 if( (max3 < fabs(q1_1_p0_1)) )
685 max3 = fabs(q1_1_p0_1);
687 if( (max3 < fabs(q1_2_p0_2)) )
689 max3 = fabs(q1_2_p0_2);
691 if( (max3 < fabs(q1_3_p0_3)) )
693 max3 = fabs(q1_3_p0_3);
695 if( (max3 < fabs(q2_0_p0_0)) )
697 max3 = fabs(q2_0_p0_0);
699 if( (max3 < fabs(q2_1_p0_1)) )
701 max3 = fabs(q2_1_p0_1);
703 if( (max3 < fabs(q2_2_p0_2)) )
705 max3 = fabs(q2_2_p0_2);
707 if( (max3 < fabs(q2_3_p0_3)) )
709 max3 = fabs(q2_3_p0_3);
711 double lower_bound_1;
712 double upper_bound_1;
715 lower_bound_1 = max1;
716 upper_bound_1 = max1;
717 if( (max2 < lower_bound_1) )
719 lower_bound_1 = max2;
723 if( (max2 > upper_bound_1) )
725 upper_bound_1 = max2;
728 if( (max3 < lower_bound_1) )
730 lower_bound_1 = max3;
734 if( (max3 > upper_bound_1) )
736 upper_bound_1 = max3;
739 if( (lower_bound_1 < 1.89528395402941802921e-74) )
741 return FPG_UNCERTAIN_VALUE;
745 if( (upper_bound_1 > 1.29807421463370647479e+33) )
747 return FPG_UNCERTAIN_VALUE;
749 eps = (1.72443682410931985179e-13 * (((max1 * max3) * max2) * max3));
762 return FPG_UNCERTAIN_VALUE;
766 Delta_sign = int_tmp_result;
770 if( (max6 < fabs(p3_0_p0_0)) )
772 max6 = fabs(p3_0_p0_0);
774 if( (max6 < fabs(p3_3_p0_3)) )
776 max6 = fabs(p3_3_p0_3);
778 if( (max6 < fabs(p3_2_p0_2)) )
780 max6 = fabs(p3_2_p0_2);
782 if( (max6 < fabs(p3_1_p0_1)) )
784 max6 = fabs(p3_1_p0_1);
824 int int_tmp_result_FFWKCAA;
825 lower_bound_1 = max5;
826 upper_bound_1 = max5;
827 if( (max6 < lower_bound_1) )
829 lower_bound_1 = max6;
831 if( (max2 < lower_bound_1) )
833 lower_bound_1 = max2;
835 if( (max3 < lower_bound_1) )
837 lower_bound_1 = max3;
839 if( (max4 < lower_bound_1) )
841 lower_bound_1 = max4;
845 if( (max4 > upper_bound_1) )
847 upper_bound_1 = max4;
850 if( (max7 < lower_bound_1) )
852 lower_bound_1 = max7;
854 if( (lower_bound_1 < 4.14607644401726239868e-50) )
856 return FPG_UNCERTAIN_VALUE;
860 if( (upper_bound_1 > 1.29807421463370647479e+33) )
862 return FPG_UNCERTAIN_VALUE;
864 eps = (4.38046888801178809320e-12 * (((((max6 * max3) * max2) * max7) * max5) * max4));
867 int_tmp_result_FFWKCAA = 1;
873 int_tmp_result_FFWKCAA = -1;
877 return FPG_UNCERTAIN_VALUE;
881 r_sign = int_tmp_result_FFWKCAA;
882 return (Delta_sign * r_sign);
886inline int side3_6d_filter(
const double* p0,
const double* p1,
const double* p2,
const double* p3,
const double* q0,
const double* q1,
const double* q2) {
887 double p1_0_p0_0 = (p1[0] - p0[0]);
888 double p1_1_p0_1 = (p1[1] - p0[1]);
889 double p1_2_p0_2 = (p1[2] - p0[2]);
890 double p1_3_p0_3 = (p1[3] - p0[3]);
891 double p1_4_p0_4 = (p1[4] - p0[4]);
892 double p1_5_p0_5 = (p1[5] - p0[5]);
894 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)));
895 double p2_0_p0_0 = (p2[0] - p0[0]);
896 double p2_1_p0_1 = (p2[1] - p0[1]);
897 double p2_2_p0_2 = (p2[2] - p0[2]);
898 double p2_3_p0_3 = (p2[3] - p0[3]);
899 double p2_4_p0_4 = (p2[4] - p0[4]);
900 double p2_5_p0_5 = (p2[5] - p0[5]);
902 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)));
903 double p3_0_p0_0 = (p3[0] - p0[0]);
904 double p3_1_p0_1 = (p3[1] - p0[1]);
905 double p3_2_p0_2 = (p3[2] - p0[2]);
906 double p3_3_p0_3 = (p3[3] - p0[3]);
907 double p3_4_p0_4 = (p3[4] - p0[4]);
908 double p3_5_p0_5 = (p3[5] - p0[5]);
910 l3 = (1 * ((((((p3_0_p0_0 * p3_0_p0_0) + (p3_1_p0_1 * p3_1_p0_1)) + (p3_2_p0_2 * p3_2_p0_2)) + (p3_3_p0_3 * p3_3_p0_3)) + (p3_4_p0_4 * p3_4_p0_4)) + (p3_5_p0_5 * p3_5_p0_5)));
911 double q0_0_p0_0 = (q0[0] - p0[0]);
912 double q0_1_p0_1 = (q0[1] - p0[1]);
913 double q0_2_p0_2 = (q0[2] - p0[2]);
914 double q0_3_p0_3 = (q0[3] - p0[3]);
915 double q0_4_p0_4 = (q0[4] - p0[4]);
916 double q0_5_p0_5 = (q0[5] - p0[5]);
918 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)));
919 double q1_0_p0_0 = (q1[0] - p0[0]);
920 double q1_1_p0_1 = (q1[1] - p0[1]);
921 double q1_2_p0_2 = (q1[2] - p0[2]);
922 double q1_3_p0_3 = (q1[3] - p0[3]);
923 double q1_4_p0_4 = (q1[4] - p0[4]);
924 double q1_5_p0_5 = (q1[5] - p0[5]);
926 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)));
927 double q2_0_p0_0 = (q2[0] - p0[0]);
928 double q2_1_p0_1 = (q2[1] - p0[1]);
929 double q2_2_p0_2 = (q2[2] - p0[2]);
930 double q2_3_p0_3 = (q2[3] - p0[3]);
931 double q2_4_p0_4 = (q2[4] - p0[4]);
932 double q2_5_p0_5 = (q2[5] - p0[5]);
934 a12 = (2 * ((((((p1_0_p0_0 * q2_0_p0_0) + (p1_1_p0_1 * q2_1_p0_1)) + (p1_2_p0_2 * q2_2_p0_2)) + (p1_3_p0_3 * q2_3_p0_3)) + (p1_4_p0_4 * q2_4_p0_4)) + (p1_5_p0_5 * q2_5_p0_5)));
936 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)));
938 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)));
940 a22 = (2 * ((((((p2_0_p0_0 * q2_0_p0_0) + (p2_1_p0_1 * q2_1_p0_1)) + (p2_2_p0_2 * q2_2_p0_2)) + (p2_3_p0_3 * q2_3_p0_3)) + (p2_4_p0_4 * q2_4_p0_4)) + (p2_5_p0_5 * q2_5_p0_5)));
942 a30 = (2 * ((((((p3_0_p0_0 * q0_0_p0_0) + (p3_1_p0_1 * q0_1_p0_1)) + (p3_2_p0_2 * q0_2_p0_2)) + (p3_3_p0_3 * q0_3_p0_3)) + (p3_4_p0_4 * q0_4_p0_4)) + (p3_5_p0_5 * q0_5_p0_5)));
944 a31 = (2 * ((((((p3_0_p0_0 * q1_0_p0_0) + (p3_1_p0_1 * q1_1_p0_1)) + (p3_2_p0_2 * q1_2_p0_2)) + (p3_3_p0_3 * q1_3_p0_3)) + (p3_4_p0_4 * q1_4_p0_4)) + (p3_5_p0_5 * q1_5_p0_5)));
946 a32 = (2 * ((((((p3_0_p0_0 * q2_0_p0_0) + (p3_1_p0_1 * q2_1_p0_1)) + (p3_2_p0_2 * q2_2_p0_2)) + (p3_3_p0_3 * q2_3_p0_3)) + (p3_4_p0_4 * q2_4_p0_4)) + (p3_5_p0_5 * q2_5_p0_5)));
948 b00 = ((a11 * a22) - (a12 * a21));
954 b10 = ((a12 * a20) - (a10 * a22));
960 b20 = ((a10 * a21) - (a11 * a20));
966 Delta = ((b00 + b10) + b20);
968 DeltaLambda0 = (((b01 * l1) + (b02 * l2)) + b00);
970 DeltaLambda1 = (((b11 * l1) + (b12 * l2)) + b10);
972 DeltaLambda2 = (((b21 * l1) + (b22 * l2)) + b20);
974 r = ((Delta * l3) - (((a30 * DeltaLambda0) + (a31 * DeltaLambda1)) + (a32 * DeltaLambda2)));
976 double max1 = fabs(p1_0_p0_0);
977 if( (max1 < fabs(p1_2_p0_2)) )
979 max1 = fabs(p1_2_p0_2);
981 if( (max1 < fabs(p1_1_p0_1)) )
983 max1 = fabs(p1_1_p0_1);
985 if( (max1 < fabs(p1_3_p0_3)) )
987 max1 = fabs(p1_3_p0_3);
989 if( (max1 < fabs(p1_4_p0_4)) )
991 max1 = fabs(p1_4_p0_4);
993 if( (max1 < fabs(p1_5_p0_5)) )
995 max1 = fabs(p1_5_p0_5);
997 double max2 = fabs(p2_0_p0_0);
998 if( (max2 < fabs(p2_1_p0_1)) )
1000 max2 = fabs(p2_1_p0_1);
1002 if( (max2 < fabs(p2_2_p0_2)) )
1004 max2 = fabs(p2_2_p0_2);
1006 if( (max2 < fabs(p2_3_p0_3)) )
1008 max2 = fabs(p2_3_p0_3);
1010 if( (max2 < fabs(p2_4_p0_4)) )
1012 max2 = fabs(p2_4_p0_4);
1014 if( (max2 < fabs(p2_5_p0_5)) )
1016 max2 = fabs(p2_5_p0_5);
1018 double max3 = fabs(q0_0_p0_0);
1019 if( (max3 < fabs(q0_1_p0_1)) )
1021 max3 = fabs(q0_1_p0_1);
1023 if( (max3 < fabs(q0_2_p0_2)) )
1025 max3 = fabs(q0_2_p0_2);
1027 if( (max3 < fabs(q0_3_p0_3)) )
1029 max3 = fabs(q0_3_p0_3);
1031 if( (max3 < fabs(q0_4_p0_4)) )
1033 max3 = fabs(q0_4_p0_4);
1035 if( (max3 < fabs(q0_5_p0_5)) )
1037 max3 = fabs(q0_5_p0_5);
1039 if( (max3 < fabs(q1_0_p0_0)) )
1041 max3 = fabs(q1_0_p0_0);
1043 if( (max3 < fabs(q1_1_p0_1)) )
1045 max3 = fabs(q1_1_p0_1);
1047 if( (max3 < fabs(q1_2_p0_2)) )
1049 max3 = fabs(q1_2_p0_2);
1051 if( (max3 < fabs(q1_3_p0_3)) )
1053 max3 = fabs(q1_3_p0_3);
1055 if( (max3 < fabs(q1_4_p0_4)) )
1057 max3 = fabs(q1_4_p0_4);
1059 if( (max3 < fabs(q1_5_p0_5)) )
1061 max3 = fabs(q1_5_p0_5);
1063 if( (max3 < fabs(q2_0_p0_0)) )
1065 max3 = fabs(q2_0_p0_0);
1067 if( (max3 < fabs(q2_1_p0_1)) )
1069 max3 = fabs(q2_1_p0_1);
1071 if( (max3 < fabs(q2_2_p0_2)) )
1073 max3 = fabs(q2_2_p0_2);
1075 if( (max3 < fabs(q2_3_p0_3)) )
1077 max3 = fabs(q2_3_p0_3);
1079 if( (max3 < fabs(q2_4_p0_4)) )
1081 max3 = fabs(q2_4_p0_4);
1083 if( (max3 < fabs(q2_5_p0_5)) )
1085 max3 = fabs(q2_5_p0_5);
1087 double lower_bound_1;
1088 double upper_bound_1;
1091 lower_bound_1 = max1;
1092 upper_bound_1 = max1;
1093 if( (max2 < lower_bound_1) )
1095 lower_bound_1 = max2;
1099 if( (max2 > upper_bound_1) )
1101 upper_bound_1 = max2;
1104 if( (max3 < lower_bound_1) )
1106 lower_bound_1 = max3;
1110 if( (max3 > upper_bound_1) )
1112 upper_bound_1 = max3;
1115 if( (lower_bound_1 < 1.49958502193059513986e-74) )
1117 return FPG_UNCERTAIN_VALUE;
1121 if( (upper_bound_1 > 1.29807421463370647479e+33) )
1123 return FPG_UNCERTAIN_VALUE;
1125 eps = (4.40007476026583916019e-13 * (((max1 * max3) * max2) * max3));
1132 if( (Delta < -eps) )
1134 int_tmp_result = -1;
1138 return FPG_UNCERTAIN_VALUE;
1142 Delta_sign = int_tmp_result;
1153 if( (max5 < fabs(p3_1_p0_1)) )
1155 max5 = fabs(p3_1_p0_1);
1157 if( (max5 < fabs(p3_2_p0_2)) )
1159 max5 = fabs(p3_2_p0_2);
1161 if( (max5 < fabs(p3_0_p0_0)) )
1163 max5 = fabs(p3_0_p0_0);
1165 if( (max5 < fabs(p3_3_p0_3)) )
1167 max5 = fabs(p3_3_p0_3);
1169 if( (max5 < fabs(p3_4_p0_4)) )
1171 max5 = fabs(p3_4_p0_4);
1173 if( (max5 < fabs(p3_5_p0_5)) )
1175 max5 = fabs(p3_5_p0_5);
1208 int int_tmp_result_FFWKCAA;
1209 lower_bound_1 = max2;
1210 upper_bound_1 = max2;
1211 if( (max3 < lower_bound_1) )
1213 lower_bound_1 = max3;
1215 if( (max4 < lower_bound_1) )
1217 lower_bound_1 = max4;
1221 if( (max4 > upper_bound_1) )
1223 upper_bound_1 = max4;
1226 if( (max5 < lower_bound_1) )
1228 lower_bound_1 = max5;
1230 if( (max6 < lower_bound_1) )
1232 lower_bound_1 = max6;
1234 if( (max7 < lower_bound_1) )
1236 lower_bound_1 = max7;
1238 if( (lower_bound_1 < 3.31864264949884013629e-50) )
1240 return FPG_UNCERTAIN_VALUE;
1244 if( (upper_bound_1 > 1.29807421463370647479e+33) )
1246 return FPG_UNCERTAIN_VALUE;
1248 eps = (1.66564133587113197628e-11 * (((((max5 * max3) * max2) * max7) * max6) * max4));
1251 int_tmp_result_FFWKCAA = 1;
1257 int_tmp_result_FFWKCAA = -1;
1261 return FPG_UNCERTAIN_VALUE;
1265 r_sign = int_tmp_result_FFWKCAA;
1266 return (Delta_sign * r_sign);
1270inline int side3_7d_filter(
const double* p0,
const double* p1,
const double* p2,
const double* p3,
const double* q0,
const double* q1,
const double* q2) {
1271 double p1_0_p0_0 = (p1[0] - p0[0]);
1272 double p1_1_p0_1 = (p1[1] - p0[1]);
1273 double p1_2_p0_2 = (p1[2] - p0[2]);
1274 double p1_3_p0_3 = (p1[3] - p0[3]);
1275 double p1_4_p0_4 = (p1[4] - p0[4]);
1276 double p1_5_p0_5 = (p1[5] - p0[5]);
1277 double p1_6_p0_6 = (p1[6] - p0[6]);
1279 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)));
1280 double p2_0_p0_0 = (p2[0] - p0[0]);
1281 double p2_1_p0_1 = (p2[1] - p0[1]);
1282 double p2_2_p0_2 = (p2[2] - p0[2]);
1283 double p2_3_p0_3 = (p2[3] - p0[3]);
1284 double p2_4_p0_4 = (p2[4] - p0[4]);
1285 double p2_5_p0_5 = (p2[5] - p0[5]);
1286 double p2_6_p0_6 = (p2[6] - p0[6]);
1288 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)));
1289 double p3_0_p0_0 = (p3[0] - p0[0]);
1290 double p3_1_p0_1 = (p3[1] - p0[1]);
1291 double p3_2_p0_2 = (p3[2] - p0[2]);
1292 double p3_3_p0_3 = (p3[3] - p0[3]);
1293 double p3_4_p0_4 = (p3[4] - p0[4]);
1294 double p3_5_p0_5 = (p3[5] - p0[5]);
1295 double p3_6_p0_6 = (p3[6] - p0[6]);
1297 l3 = (1 * (((((((p3_0_p0_0 * p3_0_p0_0) + (p3_1_p0_1 * p3_1_p0_1)) + (p3_2_p0_2 * p3_2_p0_2)) + (p3_3_p0_3 * p3_3_p0_3)) + (p3_4_p0_4 * p3_4_p0_4)) + (p3_5_p0_5 * p3_5_p0_5)) + (p3_6_p0_6 * p3_6_p0_6)));
1298 double q0_0_p0_0 = (q0[0] - p0[0]);
1299 double q0_1_p0_1 = (q0[1] - p0[1]);
1300 double q0_2_p0_2 = (q0[2] - p0[2]);
1301 double q0_3_p0_3 = (q0[3] - p0[3]);
1302 double q0_4_p0_4 = (q0[4] - p0[4]);
1303 double q0_5_p0_5 = (q0[5] - p0[5]);
1304 double q0_6_p0_6 = (q0[6] - p0[6]);
1306 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)));
1307 double q1_0_p0_0 = (q1[0] - p0[0]);
1308 double q1_1_p0_1 = (q1[1] - p0[1]);
1309 double q1_2_p0_2 = (q1[2] - p0[2]);
1310 double q1_3_p0_3 = (q1[3] - p0[3]);
1311 double q1_4_p0_4 = (q1[4] - p0[4]);
1312 double q1_5_p0_5 = (q1[5] - p0[5]);
1313 double q1_6_p0_6 = (q1[6] - p0[6]);
1315 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)));
1316 double q2_0_p0_0 = (q2[0] - p0[0]);
1317 double q2_1_p0_1 = (q2[1] - p0[1]);
1318 double q2_2_p0_2 = (q2[2] - p0[2]);
1319 double q2_3_p0_3 = (q2[3] - p0[3]);
1320 double q2_4_p0_4 = (q2[4] - p0[4]);
1321 double q2_5_p0_5 = (q2[5] - p0[5]);
1322 double q2_6_p0_6 = (q2[6] - p0[6]);
1324 a12 = (2 * (((((((p1_0_p0_0 * q2_0_p0_0) + (p1_1_p0_1 * q2_1_p0_1)) + (p1_2_p0_2 * q2_2_p0_2)) + (p1_3_p0_3 * q2_3_p0_3)) + (p1_4_p0_4 * q2_4_p0_4)) + (p1_5_p0_5 * q2_5_p0_5)) + (p1_6_p0_6 * q2_6_p0_6)));
1326 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)));
1328 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)));
1330 a22 = (2 * (((((((p2_0_p0_0 * q2_0_p0_0) + (p2_1_p0_1 * q2_1_p0_1)) + (p2_2_p0_2 * q2_2_p0_2)) + (p2_3_p0_3 * q2_3_p0_3)) + (p2_4_p0_4 * q2_4_p0_4)) + (p2_5_p0_5 * q2_5_p0_5)) + (p2_6_p0_6 * q2_6_p0_6)));
1332 a30 = (2 * (((((((p3_0_p0_0 * q0_0_p0_0) + (p3_1_p0_1 * q0_1_p0_1)) + (p3_2_p0_2 * q0_2_p0_2)) + (p3_3_p0_3 * q0_3_p0_3)) + (p3_4_p0_4 * q0_4_p0_4)) + (p3_5_p0_5 * q0_5_p0_5)) + (p3_6_p0_6 * q0_6_p0_6)));
1334 a31 = (2 * (((((((p3_0_p0_0 * q1_0_p0_0) + (p3_1_p0_1 * q1_1_p0_1)) + (p3_2_p0_2 * q1_2_p0_2)) + (p3_3_p0_3 * q1_3_p0_3)) + (p3_4_p0_4 * q1_4_p0_4)) + (p3_5_p0_5 * q1_5_p0_5)) + (p3_6_p0_6 * q1_6_p0_6)));
1336 a32 = (2 * (((((((p3_0_p0_0 * q2_0_p0_0) + (p3_1_p0_1 * q2_1_p0_1)) + (p3_2_p0_2 * q2_2_p0_2)) + (p3_3_p0_3 * q2_3_p0_3)) + (p3_4_p0_4 * q2_4_p0_4)) + (p3_5_p0_5 * q2_5_p0_5)) + (p3_6_p0_6 * q2_6_p0_6)));
1338 b00 = ((a11 * a22) - (a12 * a21));
1344 b10 = ((a12 * a20) - (a10 * a22));
1350 b20 = ((a10 * a21) - (a11 * a20));
1356 Delta = ((b00 + b10) + b20);
1357 double DeltaLambda0;
1358 DeltaLambda0 = (((b01 * l1) + (b02 * l2)) + b00);
1359 double DeltaLambda1;
1360 DeltaLambda1 = (((b11 * l1) + (b12 * l2)) + b10);
1361 double DeltaLambda2;
1362 DeltaLambda2 = (((b21 * l1) + (b22 * l2)) + b20);
1364 r = ((Delta * l3) - (((a30 * DeltaLambda0) + (a31 * DeltaLambda1)) + (a32 * DeltaLambda2)));
1366 double max1 = fabs(p1_1_p0_1);
1367 if( (max1 < fabs(p1_3_p0_3)) )
1369 max1 = fabs(p1_3_p0_3);
1371 if( (max1 < fabs(p1_5_p0_5)) )
1373 max1 = fabs(p1_5_p0_5);
1375 if( (max1 < fabs(p1_4_p0_4)) )
1377 max1 = fabs(p1_4_p0_4);
1379 if( (max1 < fabs(p1_6_p0_6)) )
1381 max1 = fabs(p1_6_p0_6);
1383 if( (max1 < fabs(p1_2_p0_2)) )
1385 max1 = fabs(p1_2_p0_2);
1387 if( (max1 < fabs(p1_0_p0_0)) )
1389 max1 = fabs(p1_0_p0_0);
1391 double max2 = fabs(p2_0_p0_0);
1392 if( (max2 < fabs(p2_1_p0_1)) )
1394 max2 = fabs(p2_1_p0_1);
1396 if( (max2 < fabs(p2_2_p0_2)) )
1398 max2 = fabs(p2_2_p0_2);
1400 if( (max2 < fabs(p2_3_p0_3)) )
1402 max2 = fabs(p2_3_p0_3);
1404 if( (max2 < fabs(p2_4_p0_4)) )
1406 max2 = fabs(p2_4_p0_4);
1408 if( (max2 < fabs(p2_5_p0_5)) )
1410 max2 = fabs(p2_5_p0_5);
1412 if( (max2 < fabs(p2_6_p0_6)) )
1414 max2 = fabs(p2_6_p0_6);
1416 double max3 = fabs(q0_0_p0_0);
1417 if( (max3 < fabs(q0_1_p0_1)) )
1419 max3 = fabs(q0_1_p0_1);
1421 if( (max3 < fabs(q0_2_p0_2)) )
1423 max3 = fabs(q0_2_p0_2);
1425 if( (max3 < fabs(q0_3_p0_3)) )
1427 max3 = fabs(q0_3_p0_3);
1429 if( (max3 < fabs(q0_4_p0_4)) )
1431 max3 = fabs(q0_4_p0_4);
1433 if( (max3 < fabs(q0_5_p0_5)) )
1435 max3 = fabs(q0_5_p0_5);
1437 if( (max3 < fabs(q0_6_p0_6)) )
1439 max3 = fabs(q0_6_p0_6);
1441 if( (max3 < fabs(q1_0_p0_0)) )
1443 max3 = fabs(q1_0_p0_0);
1445 if( (max3 < fabs(q1_1_p0_1)) )
1447 max3 = fabs(q1_1_p0_1);
1449 if( (max3 < fabs(q1_2_p0_2)) )
1451 max3 = fabs(q1_2_p0_2);
1453 if( (max3 < fabs(q1_3_p0_3)) )
1455 max3 = fabs(q1_3_p0_3);
1457 if( (max3 < fabs(q1_4_p0_4)) )
1459 max3 = fabs(q1_4_p0_4);
1461 if( (max3 < fabs(q1_5_p0_5)) )
1463 max3 = fabs(q1_5_p0_5);
1465 if( (max3 < fabs(q1_6_p0_6)) )
1467 max3 = fabs(q1_6_p0_6);
1469 if( (max3 < fabs(q2_0_p0_0)) )
1471 max3 = fabs(q2_0_p0_0);
1473 if( (max3 < fabs(q2_1_p0_1)) )
1475 max3 = fabs(q2_1_p0_1);
1477 if( (max3 < fabs(q2_2_p0_2)) )
1479 max3 = fabs(q2_2_p0_2);
1481 if( (max3 < fabs(q2_3_p0_3)) )
1483 max3 = fabs(q2_3_p0_3);
1485 if( (max3 < fabs(q2_4_p0_4)) )
1487 max3 = fabs(q2_4_p0_4);
1489 if( (max3 < fabs(q2_5_p0_5)) )
1491 max3 = fabs(q2_5_p0_5);
1493 if( (max3 < fabs(q2_6_p0_6)) )
1495 max3 = fabs(q2_6_p0_6);
1497 double lower_bound_1;
1498 double upper_bound_1;
1501 lower_bound_1 = max2;
1502 upper_bound_1 = max2;
1503 if( (max1 < lower_bound_1) )
1505 lower_bound_1 = max1;
1509 if( (max1 > upper_bound_1) )
1511 upper_bound_1 = max1;
1514 if( (max3 < lower_bound_1) )
1516 lower_bound_1 = max3;
1520 if( (max3 > upper_bound_1) )
1522 upper_bound_1 = max3;
1525 if( (lower_bound_1 < 1.36918881183883509035e-74) )
1527 return FPG_UNCERTAIN_VALUE;
1531 if( (upper_bound_1 > 1.29807421463370647479e+33) )
1533 return FPG_UNCERTAIN_VALUE;
1535 eps = (6.33127335329798996022e-13 * (((max1 * max3) * max2) * max3));
1542 if( (Delta < -eps) )
1544 int_tmp_result = -1;
1548 return FPG_UNCERTAIN_VALUE;
1552 Delta_sign = int_tmp_result;
1565 if( (max5 < fabs(p3_0_p0_0)) )
1567 max5 = fabs(p3_0_p0_0);
1569 if( (max5 < fabs(p3_1_p0_1)) )
1571 max5 = fabs(p3_1_p0_1);
1573 if( (max5 < fabs(p3_2_p0_2)) )
1575 max5 = fabs(p3_2_p0_2);
1577 if( (max5 < fabs(p3_3_p0_3)) )
1579 max5 = fabs(p3_3_p0_3);
1581 if( (max5 < fabs(p3_4_p0_4)) )
1583 max5 = fabs(p3_4_p0_4);
1585 if( (max5 < fabs(p3_5_p0_5)) )
1587 max5 = fabs(p3_5_p0_5);
1589 if( (max5 < fabs(p3_6_p0_6)) )
1591 max5 = fabs(p3_6_p0_6);
1623 int int_tmp_result_FFWKCAA;
1624 lower_bound_1 = max7;
1625 upper_bound_1 = max7;
1626 if( (max2 < lower_bound_1) )
1628 lower_bound_1 = max2;
1630 if( (max5 < lower_bound_1) )
1632 lower_bound_1 = max5;
1634 if( (max4 < lower_bound_1) )
1636 lower_bound_1 = max4;
1640 if( (max4 > upper_bound_1) )
1642 upper_bound_1 = max4;
1645 if( (max3 < lower_bound_1) )
1647 lower_bound_1 = max3;
1649 if( (max6 < lower_bound_1) )
1651 lower_bound_1 = max6;
1653 if( (lower_bound_1 < 3.04548303565602498901e-50) )
1655 return FPG_UNCERTAIN_VALUE;
1659 if( (upper_bound_1 > 1.29807421463370647479e+33) )
1661 return FPG_UNCERTAIN_VALUE;
1663 eps = (2.78873548804336160566e-11 * (((((max5 * max3) * max2) * max7) * max6) * max4));
1666 int_tmp_result_FFWKCAA = 1;
1672 int_tmp_result_FFWKCAA = -1;
1676 return FPG_UNCERTAIN_VALUE;
1680 r_sign = int_tmp_result_FFWKCAA;
1681 return (Delta_sign * r_sign);
1685inline int side3_8d_filter(
const double* p0,
const double* p1,
const double* p2,
const double* p3,
const double* q0,
const double* q1,
const double* q2) {
1686 double p1_0_p0_0 = (p1[0] - p0[0]);
1687 double p1_1_p0_1 = (p1[1] - p0[1]);
1688 double p1_2_p0_2 = (p1[2] - p0[2]);
1689 double p1_3_p0_3 = (p1[3] - p0[3]);
1690 double p1_4_p0_4 = (p1[4] - p0[4]);
1691 double p1_5_p0_5 = (p1[5] - p0[5]);
1692 double p1_6_p0_6 = (p1[6] - p0[6]);
1693 double p1_7_p0_7 = (p1[7] - p0[7]);
1695 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)));
1696 double p2_0_p0_0 = (p2[0] - p0[0]);
1697 double p2_1_p0_1 = (p2[1] - p0[1]);
1698 double p2_2_p0_2 = (p2[2] - p0[2]);
1699 double p2_3_p0_3 = (p2[3] - p0[3]);
1700 double p2_4_p0_4 = (p2[4] - p0[4]);
1701 double p2_5_p0_5 = (p2[5] - p0[5]);
1702 double p2_6_p0_6 = (p2[6] - p0[6]);
1703 double p2_7_p0_7 = (p2[7] - p0[7]);
1705 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)));
1706 double p3_0_p0_0 = (p3[0] - p0[0]);
1707 double p3_1_p0_1 = (p3[1] - p0[1]);
1708 double p3_2_p0_2 = (p3[2] - p0[2]);
1709 double p3_3_p0_3 = (p3[3] - p0[3]);
1710 double p3_4_p0_4 = (p3[4] - p0[4]);
1711 double p3_5_p0_5 = (p3[5] - p0[5]);
1712 double p3_6_p0_6 = (p3[6] - p0[6]);
1713 double p3_7_p0_7 = (p3[7] - p0[7]);
1715 l3 = (1 * ((((((((p3_0_p0_0 * p3_0_p0_0) + (p3_1_p0_1 * p3_1_p0_1)) + (p3_2_p0_2 * p3_2_p0_2)) + (p3_3_p0_3 * p3_3_p0_3)) + (p3_4_p0_4 * p3_4_p0_4)) + (p3_5_p0_5 * p3_5_p0_5)) + (p3_6_p0_6 * p3_6_p0_6)) + (p3_7_p0_7 * p3_7_p0_7)));
1716 double q0_0_p0_0 = (q0[0] - p0[0]);
1717 double q0_1_p0_1 = (q0[1] - p0[1]);
1718 double q0_2_p0_2 = (q0[2] - p0[2]);
1719 double q0_3_p0_3 = (q0[3] - p0[3]);
1720 double q0_4_p0_4 = (q0[4] - p0[4]);
1721 double q0_5_p0_5 = (q0[5] - p0[5]);
1722 double q0_6_p0_6 = (q0[6] - p0[6]);
1723 double q0_7_p0_7 = (q0[7] - p0[7]);
1725 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)));
1726 double q1_0_p0_0 = (q1[0] - p0[0]);
1727 double q1_1_p0_1 = (q1[1] - p0[1]);
1728 double q1_2_p0_2 = (q1[2] - p0[2]);
1729 double q1_3_p0_3 = (q1[3] - p0[3]);
1730 double q1_4_p0_4 = (q1[4] - p0[4]);
1731 double q1_5_p0_5 = (q1[5] - p0[5]);
1732 double q1_6_p0_6 = (q1[6] - p0[6]);
1733 double q1_7_p0_7 = (q1[7] - p0[7]);
1735 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)));
1736 double q2_0_p0_0 = (q2[0] - p0[0]);
1737 double q2_1_p0_1 = (q2[1] - p0[1]);
1738 double q2_2_p0_2 = (q2[2] - p0[2]);
1739 double q2_3_p0_3 = (q2[3] - p0[3]);
1740 double q2_4_p0_4 = (q2[4] - p0[4]);
1741 double q2_5_p0_5 = (q2[5] - p0[5]);
1742 double q2_6_p0_6 = (q2[6] - p0[6]);
1743 double q2_7_p0_7 = (q2[7] - p0[7]);
1745 a12 = (2 * ((((((((p1_0_p0_0 * q2_0_p0_0) + (p1_1_p0_1 * q2_1_p0_1)) + (p1_2_p0_2 * q2_2_p0_2)) + (p1_3_p0_3 * q2_3_p0_3)) + (p1_4_p0_4 * q2_4_p0_4)) + (p1_5_p0_5 * q2_5_p0_5)) + (p1_6_p0_6 * q2_6_p0_6)) + (p1_7_p0_7 * q2_7_p0_7)));
1747 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)));
1749 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)));
1751 a22 = (2 * ((((((((p2_0_p0_0 * q2_0_p0_0) + (p2_1_p0_1 * q2_1_p0_1)) + (p2_2_p0_2 * q2_2_p0_2)) + (p2_3_p0_3 * q2_3_p0_3)) + (p2_4_p0_4 * q2_4_p0_4)) + (p2_5_p0_5 * q2_5_p0_5)) + (p2_6_p0_6 * q2_6_p0_6)) + (p2_7_p0_7 * q2_7_p0_7)));
1753 a30 = (2 * ((((((((p3_0_p0_0 * q0_0_p0_0) + (p3_1_p0_1 * q0_1_p0_1)) + (p3_2_p0_2 * q0_2_p0_2)) + (p3_3_p0_3 * q0_3_p0_3)) + (p3_4_p0_4 * q0_4_p0_4)) + (p3_5_p0_5 * q0_5_p0_5)) + (p3_6_p0_6 * q0_6_p0_6)) + (p3_7_p0_7 * q0_7_p0_7)));
1755 a31 = (2 * ((((((((p3_0_p0_0 * q1_0_p0_0) + (p3_1_p0_1 * q1_1_p0_1)) + (p3_2_p0_2 * q1_2_p0_2)) + (p3_3_p0_3 * q1_3_p0_3)) + (p3_4_p0_4 * q1_4_p0_4)) + (p3_5_p0_5 * q1_5_p0_5)) + (p3_6_p0_6 * q1_6_p0_6)) + (p3_7_p0_7 * q1_7_p0_7)));
1757 a32 = (2 * ((((((((p3_0_p0_0 * q2_0_p0_0) + (p3_1_p0_1 * q2_1_p0_1)) + (p3_2_p0_2 * q2_2_p0_2)) + (p3_3_p0_3 * q2_3_p0_3)) + (p3_4_p0_4 * q2_4_p0_4)) + (p3_5_p0_5 * q2_5_p0_5)) + (p3_6_p0_6 * q2_6_p0_6)) + (p3_7_p0_7 * q2_7_p0_7)));
1759 b00 = ((a11 * a22) - (a12 * a21));
1765 b10 = ((a12 * a20) - (a10 * a22));
1771 b20 = ((a10 * a21) - (a11 * a20));
1777 Delta = ((b00 + b10) + b20);
1778 double DeltaLambda0;
1779 DeltaLambda0 = (((b01 * l1) + (b02 * l2)) + b00);
1780 double DeltaLambda1;
1781 DeltaLambda1 = (((b11 * l1) + (b12 * l2)) + b10);
1782 double DeltaLambda2;
1783 DeltaLambda2 = (((b21 * l1) + (b22 * l2)) + b20);
1785 r = ((Delta * l3) - (((a30 * DeltaLambda0) + (a31 * DeltaLambda1)) + (a32 * DeltaLambda2)));
1787 double max1 = fabs(p2_1_p0_1);
1788 if( (max1 < fabs(p2_0_p0_0)) )
1790 max1 = fabs(p2_0_p0_0);
1792 if( (max1 < fabs(p2_3_p0_3)) )
1794 max1 = fabs(p2_3_p0_3);
1796 if( (max1 < fabs(p2_2_p0_2)) )
1798 max1 = fabs(p2_2_p0_2);
1800 if( (max1 < fabs(p2_4_p0_4)) )
1802 max1 = fabs(p2_4_p0_4);
1804 if( (max1 < fabs(p2_7_p0_7)) )
1806 max1 = fabs(p2_7_p0_7);
1808 if( (max1 < fabs(p2_5_p0_5)) )
1810 max1 = fabs(p2_5_p0_5);
1812 if( (max1 < fabs(p2_6_p0_6)) )
1814 max1 = fabs(p2_6_p0_6);
1816 double max2 = fabs(p1_4_p0_4);
1817 if( (max2 < fabs(p1_1_p0_1)) )
1819 max2 = fabs(p1_1_p0_1);
1821 if( (max2 < fabs(p1_0_p0_0)) )
1823 max2 = fabs(p1_0_p0_0);
1825 if( (max2 < fabs(p1_3_p0_3)) )
1827 max2 = fabs(p1_3_p0_3);
1829 if( (max2 < fabs(p1_2_p0_2)) )
1831 max2 = fabs(p1_2_p0_2);
1833 if( (max2 < fabs(p1_5_p0_5)) )
1835 max2 = fabs(p1_5_p0_5);
1837 if( (max2 < fabs(p1_6_p0_6)) )
1839 max2 = fabs(p1_6_p0_6);
1841 if( (max2 < fabs(p1_7_p0_7)) )
1843 max2 = fabs(p1_7_p0_7);
1845 double max3 = fabs(q0_0_p0_0);
1846 if( (max3 < fabs(q0_1_p0_1)) )
1848 max3 = fabs(q0_1_p0_1);
1850 if( (max3 < fabs(q0_2_p0_2)) )
1852 max3 = fabs(q0_2_p0_2);
1854 if( (max3 < fabs(q0_3_p0_3)) )
1856 max3 = fabs(q0_3_p0_3);
1858 if( (max3 < fabs(q0_4_p0_4)) )
1860 max3 = fabs(q0_4_p0_4);
1862 if( (max3 < fabs(q0_5_p0_5)) )
1864 max3 = fabs(q0_5_p0_5);
1866 if( (max3 < fabs(q0_6_p0_6)) )
1868 max3 = fabs(q0_6_p0_6);
1870 if( (max3 < fabs(q0_7_p0_7)) )
1872 max3 = fabs(q0_7_p0_7);
1874 if( (max3 < fabs(q1_0_p0_0)) )
1876 max3 = fabs(q1_0_p0_0);
1878 if( (max3 < fabs(q1_1_p0_1)) )
1880 max3 = fabs(q1_1_p0_1);
1882 if( (max3 < fabs(q1_2_p0_2)) )
1884 max3 = fabs(q1_2_p0_2);
1886 if( (max3 < fabs(q1_3_p0_3)) )
1888 max3 = fabs(q1_3_p0_3);
1890 if( (max3 < fabs(q1_4_p0_4)) )
1892 max3 = fabs(q1_4_p0_4);
1894 if( (max3 < fabs(q1_5_p0_5)) )
1896 max3 = fabs(q1_5_p0_5);
1898 if( (max3 < fabs(q1_6_p0_6)) )
1900 max3 = fabs(q1_6_p0_6);
1902 if( (max3 < fabs(q1_7_p0_7)) )
1904 max3 = fabs(q1_7_p0_7);
1906 if( (max3 < fabs(q2_0_p0_0)) )
1908 max3 = fabs(q2_0_p0_0);
1910 if( (max3 < fabs(q2_1_p0_1)) )
1912 max3 = fabs(q2_1_p0_1);
1914 if( (max3 < fabs(q2_2_p0_2)) )
1916 max3 = fabs(q2_2_p0_2);
1918 if( (max3 < fabs(q2_3_p0_3)) )
1920 max3 = fabs(q2_3_p0_3);
1922 if( (max3 < fabs(q2_4_p0_4)) )
1924 max3 = fabs(q2_4_p0_4);
1926 if( (max3 < fabs(q2_5_p0_5)) )
1928 max3 = fabs(q2_5_p0_5);
1930 if( (max3 < fabs(q2_6_p0_6)) )
1932 max3 = fabs(q2_6_p0_6);
1934 if( (max3 < fabs(q2_7_p0_7)) )
1936 max3 = fabs(q2_7_p0_7);
1938 double lower_bound_1;
1939 double upper_bound_1;
1942 lower_bound_1 = max1;
1943 upper_bound_1 = max1;
1944 if( (max2 < lower_bound_1) )
1946 lower_bound_1 = max2;
1950 if( (max2 > upper_bound_1) )
1952 upper_bound_1 = max2;
1955 if( (max3 < lower_bound_1) )
1957 lower_bound_1 = max3;
1961 if( (max3 > upper_bound_1) )
1963 upper_bound_1 = max3;
1966 if( (lower_bound_1 < 1.26419510663115923609e-74) )
1968 return FPG_UNCERTAIN_VALUE;
1972 if( (upper_bound_1 > 1.29807421463370647479e+33) )
1974 return FPG_UNCERTAIN_VALUE;
1976 eps = (8.71140112255785451890e-13 * (((max2 * max3) * max1) * max3));
1983 if( (Delta < -eps) )
1985 int_tmp_result = -1;
1989 return FPG_UNCERTAIN_VALUE;
1993 Delta_sign = int_tmp_result;
2004 if( (max5 < fabs(p3_0_p0_0)) )
2006 max5 = fabs(p3_0_p0_0);
2008 if( (max5 < fabs(p3_1_p0_1)) )
2010 max5 = fabs(p3_1_p0_1);
2012 if( (max5 < fabs(p3_2_p0_2)) )
2014 max5 = fabs(p3_2_p0_2);
2016 if( (max5 < fabs(p3_3_p0_3)) )
2018 max5 = fabs(p3_3_p0_3);
2020 if( (max5 < fabs(p3_4_p0_4)) )
2022 max5 = fabs(p3_4_p0_4);
2024 if( (max5 < fabs(p3_5_p0_5)) )
2026 max5 = fabs(p3_5_p0_5);
2028 if( (max5 < fabs(p3_6_p0_6)) )
2030 max5 = fabs(p3_6_p0_6);
2032 if( (max5 < fabs(p3_7_p0_7)) )
2034 max5 = fabs(p3_7_p0_7);
2067 int int_tmp_result_FFWKCAA;
2068 lower_bound_1 = max1;
2069 upper_bound_1 = max1;
2070 if( (max3 < lower_bound_1) )
2072 lower_bound_1 = max3;
2074 if( (max4 < lower_bound_1) )
2076 lower_bound_1 = max4;
2080 if( (max4 > upper_bound_1) )
2082 upper_bound_1 = max4;
2085 if( (max5 < lower_bound_1) )
2087 lower_bound_1 = max5;
2089 if( (max6 < lower_bound_1) )
2091 lower_bound_1 = max6;
2093 if( (max7 < lower_bound_1) )
2095 lower_bound_1 = max7;
2097 if( (lower_bound_1 < 2.82528483194754087282e-50) )
2099 return FPG_UNCERTAIN_VALUE;
2103 if( (upper_bound_1 > 1.29807421463370647479e+33) )
2105 return FPG_UNCERTAIN_VALUE;
2107 eps = (4.37492894694731169807e-11 * (((((max5 * max3) * max1) * max7) * max6) * max4));
2110 int_tmp_result_FFWKCAA = 1;
2116 int_tmp_result_FFWKCAA = -1;
2120 return FPG_UNCERTAIN_VALUE;
2124 r_sign = int_tmp_result_FFWKCAA;
2125 return (Delta_sign * r_sign);