From 46a3d3c7d60db15ea65470800bcba695f55ce6f6 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 23 Jun 2014 20:17:13 +0000 Subject: Set errno for y1 overflow (bug 17050). This patch fixes bug 17050, missing errno setting for y1 overflow (for small positive arguments). An appropriate check is added for overflow directly in the __ieee754_y1 implementation, similar to the check present for yn (doing it there rather than in the wrapper also avoids yn needing to repeat the check when called for order 1 or -1 and it uses __ieee754_y1). Tested x86_64 and x86; no ulps update needed. Also tested for mips64 to verify the ldbl-128 fix (the ldbl-128ibm code just #includes the ldbl-128 file). [BZ #17050] * sysdeps/ieee754/dbl-64/e_j1.c: Include . (__ieee754_y1): Set errno if return value overflows. * sysdeps/ieee754/flt-32/e_j1f.c: Include . (__ieee754_y1f): Set errno if return value overflows. * sysdeps/ieee754/ldbl-128/e_j1l.c: Include . (__ieee754_y1l): Set errno if return value overflows. * sysdeps/ieee754/ldbl-96/e_j1l.c: Include . (__ieee754_y1l): Set errno if return value overflows. * math/auto-libm-test-in: Add more tests of y0, y1 and yn. * math/auto-libm-test-out: Regenerated. --- math/auto-libm-test-in | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'math/auto-libm-test-in') diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in index 673a4446a2..86333846ac 100644 --- a/math/auto-libm-test-in +++ b/math/auto-libm-test-in @@ -2458,6 +2458,8 @@ y0 0x1p-80 y0 0x1p-90 y0 0x1p-100 y0 0x1p-110 +y0 min +y0 min_subnorm y1 0.125 y1 0.75 @@ -2482,6 +2484,8 @@ y1 0x1p-80 y1 0x1p-90 y1 0x1p-100 y1 0x1p-110 +y1 min +y1 min_subnorm # yn (0, x) == y0 (x). yn 0 0.125 @@ -2526,3 +2530,22 @@ yn 2 0x1.ffff62p+99 yn 2 0x1p127 yn 2 0x1p1023 yn 2 0x1p16383 + +yn 0 min +yn 0 min_subnorm +yn 1 min +yn 1 min_subnorm +yn -1 min +yn -1 min_subnorm +yn 2 min +yn 2 min_subnorm +yn -2 min +yn -2 min_subnorm +yn 17 min +yn 17 min_subnorm +yn -17 min +yn -17 min_subnorm +yn 42 min +yn 42 min_subnorm +yn -42 min +yn -42 min_subnorm -- cgit 1.4.1