Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1906 serge 1
/*
2
 * ====================================================
3
 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
4
 *
5
 * Developed at SunPro, a Sun Microsystems, Inc. business.
6
 * Permission to use, copy, modify, and distribute this
7
 * software is freely granted, provided that this notice
8
 * is preserved.
9
 * ====================================================
10
 */
11
 
12
 
13
/*
14
 * __isnand(x) returns 1 is x is nan, else 0;
15
 * no branching!
16
 */
17
 
18
#include "fdlibm.h"
19
 
20
int
21
_DEFUN (__isnand, (x),
22
	double x)
23
{
24
	__int32_t hx,lx;
25
	EXTRACT_WORDS(hx,lx,x);
26
	hx &= 0x7fffffff;
27
	hx |= (__uint32_t)(lx|(-lx))>>31;
28
	hx = 0x7ff00000 - hx;
29
	return (int)(((__uint32_t)(hx))>>31);
30
}
31