File: isnan.c

package info (click to toggle)
xlispstat 3.52.14-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 7,560 kB
  • ctags: 12,676
  • sloc: ansic: 91,357; lisp: 21,759; sh: 1,525; makefile: 521; csh: 1
file content (16 lines) | stat: -rw-r--r-- 331 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#ifdef IEEEFP
#define IEEELO 1
#define IEEEHI 0

#define UINT32 unsigned long

#define ieeehi(x) ((UINT32 *)(&(x)))[IEEEHI]
#define ieeelo(x) ((UINT32 *)(&(x)))[IEEELO]

int isnan(x)
     double x;
{
  return (((ieeehi(x) & 0x7FF00000L) == 0x7FF00000L)
	  && ((ieeehi(x) & 0xFFFFFL) != 0 || ieeelo(x) != 0));
}
#endif /* IEEEFP */