mirror of https://github.com/CGAL/cgal
Remove CGAL::internal::infinity
This commit is contained in:
parent
d46419daeb
commit
e8e3a837b5
|
|
@ -122,14 +122,6 @@ double& get_static_minimin(); // Defined in Interval_arithmetic_impl.h
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
namespace internal {
|
|
||||||
#ifdef __INTEL_COMPILER
|
|
||||||
const double infinity = std::numeric_limits<double>::infinity();
|
|
||||||
#else
|
|
||||||
const double infinity = HUGE_VAL;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} // namespace internal
|
|
||||||
|
|
||||||
#ifdef CGAL_HEADER_ONLY
|
#ifdef CGAL_HEADER_ONLY
|
||||||
// Defined in test_FPU_rounding_mode_impl.h
|
// Defined in test_FPU_rounding_mode_impl.h
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,7 @@ public:
|
||||||
|
|
||||||
static IA largest()
|
static IA largest()
|
||||||
{
|
{
|
||||||
return IA(-internal::infinity, internal::infinity);
|
return IA(-std::numeric_limits<double>::infinity(), std::numeric_limits<double>::infinity());
|
||||||
}
|
}
|
||||||
|
|
||||||
static IA smallest()
|
static IA smallest()
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@ bool overflow_test()
|
||||||
IA_nt c (-2,2), d(-2.1,2.1);
|
IA_nt c (-2,2), d(-2.1,2.1);
|
||||||
IA_nt e (-2,2), f(2), g(-2);
|
IA_nt e (-2,2), f(2), g(-2);
|
||||||
|
|
||||||
DEBUG( std::cout << "+infinity = " << CGAL::internal::infinity << std::endl; )
|
DEBUG( std::cout << "+infinity = " << std::numeric_limits<double>::infinity() << std::endl; )
|
||||||
DEBUG( std::cout << "maxdouble = " << CGAL_IA_MAX_DOUBLE << std::endl; )
|
DEBUG( std::cout << "maxdouble = " << CGAL_IA_MAX_DOUBLE << std::endl; )
|
||||||
DEBUG( std::cout << "largest = " << CGAL::Interval_nt_advanced::largest() << std::endl; )
|
DEBUG( std::cout << "largest = " << CGAL::Interval_nt_advanced::largest() << std::endl; )
|
||||||
DEBUG( std::cout << "smallest = " << CGAL::Interval_nt_advanced::smallest() << std::endl; )
|
DEBUG( std::cout << "smallest = " << CGAL::Interval_nt_advanced::smallest() << std::endl; )
|
||||||
|
|
@ -139,12 +139,12 @@ bool overflow_test()
|
||||||
DEBUG( std::cout << "f = " << f << std::endl; )
|
DEBUG( std::cout << "f = " << f << std::endl; )
|
||||||
}
|
}
|
||||||
|
|
||||||
return a.is_same(IA_nt(CGAL_IA_MAX_DOUBLE, CGAL::internal::infinity)) &&
|
return a.is_same(IA_nt(CGAL_IA_MAX_DOUBLE, std::numeric_limits<double>::infinity())) &&
|
||||||
b.is_same(IA_nt(CGAL_IA_MAX_DOUBLE, CGAL::internal::infinity)) &&
|
b.is_same(IA_nt(CGAL_IA_MAX_DOUBLE, std::numeric_limits<double>::infinity())) &&
|
||||||
c.is_same(IA_nt::largest()) &&
|
c.is_same(IA_nt::largest()) &&
|
||||||
d.is_same(IA_nt::largest()) &&
|
d.is_same(IA_nt::largest()) &&
|
||||||
e.is_same(IA_nt::largest()) &&
|
e.is_same(IA_nt::largest()) &&
|
||||||
f.is_same(IA_nt(CGAL_IA_MAX_DOUBLE, CGAL::internal::infinity)) &&
|
f.is_same(IA_nt(CGAL_IA_MAX_DOUBLE, std::numeric_limits<double>::infinity())) &&
|
||||||
g.is_same(-f);
|
g.is_same(-f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue