. service tells you which device it couldn't stat
[minix3.git] / lib / gnu / ieee_float / isnan.c
blobb941bb9e8a7877adf2d186d77939164b8b2945b4
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>
12 #include <math.h>
14 #include "ieee_float.h"
16 int isnan(value)
17 double value;
19 struct f64 *f64p;
20 int exp;
22 f64p= (struct f64 *)&value;
23 exp= F64_GET_EXP(f64p);
24 if (exp != F64_EXP_MAX)
25 return 0;
26 return F64_GET_MANT_LOW(f64p) != 0 || F64_GET_MANT_HIGH(f64p) != 0;
30 * $PchId: isnan.c,v 1.3 1996/02/22 21:01:39 philip Exp $