diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-27 18:56:13 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-27 18:57:13 +0000 |
commit | 82dd75a7f436a19047325d62182590c9f9e23a78 (patch) | |
tree | 60ca20c8cf2b0d178d84725c0715471f76df97e1 /sysdeps/ieee754/ldbl-128/s_nextafterl.c | |
parent | 0bbb676a2342367c4e52b35e890f24667dabb348 (diff) | |
parent | 963c37d5c0eb62b38f8764b23931c0dcdd497a13 (diff) |
Merge commit 'refs/top-bases/t/tls' into t/tls
Diffstat (limited to 'sysdeps/ieee754/ldbl-128/s_nextafterl.c')
-rw-r--r-- | sysdeps/ieee754/ldbl-128/s_nextafterl.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sysdeps/ieee754/ldbl-128/s_nextafterl.c b/sysdeps/ieee754/ldbl-128/s_nextafterl.c index 4e9a2ce520..60fdae648f 100644 --- a/sysdeps/ieee754/ldbl-128/s_nextafterl.c +++ b/sysdeps/ieee754/ldbl-128/s_nextafterl.c @@ -26,12 +26,14 @@ static char rcsid[] = "$NetBSD: $"; #include <errno.h> #include <math.h> +#include <math-barriers.h> #include <math_private.h> +#include <libm-alias-ldouble.h> -long double __nextafterl(long double x, long double y) +_Float128 __nextafterl(_Float128 x, _Float128 y) { int64_t hx,hy,ix,iy; - u_int64_t lx,ly; + uint64_t lx,ly; GET_LDOUBLE_WORDS64(hx,lx,x); GET_LDOUBLE_WORDS64(hy,ly,y); @@ -43,7 +45,7 @@ long double __nextafterl(long double x, long double y) return x+y; if(x==y) return y; /* x=y, return y */ if((ix|lx)==0) { /* x == 0 */ - long double u; + _Float128 u; SET_LDOUBLE_WORDS64(x,hy&0x8000000000000000ULL,1);/* return +-minsubnormal */ u = math_opt_barrier (x); u = u * u; @@ -69,18 +71,18 @@ long double __nextafterl(long double x, long double y) } hy = hx&0x7fff000000000000LL; if(hy==0x7fff000000000000LL) { - long double u = x + x; /* overflow */ + _Float128 u = x + x; /* overflow */ math_force_eval (u); __set_errno (ERANGE); } if(hy==0) { - long double u = x*x; /* underflow */ + _Float128 u = x*x; /* underflow */ math_force_eval (u); /* raise underflow flag */ __set_errno (ERANGE); } SET_LDOUBLE_WORDS64(x,hx,lx); return x; } -weak_alias (__nextafterl, nextafterl) +libm_alias_ldouble (__nextafter, nextafter) strong_alias (__nextafterl, __nexttowardl) weak_alias (__nextafterl, nexttowardl) |