FpeControl.h (Firebird-3.0.2.32703-0.tar.bz2) | : | FpeControl.h (Firebird-3.0.4.33054-0.tar.bz2) | ||
---|---|---|---|---|
skipping to change at line 224 | skipping to change at line 224 | |||
}; | }; | |||
} //namespace Firebird | } //namespace Firebird | |||
// getting a portable isinf() is harder than you would expect | // getting a portable isinf() is harder than you would expect | |||
#ifdef WIN_NT | #ifdef WIN_NT | |||
inline bool isinf(double x) | inline bool isinf(double x) | |||
{ | { | |||
return (!_finite (x) && !isnan(x)); | return (!_finite (x) && !isnan(x)); | |||
} | } | |||
#endif // WIN_NT | ||||
namespace Firebird { | ||||
inline bool isNegativeInf(double x) | ||||
{ | ||||
#ifdef WIN_NT | ||||
return _fpclass(x) == _FPCLASS_NINF; | ||||
#else | #else | |||
#ifndef isinf | return x == -INFINITY; | |||
template <typename F> | #endif | |||
inline bool isinf(F x) | } | |||
{ | ||||
return !isnan(x) && isnan(x - x); | ||||
} | } | |||
#endif // isinf | ||||
#endif // WIN_NT | ||||
#endif //CLASSES_FPE_CONTROL_H | #endif //CLASSES_FPE_CONTROL_H | |||
End of changes. 3 change blocks. | ||||
7 lines changed or deleted | 10 lines changed or added |