mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
Some adjustments so that the function is available even in non-FPU code
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14731 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: math_fabs.c,v 1.1.1.1 2004-07-26 16:30:42 obarthel Exp $
|
||||
* $Id: math_fabs.c,v 1.2 2004-09-27 15:06:16 tfrieden Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@ -141,6 +141,17 @@ __fabs(double x)
|
||||
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
INLINE static const double
|
||||
__fabs(double x)
|
||||
{
|
||||
if (x > 0)
|
||||
return x;
|
||||
else
|
||||
return -x;
|
||||
}
|
||||
|
||||
#endif /* PPC_FLOATING_POINT_SUPPORT */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: math_log.c,v 1.1.1.1 2004-07-26 16:30:49 obarthel Exp $
|
||||
* $Id: math_log.c,v 1.2 2004-09-27 15:06:19 tfrieden Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@ -135,7 +135,7 @@ __log(double x)
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#if defined(PPC_FLOATING_POINT_SUPPORT)
|
||||
#if defined(__PPC__)
|
||||
|
||||
static const double
|
||||
ln2_hi = 6.93147180369123816490e-01, /* 3fe62e42 fee00000 */
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: math_modf.c,v 1.1.1.1 2004-07-26 16:30:50 obarthel Exp $
|
||||
* $Id: math_modf.c,v 1.2 2004-09-27 15:06:19 tfrieden Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@ -109,7 +109,7 @@ __modf(double x,double *nptr)
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#if defined(PPC_FLOATING_POINT_SUPPORT)
|
||||
#if defined(__PPC__)
|
||||
|
||||
INLINE static const double
|
||||
__modf(double x,double *nptr)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: math_pow.c,v 1.2 2004-08-27 11:40:49 obarthel Exp $
|
||||
* $Id: math_pow.c,v 1.3 2004-09-27 15:06:19 tfrieden Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@ -171,7 +171,7 @@ __pow(double x,double y)
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#if defined(PPC_FLOATING_POINT_SUPPORT)
|
||||
#if defined(__PPC__)
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: math_sqrt.c,v 1.2 2004-08-21 18:57:40 obarthel Exp $
|
||||
* $Id: math_sqrt.c,v 1.3 2004-09-27 15:06:19 tfrieden Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@ -135,7 +135,7 @@ __sqrt(double x)
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#if defined(PPC_FLOATING_POINT_SUPPORT)
|
||||
#ifdef __PPC__
|
||||
|
||||
static const double one = 1.0, tiny=1.0e-300;
|
||||
|
||||
@ -236,7 +236,7 @@ __sqrt(double x)
|
||||
return z;
|
||||
}
|
||||
|
||||
#endif /* PPC_FLOATING_POINT_SUPPORT */
|
||||
#endif
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user