grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / libs / mathffp / spceil.c
bloba6e4a48257c2ee377bfe5789443397e3fb786293
1 /*
2 Copyright © 1995-2004, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include "mathffp_intern.h"
8 /*****************************************************************************
10 NAME */
12 AROS_LH1(float, SPCeil,
14 /* SYNOPSIS */
15 AROS_LHA(float, y, D0),
17 /* LOCATION */
18 struct LibHeader *, MathBase, 16, Mathffp)
20 /* FUNCTION
21 Calculate the least integer ffp-number
22 greater than or equal to fnum1
24 INPUTS
26 RESULT
27 Flags:
28 zero : result is zero
29 negative : result is negative
30 overflow : 0
32 BUGS
34 INTERNALS
35 ALGORITHM:
36 Ceil(y) = - Floor(-y)
38 *****************************************************************************/
40 AROS_LIBFUNC_INIT
42 /* Ceil(y) = -Floor(-y) */
43 y = SPFloor(y ^ FFPSign_Mask);
44 return (y ^ FFPSign_Mask);
46 AROS_LIBFUNC_EXIT