diff --git a/library/math_fabs.c b/library/math_fabs.c index d929781..c6b1868 100644 --- a/library/math_fabs.c +++ b/library/math_fabs.c @@ -1,5 +1,5 @@ /* - * $Id: math_fabs.c,v 1.3 2004-09-29 14:17:44 obarthel Exp $ + * $Id: math_fabs.c,v 1.4 2004-09-29 14:30:03 obarthel Exp $ * * :ts=4 * @@ -126,8 +126,14 @@ __fabs(double x) /****************************************************************************/ +#if defined(__PPC__) + +/****************************************************************************/ + #if defined(PPC_FLOATING_POINT_SUPPORT) +/****************************************************************************/ + INLINE static const double __fabs(double x) { @@ -141,10 +147,35 @@ __fabs(double x) } +/****************************************************************************/ + +#else + +/****************************************************************************/ + +INLINE static const double +__fabs(double x) +{ + double res; + + if(x < 0) + res = (-x); + else + res = x; + + return res; +} + +/****************************************************************************/ + #endif /* PPC_FLOATING_POINT_SUPPORT */ /****************************************************************************/ +#endif /* __PPC__ */ + +/****************************************************************************/ + double fabs(double x) {