| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /* Automatically generated code, do not edit */ | ||
| 2 | /* Generated from source file: side3_2dlifted.pck */ | ||
| 3 | |||
| 4 | ✗ | inline int side3_2dlifted_2d_filter( const double* p0, const double* p1, const double* p2, const double* p3, double h0, double h1, double h2, double h3) { | |
| 5 | double a11; | ||
| 6 | ✗ | a11 = (p1[0] - p0[0]); | |
| 7 | double a12; | ||
| 8 | ✗ | a12 = (p1[1] - p0[1]); | |
| 9 | double a13; | ||
| 10 | ✗ | a13 = (h0 - h1); | |
| 11 | double a21; | ||
| 12 | ✗ | a21 = (p2[0] - p0[0]); | |
| 13 | double a22; | ||
| 14 | ✗ | a22 = (p2[1] - p0[1]); | |
| 15 | double a23; | ||
| 16 | ✗ | a23 = (h0 - h2); | |
| 17 | double a31; | ||
| 18 | ✗ | a31 = (p3[0] - p0[0]); | |
| 19 | double a32; | ||
| 20 | ✗ | a32 = (p3[1] - p0[1]); | |
| 21 | double a33; | ||
| 22 | ✗ | a33 = (h0 - h3); | |
| 23 | double Delta1; | ||
| 24 | ✗ | Delta1 = ((a21 * a32) - (a22 * a31)); | |
| 25 | double Delta2; | ||
| 26 | ✗ | Delta2 = ((a11 * a32) - (a12 * a31)); | |
| 27 | double Delta3; | ||
| 28 | ✗ | Delta3 = ((a11 * a22) - (a12 * a21)); | |
| 29 | double r; | ||
| 30 | ✗ | r = (((Delta1 * a13) - (Delta2 * a23)) + (Delta3 * a33)); | |
| 31 | double eps; | ||
| 32 | ✗ | double max1 = fabs(a11); | |
| 33 | ✗ | if( (max1 < fabs(a12)) ) | |
| 34 | { | ||
| 35 | ✗ | max1 = fabs(a12); | |
| 36 | } | ||
| 37 | ✗ | double max2 = fabs(a21); | |
| 38 | ✗ | if( (max2 < fabs(a22)) ) | |
| 39 | { | ||
| 40 | ✗ | max2 = fabs(a22); | |
| 41 | } | ||
| 42 | double lower_bound_1; | ||
| 43 | double upper_bound_1; | ||
| 44 | int Delta3_sign; | ||
| 45 | int int_tmp_result; | ||
| 46 | ✗ | lower_bound_1 = max1; | |
| 47 | ✗ | upper_bound_1 = max1; | |
| 48 | ✗ | if( (max2 < lower_bound_1) ) | |
| 49 | { | ||
| 50 | ✗ | lower_bound_1 = max2; | |
| 51 | } | ||
| 52 | else | ||
| 53 | { | ||
| 54 | ✗ | if( (max2 > upper_bound_1) ) | |
| 55 | { | ||
| 56 | ✗ | upper_bound_1 = max2; | |
| 57 | } | ||
| 58 | } | ||
| 59 | ✗ | if( (lower_bound_1 < 5.00368081960964635413e-147) ) | |
| 60 | { | ||
| 61 | ✗ | return FPG_UNCERTAIN_VALUE; | |
| 62 | } | ||
| 63 | else | ||
| 64 | { | ||
| 65 | ✗ | if( (upper_bound_1 > 5.59936185544450928309e+101) ) | |
| 66 | { | ||
| 67 | ✗ | return FPG_UNCERTAIN_VALUE; | |
| 68 | } | ||
| 69 | ✗ | eps = (8.88720573725927976811e-16 * (max1 * max2)); | |
| 70 | ✗ | if( (Delta3 > eps) ) | |
| 71 | { | ||
| 72 | ✗ | int_tmp_result = 1; | |
| 73 | } | ||
| 74 | else | ||
| 75 | { | ||
| 76 | ✗ | if( (Delta3 < -eps) ) | |
| 77 | { | ||
| 78 | ✗ | int_tmp_result = -1; | |
| 79 | } | ||
| 80 | else | ||
| 81 | { | ||
| 82 | ✗ | return FPG_UNCERTAIN_VALUE; | |
| 83 | } | ||
| 84 | } | ||
| 85 | } | ||
| 86 | ✗ | Delta3_sign = int_tmp_result; | |
| 87 | int int_tmp_result_FFWKCAA; | ||
| 88 | ✗ | double max3 = max1; | |
| 89 | ✗ | if( (max3 < max2) ) | |
| 90 | { | ||
| 91 | ✗ | max3 = max2; | |
| 92 | } | ||
| 93 | ✗ | double max4 = fabs(a13); | |
| 94 | ✗ | if( (max4 < fabs(a23)) ) | |
| 95 | { | ||
| 96 | ✗ | max4 = fabs(a23); | |
| 97 | } | ||
| 98 | ✗ | if( (max4 < fabs(a33)) ) | |
| 99 | { | ||
| 100 | ✗ | max4 = fabs(a33); | |
| 101 | } | ||
| 102 | ✗ | double max5 = max2; | |
| 103 | ✗ | if( (max5 < fabs(a31)) ) | |
| 104 | { | ||
| 105 | ✗ | max5 = fabs(a31); | |
| 106 | } | ||
| 107 | ✗ | if( (max5 < fabs(a32)) ) | |
| 108 | { | ||
| 109 | ✗ | max5 = fabs(a32); | |
| 110 | } | ||
| 111 | ✗ | lower_bound_1 = max3; | |
| 112 | ✗ | upper_bound_1 = max3; | |
| 113 | ✗ | if( (max5 < lower_bound_1) ) | |
| 114 | { | ||
| 115 | ✗ | lower_bound_1 = max5; | |
| 116 | } | ||
| 117 | else | ||
| 118 | { | ||
| 119 | ✗ | if( (max5 > upper_bound_1) ) | |
| 120 | { | ||
| 121 | ✗ | upper_bound_1 = max5; | |
| 122 | } | ||
| 123 | } | ||
| 124 | ✗ | if( (max4 < lower_bound_1) ) | |
| 125 | { | ||
| 126 | ✗ | lower_bound_1 = max4; | |
| 127 | } | ||
| 128 | else | ||
| 129 | { | ||
| 130 | ✗ | if( (max4 > upper_bound_1) ) | |
| 131 | { | ||
| 132 | ✗ | upper_bound_1 = max4; | |
| 133 | } | ||
| 134 | } | ||
| 135 | ✗ | if( (lower_bound_1 < 1.63288018496748314939e-98) ) | |
| 136 | { | ||
| 137 | ✗ | return FPG_UNCERTAIN_VALUE; | |
| 138 | } | ||
| 139 | else | ||
| 140 | { | ||
| 141 | ✗ | if( (upper_bound_1 > 5.59936185544450928309e+101) ) | |
| 142 | { | ||
| 143 | ✗ | return FPG_UNCERTAIN_VALUE; | |
| 144 | } | ||
| 145 | ✗ | eps = (5.11071278299732992696e-15 * ((max3 * max5) * max4)); | |
| 146 | ✗ | if( (r > eps) ) | |
| 147 | { | ||
| 148 | ✗ | int_tmp_result_FFWKCAA = 1; | |
| 149 | } | ||
| 150 | else | ||
| 151 | { | ||
| 152 | ✗ | if( (r < -eps) ) | |
| 153 | { | ||
| 154 | ✗ | int_tmp_result_FFWKCAA = -1; | |
| 155 | } | ||
| 156 | else | ||
| 157 | { | ||
| 158 | ✗ | return FPG_UNCERTAIN_VALUE; | |
| 159 | } | ||
| 160 | } | ||
| 161 | } | ||
| 162 | ✗ | return (Delta3_sign * int_tmp_result_FFWKCAA); | |
| 163 | } | ||
| 164 |