1 /* Automatically generated code, do not edit */
2 /* Generated from source file: dot_compare_3d.pck */
3 
dot_compare_3d_filter(const double * p0,const double * p1,const double * p2)4 inline int dot_compare_3d_filter( const double* p0, const double* p1, const double* p2) {
5     double d1;
6     d1 = (((p0[0] * p1[0]) + (p0[1] * p1[1])) + (p0[2] * p1[2]));
7     double d2;
8     d2 = (((p0[0] * p2[0]) + (p0[1] * p2[1])) + (p0[2] * p2[2]));
9     int int_tmp_result;
10     double double_tmp_result;
11     double eps;
12     double_tmp_result = (d1 - d2);
13     double max1 = fabs(p0[0]);
14     if( (max1 < fabs(p0[1])) )
15     {
16         max1 = fabs(p0[1]);
17     }
18     if( (max1 < fabs(p0[2])) )
19     {
20         max1 = fabs(p0[2]);
21     }
22     double max2 = fabs(p1[0]);
23     if( (max2 < fabs(p1[1])) )
24     {
25         max2 = fabs(p1[1]);
26     }
27     if( (max2 < fabs(p1[2])) )
28     {
29         max2 = fabs(p1[2]);
30     }
31     if( (max2 < fabs(p2[0])) )
32     {
33         max2 = fabs(p2[0]);
34     }
35     if( (max2 < fabs(p2[1])) )
36     {
37         max2 = fabs(p2[1]);
38     }
39     if( (max2 < fabs(p2[2])) )
40     {
41         max2 = fabs(p2[2]);
42     }
43     double lower_bound_1;
44     double upper_bound_1;
45     lower_bound_1 = max1;
46     upper_bound_1 = max1;
47     if( (max2 < lower_bound_1) )
48     {
49         lower_bound_1 = max2;
50     }
51     else
52     {
53         if( (max2 > upper_bound_1) )
54         {
55             upper_bound_1 = max2;
56         }
57     }
58     if( (lower_bound_1 < 3.01698158319050667656e-147) )
59     {
60         return FPG_UNCERTAIN_VALUE;
61     }
62     else
63     {
64         if( (upper_bound_1 > 1.67597599124282407923e+153) )
65         {
66             return FPG_UNCERTAIN_VALUE;
67         }
68         eps = (2.44455106181954323552e-15 * (max1 * max2));
69         if( (double_tmp_result > eps) )
70         {
71             int_tmp_result = 1;
72         }
73         else
74         {
75             if( (double_tmp_result < -eps) )
76             {
77                 int_tmp_result = -1;
78             }
79             else
80             {
81                 return FPG_UNCERTAIN_VALUE;
82             }
83         }
84     }
85     return int_tmp_result;
86 }
87 
88