diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2005-05-03 08:08:50 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2005-05-03 08:08:50 +0000 |
commit | 1ea7c693ea4cb33e5361afed25fbedddbe9deb6c (patch) | |
tree | 64e932d72e39649d654119c2926ec72aa2d15395 /tests/thypot.c | |
parent | e778692687ff89cc60eee77c9037869358512231 (diff) | |
download | mpfr-1ea7c693ea4cb33e5361afed25fbedddbe9deb6c.tar.gz |
Fixed the mpfr_hypot bug, and re-enabled the test_large_small test.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3515 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/thypot.c')
-rw-r--r-- | tests/thypot.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/thypot.c b/tests/thypot.c index 5ccc75cbd..e03cf2ae7 100644 --- a/tests/thypot.c +++ b/tests/thypot.c @@ -110,6 +110,7 @@ static void test_large_small (void) { mpfr_t x, y, z; + int inexact; mpfr_init2 (x, 3); mpfr_init2 (y, 2); @@ -117,7 +118,12 @@ test_large_small (void) mpfr_set_ui_2exp (x, 1, mpfr_get_emax () / 2, GMP_RNDN); mpfr_set_ui_2exp (y, 1, -1, GMP_RNDN); - mpfr_hypot (z, x, y, GMP_RNDN); + inexact = mpfr_hypot (z, x, y, GMP_RNDN); + if (inexact >= 0 || mpfr_cmp (x, z)) + { + printf ("Error in test_large_small\n"); + exit (1); + } mpfr_clear (x); mpfr_clear (y); @@ -222,10 +228,7 @@ main (int argc, char *argv[]) mpfr_clear (t); test_large (); - -#ifdef TEST_LARGE_SMALL test_large_small (); -#endif tests_end_mpfr (); return 0; |