diff -Naur mpfr-2.1.0-p12/sub1.c mpfr-2.1.0-p13/sub1.c --- mpfr-2.1.0-p12/sub1.c 2005-01-23 23:18:41.000000000 +0000 +++ mpfr-2.1.0-p13/sub1.c 2005-02-02 14:13:48.000000000 +0000 @@ -100,7 +100,7 @@ So if we round to Zero, we have to remove one ulp. Otherwise the result is correctly rounded. */ if (MPFR_IS_LIKE_RNDZ (rnd_mode, MPFR_IS_NEG (a))) { - mpfr_nexttoward (a, c); + (MPFR_IS_POS (a) ? mpfr_nextbelow : mpfr_nextabove) (a); return -MPFR_INT_SIGN (a); } return MPFR_INT_SIGN (a); diff -Naur mpfr-2.1.0-p12/tests/tui_sub.c mpfr-2.1.0-p13/tests/tui_sub.c --- mpfr-2.1.0-p12/tests/tui_sub.c 2004-04-05 08:53:04.000000000 +0000 +++ mpfr-2.1.0-p13/tests/tui_sub.c 2005-02-02 14:19:05.000000000 +0000 @@ -1,6 +1,6 @@ /* Test file for mpfr_ui_sub. -Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation. +Copyright 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation. This file is part of the MPFR Library. @@ -129,6 +129,12 @@ else MPFR_ASSERTN(mpfr_cmpabs (x, y) == 0 && mpfr_sgn (x) != mpfr_sgn (y)); + mpfr_set_prec (x, 73); + mpfr_set_str_binary (x, "0.1101111010101011011011100011010000000101110001011111001011011000101111101E-99"); + mpfr_ui_sub (x, 1, x, GMP_RNDZ); + mpfr_nextabove (x); + MPFR_ASSERTN(mpfr_cmp_ui (x, 1) == 0); + mpfr_clear (x); mpfr_clear (y); mpfr_clear (res);