isinf.c

Go to the documentation of this file.
00001 /*
00002 libc/ieee_float/isinf.c
00003 
00004 Created:        Oct 14, 1993 by Philip Homburg <philip@cs.vu.nl>
00005 
00006 Implementation of isinf that directly tests the bits in an ieee float
00007 */
00008 
00009 #define _MINIX_SOURCE
00010 
00011 #include <sys/types.h>
00012 #include <math.h>
00013 
00014 #include "ieee_float.h"
00015 
00016 int isinf(value)
00017 double value;
00018 {
00019         struct f64 *f64p;
00020         int exp;
00021 
00022         f64p= (struct f64 *)&value;
00023         exp= F64_GET_EXP(f64p);
00024         if (exp != F64_EXP_MAX)
00025                 return 0;
00026         return F64_GET_MANT_LOW(f64p) == 0 && F64_GET_MANT_HIGH(f64p) == 0;
00027 }
00028 
00029 /*
00030  * $PchId: isinf.c,v 1.3 1996/02/22 21:01:39 philip Exp $
00031  */

Generated on Fri Apr 14 22:57:26 2006 for minix by  doxygen 1.4.6