From 9f6605e38370eba1349daccee7331fb3b7091551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 8 Jul 2009 13:26:57 +0000 Subject: [PATCH] add CGAL_NTS before sign (bug in CORE, convertion from int to Sign) --- ...ions_on_roots_and_polynomial_1_3_and_2_3.h | 10 ++++---- ...l_functions_on_roots_and_polynomials_2_3.h | 24 +++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Algebraic_kernel_for_spheres/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomial_1_3_and_2_3.h b/Algebraic_kernel_for_spheres/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomial_1_3_and_2_3.h index 28ddf0acf91..71bd486bf27 100644 --- a/Algebraic_kernel_for_spheres/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomial_1_3_and_2_3.h +++ b/Algebraic_kernel_for_spheres/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomial_1_3_and_2_3.h @@ -36,14 +36,14 @@ namespace CGAL { inline Sign sign_at( const typename AK::Polynomial_for_spheres_2_3 & equation, const typename AK::Root_for_spheres_2_3 &r){ - return sign(r.evaluate(equation)); + return CGAL_NTS sign(r.evaluate(equation)); } template < class AK > inline Sign sign_at(const typename AK::Polynomial_1_3 & equation, const typename AK::Root_for_spheres_2_3 &r){ - return sign(r.evaluate(equation)); + return CGAL_NTS sign(r.evaluate(equation)); } template < class AK > @@ -247,9 +247,9 @@ namespace CGAL { const Root_of_2 t2 = make_root_of_2(alpha,FT(1),gama); bool first_t1 = true; - Sign sign_a1 = static_cast (sign(p.a1())); - Sign sign_a2 = static_cast (sign(p.a2())); - Sign sign_a3 = static_cast (sign(p.a3())); + Sign sign_a1 = CGAL_NTS sign(p.a1()); + Sign sign_a2 = CGAL_NTS sign(p.a2()); + Sign sign_a3 = CGAL_NTS sign(p.a3()); if(sign_a1 == ZERO) { if(sign_a2 == ZERO) { first_t1 = (sign_a3 == POSITIVE); diff --git a/Algebraic_kernel_for_spheres/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_2_3.h b/Algebraic_kernel_for_spheres/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_2_3.h index b9f4e3e4e24..0e49b5fa86a 100644 --- a/Algebraic_kernel_for_spheres/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_2_3.h +++ b/Algebraic_kernel_for_spheres/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_2_3.h @@ -182,8 +182,8 @@ namespace CGAL { // It has to be the equation of a diametral circle CGAL_kernel_precondition((intersect(p,s))); - CGAL_kernel_precondition(sign(p.a() * s.a() + p.b() * s.b() + - p.c() * s.c() + p.d()) == ZERO); + CGAL_kernel_precondition(CGAL_NTS sign(p.a() * s.a() + p.b() * s.b() + + p.c() * s.c() + p.d()) == ZERO); CGAL_kernel_precondition(!(is_zero(p.b()) && is_zero(p.c()))); const FT sqbc = CGAL::square(p.b()) + CGAL::square(p.c()); @@ -217,8 +217,8 @@ namespace CGAL { // It has to be the equation of a diametral circle CGAL_kernel_precondition((intersect(p,s))); - CGAL_kernel_precondition(sign(p.a() * s.a() + p.b() * s.b() + - p.c() * s.c() + p.d()) == ZERO); + CGAL_kernel_precondition(CGAL_NTS sign(p.a() * s.a() + p.b() * s.b() + + p.c() * s.c() + p.d()) == ZERO); CGAL_kernel_precondition(!(is_zero(p.b()) && is_zero(p.c()))); const FT sqbc = CGAL::square(p.b()) + CGAL::square(p.c()); @@ -256,8 +256,8 @@ namespace CGAL { // It has to be the equation of a diametral circle CGAL_kernel_precondition((intersect(p,s))); - CGAL_kernel_precondition(sign(p.a() * s.a() + p.b() * s.b() + - p.c() * s.c() + p.d()) == ZERO); + CGAL_kernel_precondition(CGAL_NTS sign(p.a() * s.a() + p.b() * s.b() + + p.c() * s.c() + p.d()) == ZERO); CGAL_kernel_precondition(!(is_zero(p.a()) && is_zero(p.c()))); const FT sqac = CGAL::square(p.a()) + CGAL::square(p.c()); @@ -297,8 +297,8 @@ namespace CGAL { // It has to be the equation of a diametral circle CGAL_kernel_precondition((intersect(p,s))); - CGAL_kernel_precondition(sign(p.a() * s.a() + p.b() * s.b() + - p.c() * s.c() + p.d()) == ZERO); + CGAL_kernel_precondition(CGAL_NTS sign(p.a() * s.a() + p.b() * s.b() + + p.c() * s.c() + p.d()) == ZERO); CGAL_kernel_precondition(!(is_zero(p.a()) && is_zero(p.c()))); const FT sqac = CGAL::square(p.a()) + CGAL::square(p.c()); @@ -341,8 +341,8 @@ namespace CGAL { // It has to be the equation of a diametral circle CGAL_kernel_precondition((intersect(p,s))); - CGAL_kernel_precondition(sign(p.a() * s.a() + p.b() * s.b() + - p.c() * s.c() + p.d()) == ZERO); + CGAL_kernel_precondition(CGAL_NTS sign(p.a() * s.a() + p.b() * s.b() + + p.c() * s.c() + p.d()) == ZERO); CGAL_kernel_precondition(!(is_zero(p.a()) && is_zero(p.b()))); const FT sqab = CGAL::square(p.a()) + CGAL::square(p.b()); @@ -394,8 +394,8 @@ namespace CGAL { // It has to be the equation of a diametral circle CGAL_kernel_precondition((intersect(p,s))); - CGAL_kernel_precondition(sign(p.a() * s.a() + p.b() * s.b() + - p.c() * s.c() + p.d()) == ZERO); + CGAL_kernel_precondition(CGAL_NTS sign(p.a() * s.a() + p.b() * s.b() + + p.c() * s.c() + p.d()) == ZERO); CGAL_kernel_precondition(!(is_zero(p.a()) && is_zero(p.b()))); const FT sqab = CGAL::square(p.a()) + CGAL::square(p.b());