Skip to content

Commit

Permalink
Merge pull request #5242 from afabri/Kernel_Collinear_3_static_analys…
Browse files Browse the repository at this point in the history
…is-GF

Kernel: Collinear_3: Static Analysis
  • Loading branch information
lrineau committed Jan 22, 2021
2 parents 09f4237 + d5fdc05 commit 1c1a09a
Showing 1 changed file with 10 additions and 60 deletions.
70 changes: 10 additions & 60 deletions Filtered_kernel/include/CGAL/internal/Static_filters/Collinear_3.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,33 +76,14 @@ class Collinear_3
else if (max1 > upper_bound_1)
upper_bound_1 = max1;

int int_tmp_result;
if (lower_bound_1 < 5.00368081960964635413e-147)
return Base::operator()(p, q, r);
else
{
if (upper_bound_1 > 1.67597599124282407923e+153)
return Base::operator()(p, q, r);

if ((lower_bound_1 >= 5.00368081960964635413e-147) && (upper_bound_1 <= 1.67597599124282407923e+153)) {
double eps = (8.88720573725927976811e-16 * (max1 * max2));
if (double_tmp_result > eps)
int_tmp_result = 1;
else
{
if (double_tmp_result < -eps)
int_tmp_result = -1;
else
return Base::operator()(p, q, r);
}
if (CGAL::abs(double_tmp_result) > eps )
return false;
}

int sign_of_determinant_return_value = int_tmp_result;
if (sign_of_determinant_return_value != 0)
return false;

double dpz = (pz - rz);
double dqz = (qz - rz);
int int_tmp_result_3SPBwDj;

double double_tmp_result_k3Lzf6g = ((dpx * dqz) - (dpz * dqx));

double max3 = CGAL::abs(dpz);
Expand All @@ -117,28 +98,12 @@ class Collinear_3
else if (max3 > upper_bound_1)
upper_bound_1 = max3;

if (lower_bound_1 < 5.00368081960964635413e-147)
return Base::operator()(p, q, r);
else
{
if (upper_bound_1 > 1.67597599124282407923e+153)
return Base::operator()(p, q, r);

if ((lower_bound_1 >= 5.00368081960964635413e-147) && (upper_bound_1 <= 1.67597599124282407923e+153)) {
double eps = (8.88720573725927976811e-16 * (max1 * max3));
if (double_tmp_result_k3Lzf6g > eps)
int_tmp_result_3SPBwDj = 1;
else
{
if (double_tmp_result_k3Lzf6g < -eps)
int_tmp_result_3SPBwDj = -1;
else
return Base::operator()(p, q, r);
}
if (CGAL::abs(double_tmp_result_k3Lzf6g) > eps)
return false;
}

int sign_of_determinant_return_value_FFWKCAA = int_tmp_result_3SPBwDj;

int int_tmp_result_Gx4H;
double double_tmp_result_AvrrXBP = ((dpy * dqz) - (dpz * dqy));

lower_bound_1 = max2;
Expand All @@ -149,26 +114,11 @@ class Collinear_3
else if (max3 > upper_bound_1)
upper_bound_1 = max3;

if (lower_bound_1 < 5.00368081960964635413e-147)
return Base::operator()(p, q, r);
else
{
if (upper_bound_1 > 1.67597599124282407923e+153)
return Base::operator()(p, q, r);

if ((lower_bound_1 >= 5.00368081960964635413e-147) && (upper_bound_1 <= 1.67597599124282407923e+153)) {
double eps = (8.88720573725927976811e-16 * (max2 * max3));
if (double_tmp_result_AvrrXBP > eps)
int_tmp_result_Gx4H = 1;
else
{
if (double_tmp_result_AvrrXBP < -eps)
int_tmp_result_Gx4H = -1;
else
return Base::operator()(p, q, r);
}
if (CGAL::abs(double_tmp_result_AvrrXBP) > eps)
return false;
}
int sign_of_determinant_return_value_k60Ocge = int_tmp_result_Gx4H;
return ((sign_of_determinant_return_value_FFWKCAA == 0) && (sign_of_determinant_return_value_k60Ocge == 0));
}
return Base::operator()(p, q, r);
}
Expand Down

0 comments on commit 1c1a09a

Please sign in to comment.