/* * Copyright (c) 1992 The Regents of the University of California. * All rights reserved. * * This software was developed by the Computer Systems Engineering group * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and * contributed to Berkeley. * * %sccs.include.redist.c% * * from: $Header: isnan.c,v 1.1 91/07/08 19:03:34 torek Exp $ */ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)isnan.c 5.1 (Berkeley) 06/25/92"; #endif /* LIBC_SCCS and not lint */ #include #include isnan(d) double d; { register struct ieee_double *p = (struct ieee_double *)&d; return (p->dbl_exp == DBL_EXP_INFNAN && (p->dbl_frach != 0 || p->dbl_fracl != 0)); }