diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2021-01-31 11:02:21 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2021-01-31 11:02:21 +0000 |
commit | 070587279951e953938c529abbe09d90f991d130 (patch) | |
tree | b5d88add6712682398b79442feb7b0a44c86b8c5 /tests/tsqrt.c | |
parent | 52017aa9dda8bf7c3a1b81d9ebe465796d03891b (diff) | |
download | mpfr-070587279951e953938c529abbe09d90f991d130.tar.gz |
[tests/*.c] When not in a test, use set_emin and set_emax rather than
mpfr_set_emin and mpfr_set_emax, in order to check failures.
Done with: perl -pi -e 's/^ *\Kmpfr_(set_e(min|max) *\()/\1/' *.c
git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14284 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tsqrt.c')
-rw-r--r-- | tests/tsqrt.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/tsqrt.c b/tests/tsqrt.c index ddd01f066..f2bbcd773 100644 --- a/tests/tsqrt.c +++ b/tests/tsqrt.c @@ -711,7 +711,7 @@ check_overflow (void) mpfr_init2 (r, p); mpfr_init2 (u, p); - mpfr_set_emax (-1); + set_emax (-1); mpfr_set_ui_2exp (u, 1, mpfr_get_emax () - 1, MPFR_RNDN); mpfr_nextbelow (u); mpfr_mul_2ui (u, u, 1, MPFR_RNDN); @@ -730,7 +730,7 @@ check_overflow (void) MPFR_ASSERTN(inex < 0); MPFR_ASSERTN(mpfr_equal_p (r, u)); - mpfr_set_emax (0); + set_emax (0); mpfr_set_ui_2exp (u, 1, mpfr_get_emax () - 1, MPFR_RNDN); mpfr_nextbelow (u); mpfr_mul_2ui (u, u, 1, MPFR_RNDN); @@ -743,7 +743,7 @@ check_overflow (void) mpfr_clear (r); mpfr_clear (u); } - mpfr_set_emax (emax); + set_emax (emax); } static void @@ -760,7 +760,7 @@ check_underflow (void) mpfr_init2 (r, p); mpfr_init2 (u, p); - mpfr_set_emin (2); + set_emin (2); mpfr_set_ui_2exp (u, 1, mpfr_get_emin () - 1, MPFR_RNDN); /* u = 2 */ /* for RNDN, since sqrt(2) is closer from 2 than 0, the result is 2 */ mpfr_clear_flags (); @@ -846,7 +846,7 @@ check_underflow (void) MPFR_ASSERTN(mpfr_cmp_ui_2exp (r, 1, mpfr_get_emin () - 1) == 0); MPFR_ASSERTN(mpfr_underflow_p ()); - mpfr_set_emin (3); + set_emin (3); mpfr_set_ui_2exp (u, 1, mpfr_get_emin () - 1, MPFR_RNDN); /* u = 4 */ /* sqrt(u) = 2 = 0.5^2^(emin-1) should be rounded to +0 */ mpfr_clear_flags (); @@ -865,7 +865,7 @@ check_underflow (void) MPFR_ASSERTN(mpfr_cmp_ui (r, 4) == 0); MPFR_ASSERTN(mpfr_underflow_p ()); - mpfr_set_emin (4); + set_emin (4); mpfr_set_ui_2exp (u, 1, mpfr_get_emin () - 1, MPFR_RNDN); /* u = 8 */ /* sqrt(u) should be rounded to +0 */ mpfr_clear_flags (); @@ -877,7 +877,7 @@ check_underflow (void) mpfr_clear (r); mpfr_clear (u); } - mpfr_set_emin (emin); + set_emin (emin); } static void |