diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2021-08-03 13:10:57 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2021-08-03 13:10:57 +0000 |
commit | dc6366085d17632c95265836aa52d5b84d87f04f (patch) | |
tree | 01dc563f13419dba5d0c70372709346ee4158d2d | |
parent | 9275c302270a7d5eb9340ea7227475ea73ed2e84 (diff) | |
download | mpfr-dc6366085d17632c95265836aa52d5b84d87f04f.tar.gz |
[tests/tget_flt.c] In bug_icx: replaced mpfr_set_flt, whose float
argument was yielding an underflow (not portable), by mpfr_set_si_2exp
(it is mpfr_get_flt that is tested, not mpfr_set_flt).
git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14555 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r-- | tests/tget_flt.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/tget_flt.c b/tests/tget_flt.c index e509dc49f..c432ce31b 100644 --- a/tests/tget_flt.c +++ b/tests/tget_flt.c @@ -51,14 +51,11 @@ equal_flt (float f, float g) static void bug_icx (void) { -#if __MPFR_STDC (199901L) mpfr_t x; float y; mpfr_init2 (x, 24); - /* FIXME: This test is incorrect as it triggers underflow, whose - behavior is platform-dependent. Probably not an icx bug. */ - mpfr_set_flt (x, -0x1p-149f, MPFR_RNDN); + mpfr_set_si_2exp (x, -1, -149, MPFR_RNDN); mpfr_log (x, x, MPFR_RNDN); y = mpfr_get_flt (x, MPFR_RNDN); if (!DOUBLE_ISNAN (y)) @@ -68,7 +65,6 @@ bug_icx (void) exit (1); } mpfr_clear (x); -#endif } int |