panic() cleanup.
[minix.git] / lib / libc / gnu / ieee_float / isnan.c
blob9d695106958b9b5617b60650b8167c8a85a803c0
1 /*
2 libc/ieee_float/isnan.c
4 Created: Oct 14, 1993 by Philip Homburg <philip@cs.vu.nl>
6 Implementation of isnan that directly tests the bits in an ieee float
7 */
9 #define _MINIX_SOURCE
11 #include <sys/types.h>
13 #include "ieee_float.h"
15 int isnan(value)
16 double value;
18 struct f64 *f64p;
19 int exp;
21 f64p= (struct f64 *)&value;
22 exp= F64_GET_EXP(f64p);
23 if (exp != F64_EXP_MAX)
24 return 0;
25 return F64_GET_MANT_LOW(f64p) != 0 || F64_GET_MANT_HIGH(f64p) != 0;
29 * $PchId: isnan.c,v 1.3 1996/02/22 21:01:39 philip Exp $