Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / libs / mathieeesingbas / ieeespceil.c
blob4755056e784934869fcc17128b5c288b46363b1d
1 /*
2 Copyright © 1995-2004, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include "mathieeesingbas_intern.h"
8 /*****************************************************************************
10 NAME */
12 AROS_LH1(float, IEEESPCeil,
14 /* SYNOPSIS */
15 AROS_LHA(float, y, D0),
17 /* LOCATION */
18 struct LibHeader *, MathIeeeSingBasBase, 16, Mathieeesingbas)
20 /* FUNCTION
21 Calculate the least integer ieeesp-number
22 greater than or equal to y
24 INPUTS
26 RESULT
27 Flags:
28 zero : result is zero
29 negative : result is negative
30 overflow : 0
32 BUGS
34 SEE ALSO
35 IEEESPFloor()
37 INTERNALS
38 ALGORITHM:
39 Ceil(y) = - Floor(-y)
41 *****************************************************************************/
43 AROS_LIBFUNC_INIT
45 if (y == 0x7f880000) return y;
47 /* Ceil(y) = -Floor(-y); */
48 y = IEEESPFloor(y ^ IEEESPSign_Mask);
49 if (y == 0) return 0;
50 else return (y ^ IEEESPSign_Mask);
52 AROS_LIBFUNC_EXIT