Subversion Repositories Kolibri OS

Rev

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

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