Skip to content

Commit

Permalink
Fix ynl return value with LDBL_MIN.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marek Polacek committed Jul 12, 2012
1 parent ec332e9 commit 541428f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2012-07-12 Marek Polacek <polacek@redhat.com>

[BZ #14173]
* math/libm-test.inc (yn_test): Add test for BZ #14173.
* sysdeps/ieee754/ldbl-96/e_jnl.c (__ieee754_ynl): Correct
loop condition.

2012-07-12 Joseph Myers <joseph@codesourcery.com>

[BZ #13717]
Expand Down
3 changes: 2 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ Version 2.17

* The following bugs are resolved with this release:

6778, 14042, 14151, 14154, 14157, 14283, 14328, 14331, 14337, 14347
6778, 14042, 14151, 14154, 14157, 14173, 14283, 14328, 14331, 14337,
14347


Version 2.16
Expand Down
5 changes: 4 additions & 1 deletion math/libm-test.inc
Original file line number Diff line number Diff line change
Expand Up @@ -9015,8 +9015,11 @@ yn_test (void)
TEST_ff_f (yn, 10, 2.0, -129184.542208039282635913145923304214L);
TEST_ff_f (yn, 10, 10.0, -0.359814152183402722051986577343560609L);

END (yn);
/* Check whether yn returns correct value for LDBL_MIN, DBL_MIN,
and FLT_MIN. See Bug 14173. */
TEST_ff_f (yn, 10, min_value, minus_infty, OVERFLOW_EXCEPTION);

END (yn);
}


Expand Down
3 changes: 2 additions & 1 deletion sysdeps/ieee754/ldbl-96/e_jnl.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,8 @@ __ieee754_ynl (int n, long double x)
b = __ieee754_y1l (x);
/* quit if b is -inf */
GET_LDOUBLE_WORDS (se, i0, i1, b);
for (i = 1; i < n && se != 0xffff; i++)
/* Use 0xffffffff since GET_LDOUBLE_WORDS sign-extends SE. */
for (i = 1; i < n && se != 0xffffffff; i++)
{
temp = b;
b = ((long double) (i + i) / x) * b - a;
Expand Down

0 comments on commit 541428f

Please sign in to comment.