| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /* Automatically generated code, do not edit */ | ||
| 2 | /* Generated from source file: side4h.pck */ | ||
| 3 | |||
| 4 | 210595 | inline int side4h_3d_filter( const double* p0, const double* p1, const double* p2, const double* p3, const double* p4, double h0, double h1, double h2, double h3, double h4) { | |
| 5 | double a11; | ||
| 6 | 210595 | a11 = (p1[0] - p0[0]); | |
| 7 | double a12; | ||
| 8 | 210595 | a12 = (p1[1] - p0[1]); | |
| 9 | double a13; | ||
| 10 | 210595 | a13 = (p1[2] - p0[2]); | |
| 11 | double a14; | ||
| 12 | 210595 | a14 = (h0 - h1); | |
| 13 | double a21; | ||
| 14 | 210595 | a21 = (p2[0] - p0[0]); | |
| 15 | double a22; | ||
| 16 | 210595 | a22 = (p2[1] - p0[1]); | |
| 17 | double a23; | ||
| 18 | 210595 | a23 = (p2[2] - p0[2]); | |
| 19 | double a24; | ||
| 20 | 210595 | a24 = (h0 - h2); | |
| 21 | double a31; | ||
| 22 | 210595 | a31 = (p3[0] - p0[0]); | |
| 23 | double a32; | ||
| 24 | 210595 | a32 = (p3[1] - p0[1]); | |
| 25 | double a33; | ||
| 26 | 210595 | a33 = (p3[2] - p0[2]); | |
| 27 | double a34; | ||
| 28 | 210595 | a34 = (h0 - h3); | |
| 29 | double a41; | ||
| 30 | 210595 | a41 = (p4[0] - p0[0]); | |
| 31 | double a42; | ||
| 32 | 210595 | a42 = (p4[1] - p0[1]); | |
| 33 | double a43; | ||
| 34 | 210595 | a43 = (p4[2] - p0[2]); | |
| 35 | double a44; | ||
| 36 | 210595 | a44 = (h0 - h4); | |
| 37 | double Delta1; | ||
| 38 | 210595 | Delta1 = (((a21 * ((a32 * a43) - (a33 * a42))) - (a31 * ((a22 * a43) - (a23 * a42)))) + (a41 * ((a22 * a33) - (a23 * a32)))); | |
| 39 | double Delta2; | ||
| 40 | 210595 | Delta2 = (((a11 * ((a32 * a43) - (a33 * a42))) - (a31 * ((a12 * a43) - (a13 * a42)))) + (a41 * ((a12 * a33) - (a13 * a32)))); | |
| 41 | double Delta3; | ||
| 42 | 210595 | Delta3 = (((a11 * ((a22 * a43) - (a23 * a42))) - (a21 * ((a12 * a43) - (a13 * a42)))) + (a41 * ((a12 * a23) - (a13 * a22)))); | |
| 43 | double Delta4; | ||
| 44 | 210595 | Delta4 = (((a11 * ((a22 * a33) - (a23 * a32))) - (a21 * ((a12 * a33) - (a13 * a32)))) + (a31 * ((a12 * a23) - (a13 * a22)))); | |
| 45 | double r; | ||
| 46 | 210595 | r = ((((Delta1 * a14) - (Delta2 * a24)) + (Delta3 * a34)) - (Delta4 * a44)); | |
| 47 | double eps; | ||
| 48 | 210595 | double max1 = fabs(a11); | |
| 49 |
2/2✓ Branch 0 taken 82520 times.
✓ Branch 1 taken 128075 times.
|
210595 | if( (max1 < fabs(a21)) ) |
| 50 | { | ||
| 51 | 82520 | max1 = fabs(a21); | |
| 52 | } | ||
| 53 |
2/2✓ Branch 0 taken 56093 times.
✓ Branch 1 taken 154502 times.
|
210595 | if( (max1 < fabs(a31)) ) |
| 54 | { | ||
| 55 | 56093 | max1 = fabs(a31); | |
| 56 | } | ||
| 57 | 210595 | double max2 = fabs(a12); | |
| 58 |
2/2✓ Branch 0 taken 105903 times.
✓ Branch 1 taken 104692 times.
|
210595 | if( (max2 < fabs(a13)) ) |
| 59 | { | ||
| 60 | 105903 | max2 = fabs(a13); | |
| 61 | } | ||
| 62 |
2/2✓ Branch 0 taken 61071 times.
✓ Branch 1 taken 149524 times.
|
210595 | if( (max2 < fabs(a22)) ) |
| 63 | { | ||
| 64 | 61071 | max2 = fabs(a22); | |
| 65 | } | ||
| 66 |
2/2✓ Branch 0 taken 37362 times.
✓ Branch 1 taken 173233 times.
|
210595 | if( (max2 < fabs(a23)) ) |
| 67 | { | ||
| 68 | 37362 | max2 = fabs(a23); | |
| 69 | } | ||
| 70 | 210595 | double max3 = fabs(a22); | |
| 71 |
2/2✓ Branch 0 taken 110298 times.
✓ Branch 1 taken 100297 times.
|
210595 | if( (max3 < fabs(a23)) ) |
| 72 | { | ||
| 73 | 110298 | max3 = fabs(a23); | |
| 74 | } | ||
| 75 |
2/2✓ Branch 0 taken 72349 times.
✓ Branch 1 taken 138246 times.
|
210595 | if( (max3 < fabs(a32)) ) |
| 76 | { | ||
| 77 | 72349 | max3 = fabs(a32); | |
| 78 | } | ||
| 79 |
2/2✓ Branch 0 taken 46030 times.
✓ Branch 1 taken 164565 times.
|
210595 | if( (max3 < fabs(a33)) ) |
| 80 | { | ||
| 81 | 46030 | max3 = fabs(a33); | |
| 82 | } | ||
| 83 | double lower_bound_1; | ||
| 84 | double upper_bound_1; | ||
| 85 | int Delta4_sign; | ||
| 86 | int int_tmp_result; | ||
| 87 | 210595 | lower_bound_1 = max1; | |
| 88 | 210595 | upper_bound_1 = max1; | |
| 89 |
2/2✓ Branch 0 taken 81369 times.
✓ Branch 1 taken 129226 times.
|
210595 | if( (max2 < lower_bound_1) ) |
| 90 | { | ||
| 91 | 81369 | lower_bound_1 = max2; | |
| 92 | } | ||
| 93 | else | ||
| 94 | { | ||
| 95 |
2/2✓ Branch 0 taken 128368 times.
✓ Branch 1 taken 858 times.
|
129226 | if( (max2 > upper_bound_1) ) |
| 96 | { | ||
| 97 | 128368 | upper_bound_1 = max2; | |
| 98 | } | ||
| 99 | } | ||
| 100 |
2/2✓ Branch 0 taken 35197 times.
✓ Branch 1 taken 175398 times.
|
210595 | if( (max3 < lower_bound_1) ) |
| 101 | { | ||
| 102 | 35197 | lower_bound_1 = max3; | |
| 103 | } | ||
| 104 | else | ||
| 105 | { | ||
| 106 |
2/2✓ Branch 0 taken 33384 times.
✓ Branch 1 taken 142014 times.
|
175398 | if( (max3 > upper_bound_1) ) |
| 107 | { | ||
| 108 | 33384 | upper_bound_1 = max3; | |
| 109 | } | ||
| 110 | } | ||
| 111 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 210595 times.
|
210595 | if( (lower_bound_1 < 1.63288018496748314939e-98) ) |
| 112 | { | ||
| 113 | ✗ | return FPG_UNCERTAIN_VALUE; | |
| 114 | } | ||
| 115 | else | ||
| 116 | { | ||
| 117 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 210595 times.
|
210595 | if( (upper_bound_1 > 7.23700557733225980357e+75) ) |
| 118 | { | ||
| 119 | ✗ | return FPG_UNCERTAIN_VALUE; | |
| 120 | } | ||
| 121 | 210595 | eps = (5.11071278299732992696e-15 * ((max2 * max3) * max1)); | |
| 122 |
1/2✓ Branch 0 taken 210595 times.
✗ Branch 1 not taken.
|
210595 | if( (Delta4 > eps) ) |
| 123 | { | ||
| 124 | 210595 | int_tmp_result = 1; | |
| 125 | } | ||
| 126 | else | ||
| 127 | { | ||
| 128 | ✗ | if( (Delta4 < -eps) ) | |
| 129 | { | ||
| 130 | ✗ | int_tmp_result = -1; | |
| 131 | } | ||
| 132 | else | ||
| 133 | { | ||
| 134 | ✗ | return FPG_UNCERTAIN_VALUE; | |
| 135 | } | ||
| 136 | } | ||
| 137 | } | ||
| 138 | 210595 | Delta4_sign = int_tmp_result; | |
| 139 | int int_tmp_result_FFWKCAA; | ||
| 140 | 210595 | double max4 = max1; | |
| 141 |
2/2✓ Branch 0 taken 28896 times.
✓ Branch 1 taken 181699 times.
|
210595 | if( (max4 < fabs(a41)) ) |
| 142 | { | ||
| 143 | 28896 | max4 = fabs(a41); | |
| 144 | } | ||
| 145 | 210595 | double max5 = max2; | |
| 146 |
2/2✓ Branch 0 taken 54398 times.
✓ Branch 1 taken 156197 times.
|
210595 | if( (max5 < max3) ) |
| 147 | { | ||
| 148 | 54398 | max5 = max3; | |
| 149 | } | ||
| 150 | 210595 | double max6 = fabs(a14); | |
| 151 |
2/2✓ Branch 0 taken 100900 times.
✓ Branch 1 taken 109695 times.
|
210595 | if( (max6 < fabs(a24)) ) |
| 152 | { | ||
| 153 | 100900 | max6 = fabs(a24); | |
| 154 | } | ||
| 155 |
2/2✓ Branch 0 taken 74024 times.
✓ Branch 1 taken 136571 times.
|
210595 | if( (max6 < fabs(a34)) ) |
| 156 | { | ||
| 157 | 74024 | max6 = fabs(a34); | |
| 158 | } | ||
| 159 |
2/2✓ Branch 0 taken 34852 times.
✓ Branch 1 taken 175743 times.
|
210595 | if( (max6 < fabs(a44)) ) |
| 160 | { | ||
| 161 | 34852 | max6 = fabs(a44); | |
| 162 | } | ||
| 163 | 210595 | double max7 = max3; | |
| 164 |
2/2✓ Branch 0 taken 22900 times.
✓ Branch 1 taken 187695 times.
|
210595 | if( (max7 < fabs(a42)) ) |
| 165 | { | ||
| 166 | 22900 | max7 = fabs(a42); | |
| 167 | } | ||
| 168 |
2/2✓ Branch 0 taken 15824 times.
✓ Branch 1 taken 194771 times.
|
210595 | if( (max7 < fabs(a43)) ) |
| 169 | { | ||
| 170 | 15824 | max7 = fabs(a43); | |
| 171 | } | ||
| 172 | 210595 | lower_bound_1 = max4; | |
| 173 | 210595 | upper_bound_1 = max4; | |
| 174 |
2/2✓ Branch 0 taken 71685 times.
✓ Branch 1 taken 138910 times.
|
210595 | if( (max5 < lower_bound_1) ) |
| 175 | { | ||
| 176 | 71685 | lower_bound_1 = max5; | |
| 177 | } | ||
| 178 | else | ||
| 179 | { | ||
| 180 |
2/2✓ Branch 0 taken 137766 times.
✓ Branch 1 taken 1144 times.
|
138910 | if( (max5 > upper_bound_1) ) |
| 181 | { | ||
| 182 | 137766 | upper_bound_1 = max5; | |
| 183 | } | ||
| 184 | } | ||
| 185 |
2/2✓ Branch 0 taken 10365 times.
✓ Branch 1 taken 200230 times.
|
210595 | if( (max6 < lower_bound_1) ) |
| 186 | { | ||
| 187 | 10365 | lower_bound_1 = max6; | |
| 188 | } | ||
| 189 | else | ||
| 190 | { | ||
| 191 |
2/2✓ Branch 0 taken 165334 times.
✓ Branch 1 taken 34896 times.
|
200230 | if( (max6 > upper_bound_1) ) |
| 192 | { | ||
| 193 | 165334 | upper_bound_1 = max6; | |
| 194 | } | ||
| 195 | } | ||
| 196 |
2/2✓ Branch 0 taken 25305 times.
✓ Branch 1 taken 185290 times.
|
210595 | if( (max7 < lower_bound_1) ) |
| 197 | { | ||
| 198 | 25305 | lower_bound_1 = max7; | |
| 199 | } | ||
| 200 | else | ||
| 201 | { | ||
| 202 |
2/2✓ Branch 0 taken 3183 times.
✓ Branch 1 taken 182107 times.
|
185290 | if( (max7 > upper_bound_1) ) |
| 203 | { | ||
| 204 | 3183 | upper_bound_1 = max7; | |
| 205 | } | ||
| 206 | } | ||
| 207 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 210595 times.
|
210595 | if( (lower_bound_1 < 2.89273249588395194294e-74) ) |
| 208 | { | ||
| 209 | ✗ | return FPG_UNCERTAIN_VALUE; | |
| 210 | } | ||
| 211 | else | ||
| 212 | { | ||
| 213 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 210595 times.
|
210595 | if( (upper_bound_1 > 7.23700557733225980357e+75) ) |
| 214 | { | ||
| 215 | ✗ | return FPG_UNCERTAIN_VALUE; | |
| 216 | } | ||
| 217 | 210595 | eps = (3.17768858673611390687e-14 * (((max5 * max7) * max4) * max6)); | |
| 218 |
2/2✓ Branch 0 taken 64011 times.
✓ Branch 1 taken 146584 times.
|
210595 | if( (r > eps) ) |
| 219 | { | ||
| 220 | 64011 | int_tmp_result_FFWKCAA = 1; | |
| 221 | } | ||
| 222 | else | ||
| 223 | { | ||
| 224 |
2/2✓ Branch 0 taken 141318 times.
✓ Branch 1 taken 5266 times.
|
146584 | if( (r < -eps) ) |
| 225 | { | ||
| 226 | 141318 | int_tmp_result_FFWKCAA = -1; | |
| 227 | } | ||
| 228 | else | ||
| 229 | { | ||
| 230 | 5266 | return FPG_UNCERTAIN_VALUE; | |
| 231 | } | ||
| 232 | } | ||
| 233 | } | ||
| 234 | 205329 | return (Delta4_sign * int_tmp_result_FFWKCAA); | |
| 235 | } | ||
| 236 |