1 /* Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
3 * Permission to use, copy, modify, and distribute this software
4 * is freely granted, provided that this notice is preserved.
10 __fpclassifyf (float x
)
16 if (w
== 0x00000000 || w
== 0x80000000)
18 else if ((w
>= 0x00800000 && w
<= 0x7f7fffff) ||
19 (w
>= 0x80800000 && w
<= 0xff7fffff))
21 else if ((w
>= 0x00000001 && w
<= 0x007fffff) ||
22 (w
>= 0x80000001 && w
<= 0x807fffff))
24 else if (w
== 0x7f800000 || w
== 0xff800000)
31 __fpclassifyd (double x
)
33 unsigned int msw
, lsw
;
35 EXTRACT_WORDS(msw
,lsw
,x
);
37 if ((msw
== 0x00000000 && lsw
== 0x00000000) ||
38 (msw
== 0x80000000 && lsw
== 0x00000000))
40 else if ((msw
>= 0x00100000 && msw
<= 0x7fefffff) ||
41 (msw
>= 0x80100000 && msw
<= 0xffefffff))
43 else if ((msw
>= 0x00000000 && msw
<= 0x000fffff) ||
44 (msw
>= 0x80000000 && msw
<= 0x800fffff))
45 /* zero is already handled above */
47 else if ((msw
== 0x7ff00000 && lsw
== 0x00000000) ||
48 (msw
== 0xfff00000 && lsw
== 0x00000000))