From: Daniel Lehman dlehman25@gmail.com
--- include/msvcrt/math.h | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/include/msvcrt/math.h b/include/msvcrt/math.h index 4f9840b3a02..8f1bd71ab72 100644 --- a/include/msvcrt/math.h +++ b/include/msvcrt/math.h @@ -287,6 +287,8 @@ static const union { _ACRTIMP short __cdecl _dtest(double*); _ACRTIMP short __cdecl _ldtest(long double*); _ACRTIMP short __cdecl _fdtest(float*); +_ACRTIMP int __cdecl _dsign(double); +_ACRTIMP int __cdecl _fdsign(float);
#ifdef __cplusplus
@@ -294,6 +296,8 @@ extern "C++" { inline int fpclassify(float x) throw() { return _fdtest(&x); } inline int fpclassify(double x) throw() { return _dtest(&x); } inline int fpclassify(long double x) throw() { return _ldtest(&x); } +inline bool signbit(float x) throw() { return _fdsign(x) != 0; } +inline bool signbit(double x) throw() { return _dsign(x) != 0; } template <class T> inline bool isfinite(T x) throw() { return fpclassify(x) <= 0; } template <class T> inline bool isinf(T x) throw() { return fpclassify(x) == FP_INFINITE; } template <class T> inline bool isnan(T x) throw() { return fpclassify(x) == FP_NAN; }