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:
kleink 2003-10-28 00:13:22 +00:00
parent d103a27279
commit fdb80dd054

View File

@ -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
@ -40,7 +40,7 @@
#if 0
static char sccsid[] = "@(#)isinf.c 8.1 (Berkeley) 6/4/93";
#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 /* LIBC_SCCS and not lint */
@ -61,7 +61,7 @@ isnanl(long double ld)
union ieee_ext_u u;
u.extu_ld = ld;
/* Note: the explicit integer bit is "don't care". */
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));
}