diff options
| author | matt <matt@NetBSD.org> | 2013-02-14 08:56:56 +0000 |
|---|---|---|
| committer | matt <matt@NetBSD.org> | 2013-02-14 08:56:56 +0000 |
| commit | 5d342446150112c1c83490f43553b5faecf63fcd (patch) | |
| tree | 8a4fcae22975a3f20f02595d8c6b60d3b9ceea1c /lib/libm/src | |
| parent | 230078f7edb4cc49127e68e8acab525a93ba29e0 (diff) | |
Deal with an implicit NBIT
Diffstat (limited to 'lib/libm/src')
| -rw-r--r-- | lib/libm/src/s_nextafterl.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/libm/src/s_nextafterl.c b/lib/libm/src/s_nextafterl.c index 87488e2f514..c95e8fd86e8 100644 --- a/lib/libm/src/s_nextafterl.c +++ b/lib/libm/src/s_nextafterl.c @@ -1,4 +1,4 @@ -/* $NetBSD: s_nextafterl.c,v 1.2 2010/09/17 20:39:39 christos Exp $ */ +/* $NetBSD: s_nextafterl.c,v 1.3 2013/02/14 08:56:56 matt Exp $ */ /* @(#)s_nextafter.c 5.1 93/09/24 */ /* @@ -13,7 +13,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: s_nextafterl.c,v 1.2 2010/09/17 20:39:39 christos Exp $"); +__RCSID("$NetBSD: s_nextafterl.c,v 1.3 2013/02/14 08:56:56 matt Exp $"); #include <float.h> #include <math.h> @@ -24,6 +24,10 @@ __RCSID("$NetBSD: s_nextafterl.c,v 1.2 2010/09/17 20:39:39 christos Exp $"); #error "Unsupported long double format" #endif +#ifdef LDBL_IMPLICIT_NBIT +#define LDBL_NBIT 0 +#endif + /* * IEEE functions * nextafterl(x,y) @@ -83,7 +87,9 @@ nextafterl(long double x, long double y) return x+x; /* overflow */ if (ux.extu_exp == 0) { /* underflow */ +#ifndef LDBL_IMPLICIT_NBIT mask_nbit_l(ux); +#endif t = ux.extu_ld * ux.extu_ld; if (t != ux.extu_ld) /* raise underflow flag */ return ux.extu_ld; |
