15 #ifndef INCLUDED_utility_numbers_hh
16 #define INCLUDED_utility_numbers_hh
18 #include <platform/types.hh>
24 #if defined(WIN32) && !defined(__CYGWIN__)
27 inline int isnan(
double x) {
return _isnan(x); }
28 inline int isinf(
double x) {
return !_finite(x); }
30 inline double round(
double x) {
return x < 0.0 ? ceil(x - 0.5) : floor(x + 0.5); }
31 inline double copysign(
double x,
double y) {
return _copysign(x, y); }
51 return std::numeric_limits< platform::Real >::quiet_NaN();
bool isnan(T value)
portable check to see if a value is NaN.
platform::Size get_undefined_size()
Get a numeric value for Size that represents an "undefined" value.
bool is_inf(platform::Real const &val)
platform::Real copysign(platform::Real const &x, platform::Real const &y)
bool is_nan(platform::Real const &val)
platform::Real get_undefined_real()
Get a numeric value for Real that represents an "undefined" value.
core::Real round(core::Real d, core::Size digits)
platform::Real round(platform::Real const &val)
bool is_undefined(platform::Size const &val)
Check if a Size is undefined (i.e has the same value as utility::get_undefined_size() ) ...