Upgraded GRUB2 to 2.00 release.
[AROS.git] / compiler / clib / __isinf.c
blobab8118000535f12a277369ffa4597663ff013cb7
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Check if a double is infinite.
6 Lang: english
7 */
9 /*
10 * Written by J.T. Conklin <jtc@netbsd.org>.
11 * Public domain.
15 * isinf(x) returns 1 is x is inf, else 0;
16 * no branching!
20 #ifndef AROS_NOFPU
22 #include "__math.h"
23 #include <math.h>
25 int __isinf(double val)
27 int hx,lx;
29 GET_HIGH_WORD(hx,val);
30 GET_LOW_WORD(lx,val);
31 hx &= 0x7fffffff;
32 hx ^= 0x7ff00000;
33 hx |= lx;
35 return (hx == 0);
36 } /* __isinf */
38 #else
40 int __isinf(void)
42 return 0;
45 #endif /* AROS_NOFPU */