From a31cce0995384d6d9301dd72aa3eafe7a5e366ab Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Fri, 18 Nov 2011 22:53:13 +0000 Subject: [PATCH] [CRT] Reimplemented _finite properly. Removed unused _isinf function. svn path=/trunk/; revision=54426 --- reactos/lib/sdk/crt/float/isnan.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/reactos/lib/sdk/crt/float/isnan.c b/reactos/lib/sdk/crt/float/isnan.c index ab0684e0ac0..aadaa2983c7 100644 --- a/reactos/lib/sdk/crt/float/isnan.c +++ b/reactos/lib/sdk/crt/float/isnan.c @@ -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)