Graphite Version 3
An experimental 3D geometry processing program
Loading...
Searching...
No Matches
side3.h
1/* Automatically generated code, do not edit */
2/* Generated from source file: side3.pck */
3
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]);
7 double l1;
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]);
11 double l2;
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]);
15 double l3;
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]);
19 double a10;
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]);
23 double a11;
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]);
27 double a12;
28 a12 = (2 * ((p1_0_p0_0 * q2_0_p0_0) + (p1_1_p0_1 * q2_1_p0_1)));
29 double a20;
30 a20 = (2 * ((p2_0_p0_0 * q0_0_p0_0) + (p2_1_p0_1 * q0_1_p0_1)));
31 double a21;
32 a21 = (2 * ((p2_0_p0_0 * q1_0_p0_0) + (p2_1_p0_1 * q1_1_p0_1)));
33 double a22;
34 a22 = (2 * ((p2_0_p0_0 * q2_0_p0_0) + (p2_1_p0_1 * q2_1_p0_1)));
35 double a30;
36 a30 = (2 * ((p3_0_p0_0 * q0_0_p0_0) + (p3_1_p0_1 * q0_1_p0_1)));
37 double a31;
38 a31 = (2 * ((p3_0_p0_0 * q1_0_p0_0) + (p3_1_p0_1 * q1_1_p0_1)));
39 double a32;
40 a32 = (2 * ((p3_0_p0_0 * q2_0_p0_0) + (p3_1_p0_1 * q2_1_p0_1)));
41 double b00;
42 b00 = ((a11 * a22) - (a12 * a21));
43 double b01;
44 b01 = (a21 - a22);
45 double b02;
46 b02 = (a12 - a11);
47 double b10;
48 b10 = ((a12 * a20) - (a10 * a22));
49 double b11;
50 b11 = (a22 - a20);
51 double b12;
52 b12 = (a10 - a12);
53 double b20;
54 b20 = ((a10 * a21) - (a11 * a20));
55 double b21;
56 b21 = (a20 - a21);
57 double b22;
58 b22 = (a11 - a10);
59 double Delta;
60 Delta = ((b00 + b10) + b20);
61 double DeltaLambda0;
62 DeltaLambda0 = (((b01 * l1) + (b02 * l2)) + b00);
63 double DeltaLambda1;
64 DeltaLambda1 = (((b11 * l1) + (b12 * l2)) + b10);
65 double DeltaLambda2;
66 DeltaLambda2 = (((b21 * l1) + (b22 * l2)) + b20);
67 double r;
68 r = ((Delta * l3) - (((a30 * DeltaLambda0) + (a31 * DeltaLambda1)) + (a32 * DeltaLambda2)));
69 double eps;
70 double max1 = fabs(p2_0_p0_0);
71 if( (max1 < fabs(p2_1_p0_1)) )
72 {
73 max1 = fabs(p2_1_p0_1);
74 }
75 double max2 = fabs(q0_0_p0_0);
76 if( (max2 < fabs(q0_1_p0_1)) )
77 {
78 max2 = fabs(q0_1_p0_1);
79 }
80 if( (max2 < fabs(q1_0_p0_0)) )
81 {
82 max2 = fabs(q1_0_p0_0);
83 }
84 if( (max2 < fabs(q1_1_p0_1)) )
85 {
86 max2 = fabs(q1_1_p0_1);
87 }
88 if( (max2 < fabs(q2_0_p0_0)) )
89 {
90 max2 = fabs(q2_0_p0_0);
91 }
92 if( (max2 < fabs(q2_1_p0_1)) )
93 {
94 max2 = fabs(q2_1_p0_1);
95 }
96 double max3 = fabs(p1_0_p0_0);
97 if( (max3 < fabs(p1_1_p0_1)) )
98 {
99 max3 = fabs(p1_1_p0_1);
100 }
101 double lower_bound_1;
102 double upper_bound_1;
103 int Delta_sign;
104 int int_tmp_result;
105 lower_bound_1 = max2;
106 upper_bound_1 = max2;
107 if( (max1 < lower_bound_1) )
108 {
109 lower_bound_1 = max1;
110 }
111 else
112 {
113 if( (max1 > upper_bound_1) )
114 {
115 upper_bound_1 = max1;
116 }
117 }
118 if( (max3 < lower_bound_1) )
119 {
120 lower_bound_1 = max3;
121 }
122 else
123 {
124 if( (max3 > upper_bound_1) )
125 {
126 upper_bound_1 = max3;
127 }
128 }
129 if( (lower_bound_1 < 2.79532528033945620759e-74) )
130 {
131 return FPG_UNCERTAIN_VALUE;
132 }
133 else
134 {
135 if( (upper_bound_1 > 2.59614842926741294957e+33) )
136 {
137 return FPG_UNCERTAIN_VALUE;
138 }
139 eps = (3.64430756537603111258e-14 * (((max3 * max2) * max1) * max2));
140 if( (Delta > eps) )
141 {
142 int_tmp_result = 1;
143 }
144 else
145 {
146 if( (Delta < -eps) )
147 {
148 int_tmp_result = -1;
149 }
150 else
151 {
152 return FPG_UNCERTAIN_VALUE;
153 }
154 }
155 }
156 Delta_sign = int_tmp_result;
157 double max4 = max2;
158 if( (max4 < max1) )
159 {
160 max4 = max1;
161 }
162 if( (max4 < max3) )
163 {
164 max4 = max3;
165 }
166 double max5 = max2;
167 if( (max5 < max3) )
168 {
169 max5 = max3;
170 }
171 double max6 = max2;
172 if( (max6 < max3) )
173 {
174 max6 = max3;
175 }
176 if( (max5 < max6) )
177 {
178 max5 = max6;
179 }
180 double max7 = max3;
181 if( (max7 < fabs(p3_1_p0_1)) )
182 {
183 max7 = fabs(p3_1_p0_1);
184 }
185 if( (max7 < fabs(p3_0_p0_0)) )
186 {
187 max7 = fabs(p3_0_p0_0);
188 }
189 if( (max5 < max7) )
190 {
191 max5 = max7;
192 }
193 if( (max4 < max5) )
194 {
195 max4 = max5;
196 }
197 if( (max4 < max6) )
198 {
199 max4 = max6;
200 }
201 if( (max4 < max7) )
202 {
203 max4 = max7;
204 }
205 int r_sign;
206 int int_tmp_result_FFWKCAA;
207 lower_bound_1 = max2;
208 upper_bound_1 = max2;
209 if( (max1 < lower_bound_1) )
210 {
211 lower_bound_1 = max1;
212 }
213 if( (max4 < lower_bound_1) )
214 {
215 lower_bound_1 = max4;
216 }
217 else
218 {
219 if( (max4 > upper_bound_1) )
220 {
221 upper_bound_1 = max4;
222 }
223 }
224 if( (max5 < lower_bound_1) )
225 {
226 lower_bound_1 = max5;
227 }
228 if( (max6 < lower_bound_1) )
229 {
230 lower_bound_1 = max6;
231 }
232 if( (max7 < lower_bound_1) )
233 {
234 lower_bound_1 = max7;
235 }
236 if( (lower_bound_1 < 6.01986729486167248087e-50) )
237 {
238 return FPG_UNCERTAIN_VALUE;
239 }
240 else
241 {
242 if( (upper_bound_1 > 2.59614842926741294957e+33) )
243 {
244 return FPG_UNCERTAIN_VALUE;
245 }
246 eps = (4.67544471613800658534e-13 * (((((max7 * max2) * max1) * max6) * max5) * max4));
247 if( (r > eps) )
248 {
249 int_tmp_result_FFWKCAA = 1;
250 }
251 else
252 {
253 if( (r < -eps) )
254 {
255 int_tmp_result_FFWKCAA = -1;
256 }
257 else
258 {
259 return FPG_UNCERTAIN_VALUE;
260 }
261 }
262 }
263 r_sign = int_tmp_result_FFWKCAA;
264 return (Delta_sign * r_sign);
265}
266
267
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]);
272 double l1;
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]);
277 double l2;
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]);
282 double l3;
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]);
287 double a10;
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]);
292 double a11;
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]);
297 double a12;
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)));
299 double a20;
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)));
301 double a21;
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)));
303 double a22;
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)));
305 double a30;
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)));
307 double a31;
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)));
309 double a32;
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)));
311 double b00;
312 b00 = ((a11 * a22) - (a12 * a21));
313 double b01;
314 b01 = (a21 - a22);
315 double b02;
316 b02 = (a12 - a11);
317 double b10;
318 b10 = ((a12 * a20) - (a10 * a22));
319 double b11;
320 b11 = (a22 - a20);
321 double b12;
322 b12 = (a10 - a12);
323 double b20;
324 b20 = ((a10 * a21) - (a11 * a20));
325 double b21;
326 b21 = (a20 - a21);
327 double b22;
328 b22 = (a11 - a10);
329 double Delta;
330 Delta = ((b00 + b10) + b20);
331 double DeltaLambda0;
332 DeltaLambda0 = (((b01 * l1) + (b02 * l2)) + b00);
333 double DeltaLambda1;
334 DeltaLambda1 = (((b11 * l1) + (b12 * l2)) + b10);
335 double DeltaLambda2;
336 DeltaLambda2 = (((b21 * l1) + (b22 * l2)) + b20);
337 double r;
338 r = ((Delta * l3) - (((a30 * DeltaLambda0) + (a31 * DeltaLambda1)) + (a32 * DeltaLambda2)));
339 double eps;
340 double max1 = fabs(p1_1_p0_1);
341 if( (max1 < fabs(p1_2_p0_2)) )
342 {
343 max1 = fabs(p1_2_p0_2);
344 }
345 if( (max1 < fabs(p1_0_p0_0)) )
346 {
347 max1 = fabs(p1_0_p0_0);
348 }
349 double max2 = fabs(q0_2_p0_2);
350 if( (max2 < fabs(q0_0_p0_0)) )
351 {
352 max2 = fabs(q0_0_p0_0);
353 }
354 if( (max2 < fabs(q0_1_p0_1)) )
355 {
356 max2 = fabs(q0_1_p0_1);
357 }
358 if( (max2 < fabs(q1_0_p0_0)) )
359 {
360 max2 = fabs(q1_0_p0_0);
361 }
362 if( (max2 < fabs(q1_1_p0_1)) )
363 {
364 max2 = fabs(q1_1_p0_1);
365 }
366 if( (max2 < fabs(q1_2_p0_2)) )
367 {
368 max2 = fabs(q1_2_p0_2);
369 }
370 if( (max2 < fabs(q2_0_p0_0)) )
371 {
372 max2 = fabs(q2_0_p0_0);
373 }
374 if( (max2 < fabs(q2_1_p0_1)) )
375 {
376 max2 = fabs(q2_1_p0_1);
377 }
378 if( (max2 < fabs(q2_2_p0_2)) )
379 {
380 max2 = fabs(q2_2_p0_2);
381 }
382 double max3 = fabs(p2_2_p0_2);
383 if( (max3 < fabs(p2_0_p0_0)) )
384 {
385 max3 = fabs(p2_0_p0_0);
386 }
387 if( (max3 < fabs(p2_1_p0_1)) )
388 {
389 max3 = fabs(p2_1_p0_1);
390 }
391 double lower_bound_1;
392 double upper_bound_1;
393 int Delta_sign;
394 int int_tmp_result;
395 lower_bound_1 = max1;
396 upper_bound_1 = max1;
397 if( (max2 < lower_bound_1) )
398 {
399 lower_bound_1 = max2;
400 }
401 else
402 {
403 if( (max2 > upper_bound_1) )
404 {
405 upper_bound_1 = max2;
406 }
407 }
408 if( (max3 < lower_bound_1) )
409 {
410 lower_bound_1 = max3;
411 }
412 else
413 {
414 if( (max3 > upper_bound_1) )
415 {
416 upper_bound_1 = max3;
417 }
418 }
419 if( (lower_bound_1 < 2.22985945097100191780e-74) )
420 {
421 return FPG_UNCERTAIN_VALUE;
422 }
423 else
424 {
425 if( (upper_bound_1 > 2.59614842926741294957e+33) )
426 {
427 return FPG_UNCERTAIN_VALUE;
428 }
429 eps = (8.99983341597279045654e-14 * (((max1 * max2) * max3) * max2));
430 if( (Delta > eps) )
431 {
432 int_tmp_result = 1;
433 }
434 else
435 {
436 if( (Delta < -eps) )
437 {
438 int_tmp_result = -1;
439 }
440 else
441 {
442 return FPG_UNCERTAIN_VALUE;
443 }
444 }
445 }
446 Delta_sign = int_tmp_result;
447 double max4 = max1;
448 if( (max4 < max2) )
449 {
450 max4 = max2;
451 }
452 if( (max4 < max3) )
453 {
454 max4 = max3;
455 }
456 double max5 = max1;
457 if( (max5 < max2) )
458 {
459 max5 = max2;
460 }
461 double max6 = max1;
462 if( (max6 < fabs(p3_0_p0_0)) )
463 {
464 max6 = fabs(p3_0_p0_0);
465 }
466 if( (max6 < fabs(p3_1_p0_1)) )
467 {
468 max6 = fabs(p3_1_p0_1);
469 }
470 if( (max6 < fabs(p3_2_p0_2)) )
471 {
472 max6 = fabs(p3_2_p0_2);
473 }
474 if( (max5 < max6) )
475 {
476 max5 = max6;
477 }
478 double max7 = max1;
479 if( (max7 < max2) )
480 {
481 max7 = max2;
482 }
483 if( (max5 < max7) )
484 {
485 max5 = max7;
486 }
487 if( (max4 < max5) )
488 {
489 max4 = max5;
490 }
491 if( (max4 < max6) )
492 {
493 max4 = max6;
494 }
495 if( (max4 < max7) )
496 {
497 max4 = max7;
498 }
499 int r_sign;
500 int int_tmp_result_FFWKCAA;
501 lower_bound_1 = max2;
502 upper_bound_1 = max2;
503 if( (max3 < lower_bound_1) )
504 {
505 lower_bound_1 = max3;
506 }
507 if( (max4 < lower_bound_1) )
508 {
509 lower_bound_1 = max4;
510 }
511 else
512 {
513 if( (max4 > upper_bound_1) )
514 {
515 upper_bound_1 = max4;
516 }
517 }
518 if( (max5 < lower_bound_1) )
519 {
520 lower_bound_1 = max5;
521 }
522 if( (max6 < lower_bound_1) )
523 {
524 lower_bound_1 = max6;
525 }
526 if( (max7 < lower_bound_1) )
527 {
528 lower_bound_1 = max7;
529 }
530 if( (lower_bound_1 < 4.84416636653081796592e-50) )
531 {
532 return FPG_UNCERTAIN_VALUE;
533 }
534 else
535 {
536 if( (upper_bound_1 > 2.59614842926741294957e+33) )
537 {
538 return FPG_UNCERTAIN_VALUE;
539 }
540 eps = (1.72198804259438718181e-12 * (((((max6 * max2) * max3) * max7) * max5) * max4));
541 if( (r > eps) )
542 {
543 int_tmp_result_FFWKCAA = 1;
544 }
545 else
546 {
547 if( (r < -eps) )
548 {
549 int_tmp_result_FFWKCAA = -1;
550 }
551 else
552 {
553 return FPG_UNCERTAIN_VALUE;
554 }
555 }
556 }
557 r_sign = int_tmp_result_FFWKCAA;
558 return (Delta_sign * r_sign);
559}
560
561
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]);
567 double l1;
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]);
573 double l2;
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]);
579 double l3;
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]);
585 double a10;
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]);
591 double a11;
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]);
597 double a12;
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)));
599 double a20;
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)));
601 double a21;
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)));
603 double a22;
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)));
605 double a30;
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)));
607 double a31;
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)));
609 double a32;
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)));
611 double b00;
612 b00 = ((a11 * a22) - (a12 * a21));
613 double b01;
614 b01 = (a21 - a22);
615 double b02;
616 b02 = (a12 - a11);
617 double b10;
618 b10 = ((a12 * a20) - (a10 * a22));
619 double b11;
620 b11 = (a22 - a20);
621 double b12;
622 b12 = (a10 - a12);
623 double b20;
624 b20 = ((a10 * a21) - (a11 * a20));
625 double b21;
626 b21 = (a20 - a21);
627 double b22;
628 b22 = (a11 - a10);
629 double Delta;
630 Delta = ((b00 + b10) + b20);
631 double DeltaLambda0;
632 DeltaLambda0 = (((b01 * l1) + (b02 * l2)) + b00);
633 double DeltaLambda1;
634 DeltaLambda1 = (((b11 * l1) + (b12 * l2)) + b10);
635 double DeltaLambda2;
636 DeltaLambda2 = (((b21 * l1) + (b22 * l2)) + b20);
637 double r;
638 r = ((Delta * l3) - (((a30 * DeltaLambda0) + (a31 * DeltaLambda1)) + (a32 * DeltaLambda2)));
639 double eps;
640 double max1 = fabs(p1_3_p0_3);
641 if( (max1 < fabs(p1_1_p0_1)) )
642 {
643 max1 = fabs(p1_1_p0_1);
644 }
645 if( (max1 < fabs(p1_2_p0_2)) )
646 {
647 max1 = fabs(p1_2_p0_2);
648 }
649 if( (max1 < fabs(p1_0_p0_0)) )
650 {
651 max1 = fabs(p1_0_p0_0);
652 }
653 double max2 = fabs(p2_3_p0_3);
654 if( (max2 < fabs(p2_2_p0_2)) )
655 {
656 max2 = fabs(p2_2_p0_2);
657 }
658 if( (max2 < fabs(p2_0_p0_0)) )
659 {
660 max2 = fabs(p2_0_p0_0);
661 }
662 if( (max2 < fabs(p2_1_p0_1)) )
663 {
664 max2 = fabs(p2_1_p0_1);
665 }
666 double max3 = fabs(q0_1_p0_1);
667 if( (max3 < fabs(q0_0_p0_0)) )
668 {
669 max3 = fabs(q0_0_p0_0);
670 }
671 if( (max3 < fabs(q0_2_p0_2)) )
672 {
673 max3 = fabs(q0_2_p0_2);
674 }
675 if( (max3 < fabs(q0_3_p0_3)) )
676 {
677 max3 = fabs(q0_3_p0_3);
678 }
679 if( (max3 < fabs(q1_0_p0_0)) )
680 {
681 max3 = fabs(q1_0_p0_0);
682 }
683 if( (max3 < fabs(q1_1_p0_1)) )
684 {
685 max3 = fabs(q1_1_p0_1);
686 }
687 if( (max3 < fabs(q1_2_p0_2)) )
688 {
689 max3 = fabs(q1_2_p0_2);
690 }
691 if( (max3 < fabs(q1_3_p0_3)) )
692 {
693 max3 = fabs(q1_3_p0_3);
694 }
695 if( (max3 < fabs(q2_0_p0_0)) )
696 {
697 max3 = fabs(q2_0_p0_0);
698 }
699 if( (max3 < fabs(q2_1_p0_1)) )
700 {
701 max3 = fabs(q2_1_p0_1);
702 }
703 if( (max3 < fabs(q2_2_p0_2)) )
704 {
705 max3 = fabs(q2_2_p0_2);
706 }
707 if( (max3 < fabs(q2_3_p0_3)) )
708 {
709 max3 = fabs(q2_3_p0_3);
710 }
711 double lower_bound_1;
712 double upper_bound_1;
713 int Delta_sign;
714 int int_tmp_result;
715 lower_bound_1 = max1;
716 upper_bound_1 = max1;
717 if( (max2 < lower_bound_1) )
718 {
719 lower_bound_1 = max2;
720 }
721 else
722 {
723 if( (max2 > upper_bound_1) )
724 {
725 upper_bound_1 = max2;
726 }
727 }
728 if( (max3 < lower_bound_1) )
729 {
730 lower_bound_1 = max3;
731 }
732 else
733 {
734 if( (max3 > upper_bound_1) )
735 {
736 upper_bound_1 = max3;
737 }
738 }
739 if( (lower_bound_1 < 1.89528395402941802921e-74) )
740 {
741 return FPG_UNCERTAIN_VALUE;
742 }
743 else
744 {
745 if( (upper_bound_1 > 1.29807421463370647479e+33) )
746 {
747 return FPG_UNCERTAIN_VALUE;
748 }
749 eps = (1.72443682410931985179e-13 * (((max1 * max3) * max2) * max3));
750 if( (Delta > eps) )
751 {
752 int_tmp_result = 1;
753 }
754 else
755 {
756 if( (Delta < -eps) )
757 {
758 int_tmp_result = -1;
759 }
760 else
761 {
762 return FPG_UNCERTAIN_VALUE;
763 }
764 }
765 }
766 Delta_sign = int_tmp_result;
767 double max4 = max1;
768 double max5 = max1;
769 double max6 = max1;
770 if( (max6 < fabs(p3_0_p0_0)) )
771 {
772 max6 = fabs(p3_0_p0_0);
773 }
774 if( (max6 < fabs(p3_3_p0_3)) )
775 {
776 max6 = fabs(p3_3_p0_3);
777 }
778 if( (max6 < fabs(p3_2_p0_2)) )
779 {
780 max6 = fabs(p3_2_p0_2);
781 }
782 if( (max6 < fabs(p3_1_p0_1)) )
783 {
784 max6 = fabs(p3_1_p0_1);
785 }
786 if( (max5 < max6) )
787 {
788 max5 = max6;
789 }
790 if( (max5 < max3) )
791 {
792 max5 = max3;
793 }
794 double max7 = max1;
795 if( (max7 < max3) )
796 {
797 max7 = max3;
798 }
799 if( (max5 < max7) )
800 {
801 max5 = max7;
802 }
803 if( (max4 < max5) )
804 {
805 max4 = max5;
806 }
807 if( (max4 < max6) )
808 {
809 max4 = max6;
810 }
811 if( (max4 < max2) )
812 {
813 max4 = max2;
814 }
815 if( (max4 < max3) )
816 {
817 max4 = max3;
818 }
819 if( (max4 < max7) )
820 {
821 max4 = max7;
822 }
823 int r_sign;
824 int int_tmp_result_FFWKCAA;
825 lower_bound_1 = max5;
826 upper_bound_1 = max5;
827 if( (max6 < lower_bound_1) )
828 {
829 lower_bound_1 = max6;
830 }
831 if( (max2 < lower_bound_1) )
832 {
833 lower_bound_1 = max2;
834 }
835 if( (max3 < lower_bound_1) )
836 {
837 lower_bound_1 = max3;
838 }
839 if( (max4 < lower_bound_1) )
840 {
841 lower_bound_1 = max4;
842 }
843 else
844 {
845 if( (max4 > upper_bound_1) )
846 {
847 upper_bound_1 = max4;
848 }
849 }
850 if( (max7 < lower_bound_1) )
851 {
852 lower_bound_1 = max7;
853 }
854 if( (lower_bound_1 < 4.14607644401726239868e-50) )
855 {
856 return FPG_UNCERTAIN_VALUE;
857 }
858 else
859 {
860 if( (upper_bound_1 > 1.29807421463370647479e+33) )
861 {
862 return FPG_UNCERTAIN_VALUE;
863 }
864 eps = (4.38046888801178809320e-12 * (((((max6 * max3) * max2) * max7) * max5) * max4));
865 if( (r > eps) )
866 {
867 int_tmp_result_FFWKCAA = 1;
868 }
869 else
870 {
871 if( (r < -eps) )
872 {
873 int_tmp_result_FFWKCAA = -1;
874 }
875 else
876 {
877 return FPG_UNCERTAIN_VALUE;
878 }
879 }
880 }
881 r_sign = int_tmp_result_FFWKCAA;
882 return (Delta_sign * r_sign);
883}
884
885
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]);
893 double l1;
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]);
901 double l2;
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]);
909 double l3;
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]);
917 double a10;
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]);
925 double a11;
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]);
933 double a12;
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)));
935 double a20;
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)));
937 double a21;
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)));
939 double a22;
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)));
941 double a30;
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)));
943 double a31;
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)));
945 double a32;
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)));
947 double b00;
948 b00 = ((a11 * a22) - (a12 * a21));
949 double b01;
950 b01 = (a21 - a22);
951 double b02;
952 b02 = (a12 - a11);
953 double b10;
954 b10 = ((a12 * a20) - (a10 * a22));
955 double b11;
956 b11 = (a22 - a20);
957 double b12;
958 b12 = (a10 - a12);
959 double b20;
960 b20 = ((a10 * a21) - (a11 * a20));
961 double b21;
962 b21 = (a20 - a21);
963 double b22;
964 b22 = (a11 - a10);
965 double Delta;
966 Delta = ((b00 + b10) + b20);
967 double DeltaLambda0;
968 DeltaLambda0 = (((b01 * l1) + (b02 * l2)) + b00);
969 double DeltaLambda1;
970 DeltaLambda1 = (((b11 * l1) + (b12 * l2)) + b10);
971 double DeltaLambda2;
972 DeltaLambda2 = (((b21 * l1) + (b22 * l2)) + b20);
973 double r;
974 r = ((Delta * l3) - (((a30 * DeltaLambda0) + (a31 * DeltaLambda1)) + (a32 * DeltaLambda2)));
975 double eps;
976 double max1 = fabs(p1_0_p0_0);
977 if( (max1 < fabs(p1_2_p0_2)) )
978 {
979 max1 = fabs(p1_2_p0_2);
980 }
981 if( (max1 < fabs(p1_1_p0_1)) )
982 {
983 max1 = fabs(p1_1_p0_1);
984 }
985 if( (max1 < fabs(p1_3_p0_3)) )
986 {
987 max1 = fabs(p1_3_p0_3);
988 }
989 if( (max1 < fabs(p1_4_p0_4)) )
990 {
991 max1 = fabs(p1_4_p0_4);
992 }
993 if( (max1 < fabs(p1_5_p0_5)) )
994 {
995 max1 = fabs(p1_5_p0_5);
996 }
997 double max2 = fabs(p2_0_p0_0);
998 if( (max2 < fabs(p2_1_p0_1)) )
999 {
1000 max2 = fabs(p2_1_p0_1);
1001 }
1002 if( (max2 < fabs(p2_2_p0_2)) )
1003 {
1004 max2 = fabs(p2_2_p0_2);
1005 }
1006 if( (max2 < fabs(p2_3_p0_3)) )
1007 {
1008 max2 = fabs(p2_3_p0_3);
1009 }
1010 if( (max2 < fabs(p2_4_p0_4)) )
1011 {
1012 max2 = fabs(p2_4_p0_4);
1013 }
1014 if( (max2 < fabs(p2_5_p0_5)) )
1015 {
1016 max2 = fabs(p2_5_p0_5);
1017 }
1018 double max3 = fabs(q0_0_p0_0);
1019 if( (max3 < fabs(q0_1_p0_1)) )
1020 {
1021 max3 = fabs(q0_1_p0_1);
1022 }
1023 if( (max3 < fabs(q0_2_p0_2)) )
1024 {
1025 max3 = fabs(q0_2_p0_2);
1026 }
1027 if( (max3 < fabs(q0_3_p0_3)) )
1028 {
1029 max3 = fabs(q0_3_p0_3);
1030 }
1031 if( (max3 < fabs(q0_4_p0_4)) )
1032 {
1033 max3 = fabs(q0_4_p0_4);
1034 }
1035 if( (max3 < fabs(q0_5_p0_5)) )
1036 {
1037 max3 = fabs(q0_5_p0_5);
1038 }
1039 if( (max3 < fabs(q1_0_p0_0)) )
1040 {
1041 max3 = fabs(q1_0_p0_0);
1042 }
1043 if( (max3 < fabs(q1_1_p0_1)) )
1044 {
1045 max3 = fabs(q1_1_p0_1);
1046 }
1047 if( (max3 < fabs(q1_2_p0_2)) )
1048 {
1049 max3 = fabs(q1_2_p0_2);
1050 }
1051 if( (max3 < fabs(q1_3_p0_3)) )
1052 {
1053 max3 = fabs(q1_3_p0_3);
1054 }
1055 if( (max3 < fabs(q1_4_p0_4)) )
1056 {
1057 max3 = fabs(q1_4_p0_4);
1058 }
1059 if( (max3 < fabs(q1_5_p0_5)) )
1060 {
1061 max3 = fabs(q1_5_p0_5);
1062 }
1063 if( (max3 < fabs(q2_0_p0_0)) )
1064 {
1065 max3 = fabs(q2_0_p0_0);
1066 }
1067 if( (max3 < fabs(q2_1_p0_1)) )
1068 {
1069 max3 = fabs(q2_1_p0_1);
1070 }
1071 if( (max3 < fabs(q2_2_p0_2)) )
1072 {
1073 max3 = fabs(q2_2_p0_2);
1074 }
1075 if( (max3 < fabs(q2_3_p0_3)) )
1076 {
1077 max3 = fabs(q2_3_p0_3);
1078 }
1079 if( (max3 < fabs(q2_4_p0_4)) )
1080 {
1081 max3 = fabs(q2_4_p0_4);
1082 }
1083 if( (max3 < fabs(q2_5_p0_5)) )
1084 {
1085 max3 = fabs(q2_5_p0_5);
1086 }
1087 double lower_bound_1;
1088 double upper_bound_1;
1089 int Delta_sign;
1090 int int_tmp_result;
1091 lower_bound_1 = max1;
1092 upper_bound_1 = max1;
1093 if( (max2 < lower_bound_1) )
1094 {
1095 lower_bound_1 = max2;
1096 }
1097 else
1098 {
1099 if( (max2 > upper_bound_1) )
1100 {
1101 upper_bound_1 = max2;
1102 }
1103 }
1104 if( (max3 < lower_bound_1) )
1105 {
1106 lower_bound_1 = max3;
1107 }
1108 else
1109 {
1110 if( (max3 > upper_bound_1) )
1111 {
1112 upper_bound_1 = max3;
1113 }
1114 }
1115 if( (lower_bound_1 < 1.49958502193059513986e-74) )
1116 {
1117 return FPG_UNCERTAIN_VALUE;
1118 }
1119 else
1120 {
1121 if( (upper_bound_1 > 1.29807421463370647479e+33) )
1122 {
1123 return FPG_UNCERTAIN_VALUE;
1124 }
1125 eps = (4.40007476026583916019e-13 * (((max1 * max3) * max2) * max3));
1126 if( (Delta > eps) )
1127 {
1128 int_tmp_result = 1;
1129 }
1130 else
1131 {
1132 if( (Delta < -eps) )
1133 {
1134 int_tmp_result = -1;
1135 }
1136 else
1137 {
1138 return FPG_UNCERTAIN_VALUE;
1139 }
1140 }
1141 }
1142 Delta_sign = int_tmp_result;
1143 double max4 = max1;
1144 if( (max4 < max2) )
1145 {
1146 max4 = max2;
1147 }
1148 if( (max4 < max3) )
1149 {
1150 max4 = max3;
1151 }
1152 double max5 = max1;
1153 if( (max5 < fabs(p3_1_p0_1)) )
1154 {
1155 max5 = fabs(p3_1_p0_1);
1156 }
1157 if( (max5 < fabs(p3_2_p0_2)) )
1158 {
1159 max5 = fabs(p3_2_p0_2);
1160 }
1161 if( (max5 < fabs(p3_0_p0_0)) )
1162 {
1163 max5 = fabs(p3_0_p0_0);
1164 }
1165 if( (max5 < fabs(p3_3_p0_3)) )
1166 {
1167 max5 = fabs(p3_3_p0_3);
1168 }
1169 if( (max5 < fabs(p3_4_p0_4)) )
1170 {
1171 max5 = fabs(p3_4_p0_4);
1172 }
1173 if( (max5 < fabs(p3_5_p0_5)) )
1174 {
1175 max5 = fabs(p3_5_p0_5);
1176 }
1177 if( (max4 < max5) )
1178 {
1179 max4 = max5;
1180 }
1181 double max6 = max1;
1182 if( (max6 < max3) )
1183 {
1184 max6 = max3;
1185 }
1186 if( (max6 < max5) )
1187 {
1188 max6 = max5;
1189 }
1190 double max7 = max1;
1191 if( (max7 < max3) )
1192 {
1193 max7 = max3;
1194 }
1195 if( (max6 < max7) )
1196 {
1197 max6 = max7;
1198 }
1199 if( (max4 < max6) )
1200 {
1201 max4 = max6;
1202 }
1203 if( (max4 < max7) )
1204 {
1205 max4 = max7;
1206 }
1207 int r_sign;
1208 int int_tmp_result_FFWKCAA;
1209 lower_bound_1 = max2;
1210 upper_bound_1 = max2;
1211 if( (max3 < lower_bound_1) )
1212 {
1213 lower_bound_1 = max3;
1214 }
1215 if( (max4 < lower_bound_1) )
1216 {
1217 lower_bound_1 = max4;
1218 }
1219 else
1220 {
1221 if( (max4 > upper_bound_1) )
1222 {
1223 upper_bound_1 = max4;
1224 }
1225 }
1226 if( (max5 < lower_bound_1) )
1227 {
1228 lower_bound_1 = max5;
1229 }
1230 if( (max6 < lower_bound_1) )
1231 {
1232 lower_bound_1 = max6;
1233 }
1234 if( (max7 < lower_bound_1) )
1235 {
1236 lower_bound_1 = max7;
1237 }
1238 if( (lower_bound_1 < 3.31864264949884013629e-50) )
1239 {
1240 return FPG_UNCERTAIN_VALUE;
1241 }
1242 else
1243 {
1244 if( (upper_bound_1 > 1.29807421463370647479e+33) )
1245 {
1246 return FPG_UNCERTAIN_VALUE;
1247 }
1248 eps = (1.66564133587113197628e-11 * (((((max5 * max3) * max2) * max7) * max6) * max4));
1249 if( (r > eps) )
1250 {
1251 int_tmp_result_FFWKCAA = 1;
1252 }
1253 else
1254 {
1255 if( (r < -eps) )
1256 {
1257 int_tmp_result_FFWKCAA = -1;
1258 }
1259 else
1260 {
1261 return FPG_UNCERTAIN_VALUE;
1262 }
1263 }
1264 }
1265 r_sign = int_tmp_result_FFWKCAA;
1266 return (Delta_sign * r_sign);
1267}
1268
1269
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]);
1278 double l1;
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]);
1287 double l2;
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]);
1296 double l3;
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]);
1305 double a10;
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]);
1314 double a11;
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]);
1323 double a12;
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)));
1325 double a20;
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)));
1327 double a21;
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)));
1329 double a22;
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)));
1331 double a30;
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)));
1333 double a31;
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)));
1335 double a32;
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)));
1337 double b00;
1338 b00 = ((a11 * a22) - (a12 * a21));
1339 double b01;
1340 b01 = (a21 - a22);
1341 double b02;
1342 b02 = (a12 - a11);
1343 double b10;
1344 b10 = ((a12 * a20) - (a10 * a22));
1345 double b11;
1346 b11 = (a22 - a20);
1347 double b12;
1348 b12 = (a10 - a12);
1349 double b20;
1350 b20 = ((a10 * a21) - (a11 * a20));
1351 double b21;
1352 b21 = (a20 - a21);
1353 double b22;
1354 b22 = (a11 - a10);
1355 double Delta;
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);
1363 double r;
1364 r = ((Delta * l3) - (((a30 * DeltaLambda0) + (a31 * DeltaLambda1)) + (a32 * DeltaLambda2)));
1365 double eps;
1366 double max1 = fabs(p1_1_p0_1);
1367 if( (max1 < fabs(p1_3_p0_3)) )
1368 {
1369 max1 = fabs(p1_3_p0_3);
1370 }
1371 if( (max1 < fabs(p1_5_p0_5)) )
1372 {
1373 max1 = fabs(p1_5_p0_5);
1374 }
1375 if( (max1 < fabs(p1_4_p0_4)) )
1376 {
1377 max1 = fabs(p1_4_p0_4);
1378 }
1379 if( (max1 < fabs(p1_6_p0_6)) )
1380 {
1381 max1 = fabs(p1_6_p0_6);
1382 }
1383 if( (max1 < fabs(p1_2_p0_2)) )
1384 {
1385 max1 = fabs(p1_2_p0_2);
1386 }
1387 if( (max1 < fabs(p1_0_p0_0)) )
1388 {
1389 max1 = fabs(p1_0_p0_0);
1390 }
1391 double max2 = fabs(p2_0_p0_0);
1392 if( (max2 < fabs(p2_1_p0_1)) )
1393 {
1394 max2 = fabs(p2_1_p0_1);
1395 }
1396 if( (max2 < fabs(p2_2_p0_2)) )
1397 {
1398 max2 = fabs(p2_2_p0_2);
1399 }
1400 if( (max2 < fabs(p2_3_p0_3)) )
1401 {
1402 max2 = fabs(p2_3_p0_3);
1403 }
1404 if( (max2 < fabs(p2_4_p0_4)) )
1405 {
1406 max2 = fabs(p2_4_p0_4);
1407 }
1408 if( (max2 < fabs(p2_5_p0_5)) )
1409 {
1410 max2 = fabs(p2_5_p0_5);
1411 }
1412 if( (max2 < fabs(p2_6_p0_6)) )
1413 {
1414 max2 = fabs(p2_6_p0_6);
1415 }
1416 double max3 = fabs(q0_0_p0_0);
1417 if( (max3 < fabs(q0_1_p0_1)) )
1418 {
1419 max3 = fabs(q0_1_p0_1);
1420 }
1421 if( (max3 < fabs(q0_2_p0_2)) )
1422 {
1423 max3 = fabs(q0_2_p0_2);
1424 }
1425 if( (max3 < fabs(q0_3_p0_3)) )
1426 {
1427 max3 = fabs(q0_3_p0_3);
1428 }
1429 if( (max3 < fabs(q0_4_p0_4)) )
1430 {
1431 max3 = fabs(q0_4_p0_4);
1432 }
1433 if( (max3 < fabs(q0_5_p0_5)) )
1434 {
1435 max3 = fabs(q0_5_p0_5);
1436 }
1437 if( (max3 < fabs(q0_6_p0_6)) )
1438 {
1439 max3 = fabs(q0_6_p0_6);
1440 }
1441 if( (max3 < fabs(q1_0_p0_0)) )
1442 {
1443 max3 = fabs(q1_0_p0_0);
1444 }
1445 if( (max3 < fabs(q1_1_p0_1)) )
1446 {
1447 max3 = fabs(q1_1_p0_1);
1448 }
1449 if( (max3 < fabs(q1_2_p0_2)) )
1450 {
1451 max3 = fabs(q1_2_p0_2);
1452 }
1453 if( (max3 < fabs(q1_3_p0_3)) )
1454 {
1455 max3 = fabs(q1_3_p0_3);
1456 }
1457 if( (max3 < fabs(q1_4_p0_4)) )
1458 {
1459 max3 = fabs(q1_4_p0_4);
1460 }
1461 if( (max3 < fabs(q1_5_p0_5)) )
1462 {
1463 max3 = fabs(q1_5_p0_5);
1464 }
1465 if( (max3 < fabs(q1_6_p0_6)) )
1466 {
1467 max3 = fabs(q1_6_p0_6);
1468 }
1469 if( (max3 < fabs(q2_0_p0_0)) )
1470 {
1471 max3 = fabs(q2_0_p0_0);
1472 }
1473 if( (max3 < fabs(q2_1_p0_1)) )
1474 {
1475 max3 = fabs(q2_1_p0_1);
1476 }
1477 if( (max3 < fabs(q2_2_p0_2)) )
1478 {
1479 max3 = fabs(q2_2_p0_2);
1480 }
1481 if( (max3 < fabs(q2_3_p0_3)) )
1482 {
1483 max3 = fabs(q2_3_p0_3);
1484 }
1485 if( (max3 < fabs(q2_4_p0_4)) )
1486 {
1487 max3 = fabs(q2_4_p0_4);
1488 }
1489 if( (max3 < fabs(q2_5_p0_5)) )
1490 {
1491 max3 = fabs(q2_5_p0_5);
1492 }
1493 if( (max3 < fabs(q2_6_p0_6)) )
1494 {
1495 max3 = fabs(q2_6_p0_6);
1496 }
1497 double lower_bound_1;
1498 double upper_bound_1;
1499 int Delta_sign;
1500 int int_tmp_result;
1501 lower_bound_1 = max2;
1502 upper_bound_1 = max2;
1503 if( (max1 < lower_bound_1) )
1504 {
1505 lower_bound_1 = max1;
1506 }
1507 else
1508 {
1509 if( (max1 > upper_bound_1) )
1510 {
1511 upper_bound_1 = max1;
1512 }
1513 }
1514 if( (max3 < lower_bound_1) )
1515 {
1516 lower_bound_1 = max3;
1517 }
1518 else
1519 {
1520 if( (max3 > upper_bound_1) )
1521 {
1522 upper_bound_1 = max3;
1523 }
1524 }
1525 if( (lower_bound_1 < 1.36918881183883509035e-74) )
1526 {
1527 return FPG_UNCERTAIN_VALUE;
1528 }
1529 else
1530 {
1531 if( (upper_bound_1 > 1.29807421463370647479e+33) )
1532 {
1533 return FPG_UNCERTAIN_VALUE;
1534 }
1535 eps = (6.33127335329798996022e-13 * (((max1 * max3) * max2) * max3));
1536 if( (Delta > eps) )
1537 {
1538 int_tmp_result = 1;
1539 }
1540 else
1541 {
1542 if( (Delta < -eps) )
1543 {
1544 int_tmp_result = -1;
1545 }
1546 else
1547 {
1548 return FPG_UNCERTAIN_VALUE;
1549 }
1550 }
1551 }
1552 Delta_sign = int_tmp_result;
1553 double max4;
1554 double max7 = max1;
1555 if( (max7 < max3) )
1556 {
1557 max7 = max3;
1558 }
1559 max4 = max7;
1560 if( (max4 < max2) )
1561 {
1562 max4 = max2;
1563 }
1564 double max5 = max1;
1565 if( (max5 < fabs(p3_0_p0_0)) )
1566 {
1567 max5 = fabs(p3_0_p0_0);
1568 }
1569 if( (max5 < fabs(p3_1_p0_1)) )
1570 {
1571 max5 = fabs(p3_1_p0_1);
1572 }
1573 if( (max5 < fabs(p3_2_p0_2)) )
1574 {
1575 max5 = fabs(p3_2_p0_2);
1576 }
1577 if( (max5 < fabs(p3_3_p0_3)) )
1578 {
1579 max5 = fabs(p3_3_p0_3);
1580 }
1581 if( (max5 < fabs(p3_4_p0_4)) )
1582 {
1583 max5 = fabs(p3_4_p0_4);
1584 }
1585 if( (max5 < fabs(p3_5_p0_5)) )
1586 {
1587 max5 = fabs(p3_5_p0_5);
1588 }
1589 if( (max5 < fabs(p3_6_p0_6)) )
1590 {
1591 max5 = fabs(p3_6_p0_6);
1592 }
1593 if( (max4 < max5) )
1594 {
1595 max4 = max5;
1596 }
1597 if( (max4 < max1) )
1598 {
1599 max4 = max1;
1600 }
1601 if( (max4 < max3) )
1602 {
1603 max4 = max3;
1604 }
1605 double max6 = max7;
1606 if( (max6 < max5) )
1607 {
1608 max6 = max5;
1609 }
1610 if( (max6 < max1) )
1611 {
1612 max6 = max1;
1613 }
1614 if( (max6 < max3) )
1615 {
1616 max6 = max3;
1617 }
1618 if( (max4 < max6) )
1619 {
1620 max4 = max6;
1621 }
1622 int r_sign;
1623 int int_tmp_result_FFWKCAA;
1624 lower_bound_1 = max7;
1625 upper_bound_1 = max7;
1626 if( (max2 < lower_bound_1) )
1627 {
1628 lower_bound_1 = max2;
1629 }
1630 if( (max5 < lower_bound_1) )
1631 {
1632 lower_bound_1 = max5;
1633 }
1634 if( (max4 < lower_bound_1) )
1635 {
1636 lower_bound_1 = max4;
1637 }
1638 else
1639 {
1640 if( (max4 > upper_bound_1) )
1641 {
1642 upper_bound_1 = max4;
1643 }
1644 }
1645 if( (max3 < lower_bound_1) )
1646 {
1647 lower_bound_1 = max3;
1648 }
1649 if( (max6 < lower_bound_1) )
1650 {
1651 lower_bound_1 = max6;
1652 }
1653 if( (lower_bound_1 < 3.04548303565602498901e-50) )
1654 {
1655 return FPG_UNCERTAIN_VALUE;
1656 }
1657 else
1658 {
1659 if( (upper_bound_1 > 1.29807421463370647479e+33) )
1660 {
1661 return FPG_UNCERTAIN_VALUE;
1662 }
1663 eps = (2.78873548804336160566e-11 * (((((max5 * max3) * max2) * max7) * max6) * max4));
1664 if( (r > eps) )
1665 {
1666 int_tmp_result_FFWKCAA = 1;
1667 }
1668 else
1669 {
1670 if( (r < -eps) )
1671 {
1672 int_tmp_result_FFWKCAA = -1;
1673 }
1674 else
1675 {
1676 return FPG_UNCERTAIN_VALUE;
1677 }
1678 }
1679 }
1680 r_sign = int_tmp_result_FFWKCAA;
1681 return (Delta_sign * r_sign);
1682}
1683
1684
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]);
1694 double l1;
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]);
1704 double l2;
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]);
1714 double l3;
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]);
1724 double a10;
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]);
1734 double a11;
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]);
1744 double a12;
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)));
1746 double a20;
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)));
1748 double a21;
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)));
1750 double a22;
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)));
1752 double a30;
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)));
1754 double a31;
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)));
1756 double a32;
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)));
1758 double b00;
1759 b00 = ((a11 * a22) - (a12 * a21));
1760 double b01;
1761 b01 = (a21 - a22);
1762 double b02;
1763 b02 = (a12 - a11);
1764 double b10;
1765 b10 = ((a12 * a20) - (a10 * a22));
1766 double b11;
1767 b11 = (a22 - a20);
1768 double b12;
1769 b12 = (a10 - a12);
1770 double b20;
1771 b20 = ((a10 * a21) - (a11 * a20));
1772 double b21;
1773 b21 = (a20 - a21);
1774 double b22;
1775 b22 = (a11 - a10);
1776 double Delta;
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);
1784 double r;
1785 r = ((Delta * l3) - (((a30 * DeltaLambda0) + (a31 * DeltaLambda1)) + (a32 * DeltaLambda2)));
1786 double eps;
1787 double max1 = fabs(p2_1_p0_1);
1788 if( (max1 < fabs(p2_0_p0_0)) )
1789 {
1790 max1 = fabs(p2_0_p0_0);
1791 }
1792 if( (max1 < fabs(p2_3_p0_3)) )
1793 {
1794 max1 = fabs(p2_3_p0_3);
1795 }
1796 if( (max1 < fabs(p2_2_p0_2)) )
1797 {
1798 max1 = fabs(p2_2_p0_2);
1799 }
1800 if( (max1 < fabs(p2_4_p0_4)) )
1801 {
1802 max1 = fabs(p2_4_p0_4);
1803 }
1804 if( (max1 < fabs(p2_7_p0_7)) )
1805 {
1806 max1 = fabs(p2_7_p0_7);
1807 }
1808 if( (max1 < fabs(p2_5_p0_5)) )
1809 {
1810 max1 = fabs(p2_5_p0_5);
1811 }
1812 if( (max1 < fabs(p2_6_p0_6)) )
1813 {
1814 max1 = fabs(p2_6_p0_6);
1815 }
1816 double max2 = fabs(p1_4_p0_4);
1817 if( (max2 < fabs(p1_1_p0_1)) )
1818 {
1819 max2 = fabs(p1_1_p0_1);
1820 }
1821 if( (max2 < fabs(p1_0_p0_0)) )
1822 {
1823 max2 = fabs(p1_0_p0_0);
1824 }
1825 if( (max2 < fabs(p1_3_p0_3)) )
1826 {
1827 max2 = fabs(p1_3_p0_3);
1828 }
1829 if( (max2 < fabs(p1_2_p0_2)) )
1830 {
1831 max2 = fabs(p1_2_p0_2);
1832 }
1833 if( (max2 < fabs(p1_5_p0_5)) )
1834 {
1835 max2 = fabs(p1_5_p0_5);
1836 }
1837 if( (max2 < fabs(p1_6_p0_6)) )
1838 {
1839 max2 = fabs(p1_6_p0_6);
1840 }
1841 if( (max2 < fabs(p1_7_p0_7)) )
1842 {
1843 max2 = fabs(p1_7_p0_7);
1844 }
1845 double max3 = fabs(q0_0_p0_0);
1846 if( (max3 < fabs(q0_1_p0_1)) )
1847 {
1848 max3 = fabs(q0_1_p0_1);
1849 }
1850 if( (max3 < fabs(q0_2_p0_2)) )
1851 {
1852 max3 = fabs(q0_2_p0_2);
1853 }
1854 if( (max3 < fabs(q0_3_p0_3)) )
1855 {
1856 max3 = fabs(q0_3_p0_3);
1857 }
1858 if( (max3 < fabs(q0_4_p0_4)) )
1859 {
1860 max3 = fabs(q0_4_p0_4);
1861 }
1862 if( (max3 < fabs(q0_5_p0_5)) )
1863 {
1864 max3 = fabs(q0_5_p0_5);
1865 }
1866 if( (max3 < fabs(q0_6_p0_6)) )
1867 {
1868 max3 = fabs(q0_6_p0_6);
1869 }
1870 if( (max3 < fabs(q0_7_p0_7)) )
1871 {
1872 max3 = fabs(q0_7_p0_7);
1873 }
1874 if( (max3 < fabs(q1_0_p0_0)) )
1875 {
1876 max3 = fabs(q1_0_p0_0);
1877 }
1878 if( (max3 < fabs(q1_1_p0_1)) )
1879 {
1880 max3 = fabs(q1_1_p0_1);
1881 }
1882 if( (max3 < fabs(q1_2_p0_2)) )
1883 {
1884 max3 = fabs(q1_2_p0_2);
1885 }
1886 if( (max3 < fabs(q1_3_p0_3)) )
1887 {
1888 max3 = fabs(q1_3_p0_3);
1889 }
1890 if( (max3 < fabs(q1_4_p0_4)) )
1891 {
1892 max3 = fabs(q1_4_p0_4);
1893 }
1894 if( (max3 < fabs(q1_5_p0_5)) )
1895 {
1896 max3 = fabs(q1_5_p0_5);
1897 }
1898 if( (max3 < fabs(q1_6_p0_6)) )
1899 {
1900 max3 = fabs(q1_6_p0_6);
1901 }
1902 if( (max3 < fabs(q1_7_p0_7)) )
1903 {
1904 max3 = fabs(q1_7_p0_7);
1905 }
1906 if( (max3 < fabs(q2_0_p0_0)) )
1907 {
1908 max3 = fabs(q2_0_p0_0);
1909 }
1910 if( (max3 < fabs(q2_1_p0_1)) )
1911 {
1912 max3 = fabs(q2_1_p0_1);
1913 }
1914 if( (max3 < fabs(q2_2_p0_2)) )
1915 {
1916 max3 = fabs(q2_2_p0_2);
1917 }
1918 if( (max3 < fabs(q2_3_p0_3)) )
1919 {
1920 max3 = fabs(q2_3_p0_3);
1921 }
1922 if( (max3 < fabs(q2_4_p0_4)) )
1923 {
1924 max3 = fabs(q2_4_p0_4);
1925 }
1926 if( (max3 < fabs(q2_5_p0_5)) )
1927 {
1928 max3 = fabs(q2_5_p0_5);
1929 }
1930 if( (max3 < fabs(q2_6_p0_6)) )
1931 {
1932 max3 = fabs(q2_6_p0_6);
1933 }
1934 if( (max3 < fabs(q2_7_p0_7)) )
1935 {
1936 max3 = fabs(q2_7_p0_7);
1937 }
1938 double lower_bound_1;
1939 double upper_bound_1;
1940 int Delta_sign;
1941 int int_tmp_result;
1942 lower_bound_1 = max1;
1943 upper_bound_1 = max1;
1944 if( (max2 < lower_bound_1) )
1945 {
1946 lower_bound_1 = max2;
1947 }
1948 else
1949 {
1950 if( (max2 > upper_bound_1) )
1951 {
1952 upper_bound_1 = max2;
1953 }
1954 }
1955 if( (max3 < lower_bound_1) )
1956 {
1957 lower_bound_1 = max3;
1958 }
1959 else
1960 {
1961 if( (max3 > upper_bound_1) )
1962 {
1963 upper_bound_1 = max3;
1964 }
1965 }
1966 if( (lower_bound_1 < 1.26419510663115923609e-74) )
1967 {
1968 return FPG_UNCERTAIN_VALUE;
1969 }
1970 else
1971 {
1972 if( (upper_bound_1 > 1.29807421463370647479e+33) )
1973 {
1974 return FPG_UNCERTAIN_VALUE;
1975 }
1976 eps = (8.71140112255785451890e-13 * (((max2 * max3) * max1) * max3));
1977 if( (Delta > eps) )
1978 {
1979 int_tmp_result = 1;
1980 }
1981 else
1982 {
1983 if( (Delta < -eps) )
1984 {
1985 int_tmp_result = -1;
1986 }
1987 else
1988 {
1989 return FPG_UNCERTAIN_VALUE;
1990 }
1991 }
1992 }
1993 Delta_sign = int_tmp_result;
1994 double max4 = max1;
1995 if( (max4 < max2) )
1996 {
1997 max4 = max2;
1998 }
1999 if( (max4 < max3) )
2000 {
2001 max4 = max3;
2002 }
2003 double max5 = max2;
2004 if( (max5 < fabs(p3_0_p0_0)) )
2005 {
2006 max5 = fabs(p3_0_p0_0);
2007 }
2008 if( (max5 < fabs(p3_1_p0_1)) )
2009 {
2010 max5 = fabs(p3_1_p0_1);
2011 }
2012 if( (max5 < fabs(p3_2_p0_2)) )
2013 {
2014 max5 = fabs(p3_2_p0_2);
2015 }
2016 if( (max5 < fabs(p3_3_p0_3)) )
2017 {
2018 max5 = fabs(p3_3_p0_3);
2019 }
2020 if( (max5 < fabs(p3_4_p0_4)) )
2021 {
2022 max5 = fabs(p3_4_p0_4);
2023 }
2024 if( (max5 < fabs(p3_5_p0_5)) )
2025 {
2026 max5 = fabs(p3_5_p0_5);
2027 }
2028 if( (max5 < fabs(p3_6_p0_6)) )
2029 {
2030 max5 = fabs(p3_6_p0_6);
2031 }
2032 if( (max5 < fabs(p3_7_p0_7)) )
2033 {
2034 max5 = fabs(p3_7_p0_7);
2035 }
2036 if( (max4 < max5) )
2037 {
2038 max4 = max5;
2039 }
2040 double max6 = max2;
2041 if( (max6 < max3) )
2042 {
2043 max6 = max3;
2044 }
2045 if( (max6 < max5) )
2046 {
2047 max6 = max5;
2048 }
2049 double max7 = max2;
2050 if( (max7 < max3) )
2051 {
2052 max7 = max3;
2053 }
2054 if( (max6 < max7) )
2055 {
2056 max6 = max7;
2057 }
2058 if( (max4 < max6) )
2059 {
2060 max4 = max6;
2061 }
2062 if( (max4 < max7) )
2063 {
2064 max4 = max7;
2065 }
2066 int r_sign;
2067 int int_tmp_result_FFWKCAA;
2068 lower_bound_1 = max1;
2069 upper_bound_1 = max1;
2070 if( (max3 < lower_bound_1) )
2071 {
2072 lower_bound_1 = max3;
2073 }
2074 if( (max4 < lower_bound_1) )
2075 {
2076 lower_bound_1 = max4;
2077 }
2078 else
2079 {
2080 if( (max4 > upper_bound_1) )
2081 {
2082 upper_bound_1 = max4;
2083 }
2084 }
2085 if( (max5 < lower_bound_1) )
2086 {
2087 lower_bound_1 = max5;
2088 }
2089 if( (max6 < lower_bound_1) )
2090 {
2091 lower_bound_1 = max6;
2092 }
2093 if( (max7 < lower_bound_1) )
2094 {
2095 lower_bound_1 = max7;
2096 }
2097 if( (lower_bound_1 < 2.82528483194754087282e-50) )
2098 {
2099 return FPG_UNCERTAIN_VALUE;
2100 }
2101 else
2102 {
2103 if( (upper_bound_1 > 1.29807421463370647479e+33) )
2104 {
2105 return FPG_UNCERTAIN_VALUE;
2106 }
2107 eps = (4.37492894694731169807e-11 * (((((max5 * max3) * max1) * max7) * max6) * max4));
2108 if( (r > eps) )
2109 {
2110 int_tmp_result_FFWKCAA = 1;
2111 }
2112 else
2113 {
2114 if( (r < -eps) )
2115 {
2116 int_tmp_result_FFWKCAA = -1;
2117 }
2118 else
2119 {
2120 return FPG_UNCERTAIN_VALUE;
2121 }
2122 }
2123 }
2124 r_sign = int_tmp_result_FFWKCAA;
2125 return (Delta_sign * r_sign);
2126}