source: trunk/libs/newlib/src/newlib/libm/common/s_isinfd.c @ 471

Last change on this file since 471 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 380 bytes
Line 
1/*
2 * __isinfd(x) returns 1 if x is infinity, else 0;
3 * no branching!
4 * Added by Cygnus Support.
5 */
6
7#include "fdlibm.h"
8
9#ifndef _DOUBLE_IS_32BITS
10
11int
12__isinfd (double x)
13{
14        __int32_t hx,lx;
15        EXTRACT_WORDS(hx,lx,x);
16        hx &= 0x7fffffff;
17        hx |= (__uint32_t)(lx|(-lx))>>31;       
18        hx = 0x7ff00000 - hx;
19        return 1 - (int)((__uint32_t)(hx|(-hx))>>31);
20}
21
22#endif /* _DOUBLE_IS_32BITS */
Note: See TracBrowser for help on using the repository browser.