xref: /csrg-svn/lib/libc/sparc/gen/isinf.c (revision 54387)
1*54387Storek /*
2*54387Storek  * Copyright (c) 1992 The Regents of the University of California.
3*54387Storek  * All rights reserved.
4*54387Storek  *
5*54387Storek  * This software was developed by the Computer Systems Engineering group
6*54387Storek  * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
7*54387Storek  * contributed to Berkeley.
8*54387Storek  *
9*54387Storek  * %sccs.include.redist.c%
10*54387Storek  *
11*54387Storek  * from: $Header: isinf.c,v 1.1 91/07/08 19:03:34 torek Exp $
12*54387Storek  */
13*54387Storek 
14*54387Storek #if defined(LIBC_SCCS) && !defined(lint)
15*54387Storek static char sccsid[] = "@(#)isinf.c	5.1 (Berkeley) 06/25/92";
16*54387Storek #endif /* LIBC_SCCS and not lint */
17*54387Storek 
18*54387Storek #include <sys/types.h>
19*54387Storek #include <machine/ieee.h>
20*54387Storek 
21*54387Storek isinf(d)
22*54387Storek 	double d;
23*54387Storek {
24*54387Storek 	register struct ieee_double *p = (struct ieee_double *)&d;
25*54387Storek 
26*54387Storek 	return (p->dbl_exp == DBL_EXP_INFNAN &&
27*54387Storek 	    p->dbl_frach == 0 && p->dbl_fracl == 0);
28*54387Storek }
29