xref: /csrg-svn/lib/libc/sparc/gen/isinf.c (revision 61168)
154387Storek /*
2*61168Sbostic  * Copyright (c) 1992, 1993
3*61168Sbostic  *	The Regents of the University of California.  All rights reserved.
454387Storek  *
554387Storek  * This software was developed by the Computer Systems Engineering group
654387Storek  * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
754387Storek  * contributed to Berkeley.
854387Storek  *
954387Storek  * %sccs.include.redist.c%
1054387Storek  *
1154387Storek  * from: $Header: isinf.c,v 1.1 91/07/08 19:03:34 torek Exp $
1254387Storek  */
1354387Storek 
1454387Storek #if defined(LIBC_SCCS) && !defined(lint)
15*61168Sbostic static char sccsid[] = "@(#)isinf.c	8.1 (Berkeley) 06/04/93";
1654387Storek #endif /* LIBC_SCCS and not lint */
1754387Storek 
1854387Storek #include <sys/types.h>
1954387Storek #include <machine/ieee.h>
2054387Storek 
isinf(d)2154387Storek isinf(d)
2254387Storek 	double d;
2354387Storek {
2454387Storek 	register struct ieee_double *p = (struct ieee_double *)&d;
2554387Storek 
2654387Storek 	return (p->dbl_exp == DBL_EXP_INFNAN &&
2754387Storek 	    p->dbl_frach == 0 && p->dbl_fracl == 0);
2854387Storek }
29