[CRT]
authorPierre Schweitzer <pierre@reactos.org>
Fri, 18 Nov 2011 22:53:13 +0000 (22:53 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Fri, 18 Nov 2011 22:53:13 +0000 (22:53 +0000)
Reimplemented _finite properly.
Removed unused _isinf function.

svn path=/trunk/; revision=54426

reactos/lib/sdk/crt/float/isnan.c

index ab0684e..aadaa29 100644 (file)
@@ -54,7 +54,10 @@ int _isnanl(long double __x)
          && ( (x.x->mantissah & (unsigned int)0x7fffffff) != 0  || x.x->mantissal != 0 ));
 }
 
-int _isinf(double __x)
+/*
+ * @implemented
+ */
+int _finite(double __x)
 {
        union
        {
@@ -63,15 +66,8 @@ int _isinf(double __x)
        } x;
 
        x.__x = &__x;
-       return ( x.x->exponent == 0x7ff  && ( x.x->mantissah == 0 && x.x->mantissal == 0 ));
-}
 
-/*
- * @implemented
- */
-int _finite( double x )
-{
-       return !_isinf(x);
+    return ((x.x->exponent & 0x7ff) != 0x7ff);
 }
 
 int _isinfl(long double __x)