Ignore the explicit integer bit here, too; otherwise an infinity with the
explicit integer bit set could be classified as NaN.
This commit is contained in:
parent
d103a27279
commit
fdb80dd054
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: isnanl.c,v 1.3 2003/10/27 01:11:46 kleink Exp $ */
|
/* $NetBSD: isnanl.c,v 1.4 2003/10/28 00:13:22 kleink Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1992, 1993
|
* Copyright (c) 1992, 1993
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)isinf.c 8.1 (Berkeley) 6/4/93";
|
static char sccsid[] = "@(#)isinf.c 8.1 (Berkeley) 6/4/93";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: isnanl.c,v 1.3 2003/10/27 01:11:46 kleink Exp $");
|
__RCSID("$NetBSD: isnanl.c,v 1.4 2003/10/28 00:13:22 kleink Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* LIBC_SCCS and not lint */
|
#endif /* LIBC_SCCS and not lint */
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ isnanl(long double ld)
|
||||||
union ieee_ext_u u;
|
union ieee_ext_u u;
|
||||||
|
|
||||||
u.extu_ld = ld;
|
u.extu_ld = ld;
|
||||||
|
/* Note: the explicit integer bit is "don't care". */
|
||||||
return (u.extu_ext.ext_exp == EXT_EXP_INFNAN &&
|
return (u.extu_ext.ext_exp == EXT_EXP_INFNAN &&
|
||||||
(u.extu_ext.ext_int != 0 ||
|
(u.extu_ext.ext_frach != 0 || u.extu_ext.ext_fracl != 0));
|
||||||
u.extu_ext.ext_frach != 0 || u.extu_ext.ext_fracl != 0));
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue