51 #define CGAL_DOUBLE_H 1
53 #include <CGAL/basic.h>
79 {
return ceil(d) ==
d; }
86 #ifdef OLD_FINITE_VALID
103 switch (fp_class_d(d)) {
123 switch (fp_class_d(d)) {
141 #if defined(_MSC_VER) || defined(CGAL_MASK_FINITE_VALID) || defined(__BORLANDC__)
143 #define CGAL_EXPONENT_DOUBLE_MASK 0x7ff00000
144 #define CGAL_MANTISSA_DOUBLE_MASK 0x000fffff
148 is_finite_by_mask_double(
unsigned int h)
150 unsigned int e = h & CGAL_EXPONENT_DOUBLE_MASK;
151 return ( ( e ^ CGAL_EXPONENT_DOUBLE_MASK ) != 0 );
156 is_nan_by_mask_double(
unsigned int h,
unsigned int l)
158 if ( is_finite_by_mask_double(h) )
return false;
159 return ( (( h & CGAL_MANTISSA_DOUBLE_MASK ) != 0) || (( l & 0xffffffff ) != 0));
168 return is_finite_by_mask_double( p->
c.
H );
177 return ! ( is_nan_by_mask_double( p->
c.
H, p->
c.
L ));
191 {
return (d == d) && (
is_valid(d-d)); }
193 #endif // MSC_VER || ...
196 #endif // OLD_FINITE_VALID
203 #ifndef CGAL_NO_NTS_NAMESPACE
205 #ifndef CGAL_NUMBER_UTILS_H
206 template <
class NT> NT
abs(
const NT &
x);
207 #endif // CGAL_NUMBER_UTILS_H
213 {
return CGAL_CLIB_STD::fabs(d); }
218 #ifndef CGAL_NUMBER_UTILS_H
219 template <
class NT> NT
abs(
const NT &
x);
220 #endif // CGAL_NUMBER_UTILS_H
226 {
return CGAL_CLIB_STD::fabs(d); }
229 #endif // CGAL_NO_NTS_NAMESPACE
233 #endif // CGAL_DOUBLE_H
io_Operator io_tag(double)
CGAL_BEGIN_NAMESPACE double to_double(double d)
bool is_integral(const double d)
#define CGAL_TEMPLATE_NULL
struct IEEE_754_double::@32 c
#define CGAL_BEGIN_NAMESPACE
Number_tag number_type_tag(double)
#define CGAL_END_NAMESPACE