Updated PCI IDs to latest snapshot.
[tangerine.git] / rom / mathffp / spceil.c
blob7d76b986d828a7ecf6f5cec59ef983c77aa4a19f
1 /*
2 Copyright © 1995-2004, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include "mathffp_intern.h"
8 /*
9 FUNCTION
10 Calculate the least integer ffp-number greater than or equal to
11 fnum1
13 RESULT
16 Flags:
17 zero : result is zero
18 negative : result is negative
19 overflow : 0
21 NOTES
23 EXAMPLE
25 BUGS
27 SEE ALSO
28 @Math.Floor@
30 INTERNALS
31 ALGORITHM:
32 Ceil(y) = - Floor(-y)
34 HISTORY
36 AROS_LH1(float, SPCeil,
37 AROS_LHA(float, y, D0),
38 struct LibHeader *, MathBase, 16, Mathffp
41 AROS_LIBFUNC_INIT
43 /* Ceil(y) = -Floor(-y) */
44 y = SPFloor(y ^ FFPSign_Mask);
45 return (y ^ FFPSign_Mask);
47 AROS_LIBFUNC_EXIT