]> pd.if.org Git - pdclib/blob - functions/math/abs.c
Re-import from Subversion.
[pdclib] / functions / math / abs.c
1 /* ----------------------------------------------------------------------------
2  * $Id$
3  * ----------------------------------------------------------------------------
4  * Public Domain C Library - http://pdclib.sourceforge.net
5  * This code is Public Domain. Use, modify, and redistribute at will.
6  * --------------------------------------------------------------------------*/
7
8 double fabs( double x ) { /* TODO */ };
9
10 /* Therx code
11 {
12     return ( x < 0 ) ? -x : x;
13 }
14 */
15
16 /* PDPC code - unreviewed
17 {
18     if (x < 0.0)
19     {
20         x = -x;
21     }
22     return (x);
23 }
24 */
25
26 float fabsf( float x ) { /* TODO */ };
27 long double fabsl( long double x ) { /* TODO */ };
28
29 int abs( int i ) { /* TODO */ };
30 long long llabs( long long i ) { /* TODO */ };
31 long labs( long i ) { /* TODO */ };