]> pd.if.org Git - pdclib/blob - functions/math/ceil.c
Re-import from Subversion.
[pdclib] / functions / math / ceil.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 ceil( double x ) { /* TODO */ };
9
10 /* Therx code
11 {
12     return ( x < 0 ) ? (int) x : ( (int) x ) + 1;
13 }
14 */
15
16 /* PDPC code - unreviewed
17 {
18     int y;
19     
20     y = (int)x;
21     if ((double)y < x)
22     {
23         y++;
24     }
25     return ((double)y);
26 }
27 */
28
29 float ceilf( float x ) { /* TODO */ };
30 long double ceill( long double x ) { /* TODO */ };