| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /* Automatically generated code, do not edit */ | ||
| 2 | /* Generated from source file: orient3d.pck */ | ||
| 3 | |||
| 4 | 19048953 | inline int orient_3d_filter(const double* p0, const double* p1, const double* p2, const double* p3) { | |
| 5 | double a11; | ||
| 6 | 19048953 | a11 = (p1[0] - p0[0]); | |
| 7 | double a12; | ||
| 8 | 19048953 | a12 = (p1[1] - p0[1]); | |
| 9 | double a13; | ||
| 10 | 19048953 | a13 = (p1[2] - p0[2]); | |
| 11 | double a21; | ||
| 12 | 19048953 | a21 = (p2[0] - p0[0]); | |
| 13 | double a22; | ||
| 14 | 19048953 | a22 = (p2[1] - p0[1]); | |
| 15 | double a23; | ||
| 16 | 19048953 | a23 = (p2[2] - p0[2]); | |
| 17 | double a31; | ||
| 18 | 19048953 | a31 = (p3[0] - p0[0]); | |
| 19 | double a32; | ||
| 20 | 19048953 | a32 = (p3[1] - p0[1]); | |
| 21 | double a33; | ||
| 22 | 19048953 | a33 = (p3[2] - p0[2]); | |
| 23 | double Delta; | ||
| 24 | 19048953 | Delta = (((a11 * ((a22 * a33) - (a23 * a32))) - (a21 * ((a12 * a33) - (a13 * a32)))) + (a31 * ((a12 * a23) - (a13 * a22)))); | |
| 25 | int int_tmp_result; | ||
| 26 | double eps; | ||
| 27 | 19048953 | double max1 = fabs(a11); | |
| 28 |
2/2✓ Branch 0 taken 6357373 times.
✓ Branch 1 taken 12691580 times.
|
19048953 | if((max1 < fabs(a21))) |
| 29 | { | ||
| 30 | 6357373 | max1 = fabs(a21); | |
| 31 | } | ||
| 32 |
2/2✓ Branch 0 taken 5129692 times.
✓ Branch 1 taken 13919261 times.
|
19048953 | if((max1 < fabs(a31))) |
| 33 | { | ||
| 34 | 5129692 | max1 = fabs(a31); | |
| 35 | } | ||
| 36 | 19048953 | double max2 = fabs(a12); | |
| 37 |
2/2✓ Branch 0 taken 7749661 times.
✓ Branch 1 taken 11299292 times.
|
19048953 | if((max2 < fabs(a13))) |
| 38 | { | ||
| 39 | 7749661 | max2 = fabs(a13); | |
| 40 | } | ||
| 41 |
2/2✓ Branch 0 taken 4189671 times.
✓ Branch 1 taken 14859282 times.
|
19048953 | if((max2 < fabs(a22))) |
| 42 | { | ||
| 43 | 4189671 | max2 = fabs(a22); | |
| 44 | } | ||
| 45 |
2/2✓ Branch 0 taken 2557339 times.
✓ Branch 1 taken 16491614 times.
|
19048953 | if((max2 < fabs(a23))) |
| 46 | { | ||
| 47 | 2557339 | max2 = fabs(a23); | |
| 48 | } | ||
| 49 | 19048953 | double max3 = fabs(a22); | |
| 50 |
2/2✓ Branch 0 taken 7564264 times.
✓ Branch 1 taken 11484689 times.
|
19048953 | if((max3 < fabs(a23))) |
| 51 | { | ||
| 52 | 7564264 | max3 = fabs(a23); | |
| 53 | } | ||
| 54 |
2/2✓ Branch 0 taken 5995779 times.
✓ Branch 1 taken 13053174 times.
|
19048953 | if((max3 < fabs(a32))) |
| 55 | { | ||
| 56 | 5995779 | max3 = fabs(a32); | |
| 57 | } | ||
| 58 |
2/2✓ Branch 0 taken 3566642 times.
✓ Branch 1 taken 15482311 times.
|
19048953 | if((max3 < fabs(a33))) |
| 59 | { | ||
| 60 | 3566642 | max3 = fabs(a33); | |
| 61 | } | ||
| 62 | double lower_bound_1; | ||
| 63 | double upper_bound_1; | ||
| 64 | 19048953 | lower_bound_1 = max1; | |
| 65 | 19048953 | upper_bound_1 = max1; | |
| 66 |
2/2✓ Branch 0 taken 5893710 times.
✓ Branch 1 taken 13155243 times.
|
19048953 | if((max2 < lower_bound_1)) |
| 67 | { | ||
| 68 | 5893710 | lower_bound_1 = max2; | |
| 69 | } | ||
| 70 | else | ||
| 71 | { | ||
| 72 |
2/2✓ Branch 0 taken 11324423 times.
✓ Branch 1 taken 1830820 times.
|
13155243 | if((max2 > upper_bound_1)) |
| 73 | { | ||
| 74 | 11324423 | upper_bound_1 = max2; | |
| 75 | } | ||
| 76 | } | ||
| 77 |
2/2✓ Branch 0 taken 3658932 times.
✓ Branch 1 taken 15390021 times.
|
19048953 | if((max3 < lower_bound_1)) |
| 78 | { | ||
| 79 | 3658932 | lower_bound_1 = max3; | |
| 80 | } | ||
| 81 | else | ||
| 82 | { | ||
| 83 |
2/2✓ Branch 0 taken 3678864 times.
✓ Branch 1 taken 11711157 times.
|
15390021 | if((max3 > upper_bound_1)) |
| 84 | { | ||
| 85 | 3678864 | upper_bound_1 = max3; | |
| 86 | } | ||
| 87 | } | ||
| 88 |
2/2✓ Branch 0 taken 415118 times.
✓ Branch 1 taken 18633835 times.
|
19048953 | if((lower_bound_1 < 1.63288018496748314939e-98)) |
| 89 | { | ||
| 90 | 415118 | return FPG_UNCERTAIN_VALUE; | |
| 91 | } | ||
| 92 | else | ||
| 93 | { | ||
| 94 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 18633835 times.
|
18633835 | if((upper_bound_1 > 5.59936185544450928309e+101)) |
| 95 | { | ||
| 96 | ✗ | return FPG_UNCERTAIN_VALUE; | |
| 97 | } | ||
| 98 | 18633835 | eps = (5.11071278299732992696e-15 * ((max2 * max3) * max1)); | |
| 99 |
2/2✓ Branch 0 taken 6095188 times.
✓ Branch 1 taken 12538647 times.
|
18633835 | if((Delta > eps)) |
| 100 | { | ||
| 101 | 6095188 | int_tmp_result = 1; | |
| 102 | } | ||
| 103 | else | ||
| 104 | { | ||
| 105 |
2/2✓ Branch 0 taken 8022146 times.
✓ Branch 1 taken 4516501 times.
|
12538647 | if((Delta < -eps)) |
| 106 | { | ||
| 107 | 8022146 | int_tmp_result = -1; | |
| 108 | } | ||
| 109 | else | ||
| 110 | { | ||
| 111 | 4516501 | return FPG_UNCERTAIN_VALUE; | |
| 112 | } | ||
| 113 | } | ||
| 114 | } | ||
| 115 | 14117334 | return int_tmp_result; | |
| 116 | } | ||
| 117 |