From c5f20ef053d38bbbf0213f6147255d281525bf2b Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Mon, 14 Nov 2005 12:28:21 +0000 Subject: [PATCH] Added finitef() implementation. Won't work yet, since __fpclassifyf() is not implemented. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14911 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/libroot/posix/math/floatmath.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/system/libroot/posix/math/floatmath.c b/src/system/libroot/posix/math/floatmath.c index eaaa91b6fb..29b5028c8f 100644 --- a/src/system/libroot/posix/math/floatmath.c +++ b/src/system/libroot/posix/math/floatmath.c @@ -116,3 +116,10 @@ __fpclassifyl(long double value) // TODO: implement me! return FP_NORMAL; } + +int +finitef(float value) +{ + int clazz = __fpclassifyf(value); + return (clazz == FP_ZERO || clazz == FP_SUBNORMAL || clazz == FP_NORMAL); +}