source: trunk/minix/lib/gnu/ieee_float/isinf.c@ 10

Last change on this file since 10 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 542 bytes
Line 
1/*
2libc/ieee_float/isinf.c
3
4Created: Oct 14, 1993 by Philip Homburg <philip@cs.vu.nl>
5
6Implementation of isinf that directly tests the bits in an ieee float
7*/
8
9#define _MINIX_SOURCE
10
11#include <sys/types.h>
12#include <math.h>
13
14#include "ieee_float.h"
15
16int isinf(value)
17double value;
18{
19 struct f64 *f64p;
20 int exp;
21
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;
27}
28
29/*
30 * $PchId: isinf.c,v 1.3 1996/02/22 21:01:39 philip Exp $
31 */
Note: See TracBrowser for help on using the repository browser.