1 /* origin: FreeBSD /usr/src/lib/msun/src/s_ceilf.c */
3 * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
6 * ====================================================
7 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
9 * Developed at SunPro, a Sun Microsystems, Inc. business.
10 * Permission to use, copy, modify, and distribute this
11 * software is freely granted, provided that this notice
13 * ====================================================
18 static const float huge = 1.0e30;
25 GET_FLOAT_WORD(i0, x);
26 j0 = ((i0>>23)&0xff) - 0x7f;
29 /* raise inexact if x != 0 */
39 return x; /* x is integral */
40 /* raise inexact flag */
48 if (j0 == 0x80) /* inf or NaN */
50 return x; /* x is integral */
52 SET_FLOAT_WORD(x, i0);