diff options
author | (no author) <(no author)@280ebfd0-de03-0410-8827-d642c229c3f4> | 2004-02-20 17:54:55 +0000 |
---|---|---|
committer | (no author) <(no author)@280ebfd0-de03-0410-8827-d642c229c3f4> | 2004-02-20 17:54:55 +0000 |
commit | 662ab46d65a908e728ac64d3aac5aefeb2f7a025 (patch) | |
tree | 019495d9d35a4c4754502207c3c19d3bfdd775c7 /tests/thypot.c | |
parent | 7f857964d869e4a3f316a7da845e11a9da0388a5 (diff) | |
download | mpfr-662ab46d65a908e728ac64d3aac5aefeb2f7a025.tar.gz |
This commit was manufactured by cvs2svn to create tagmpfr-2-0-3-rel
'mpfr-2-0-3-rel'.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/tags/mpfr-2-0-3-rel@2778 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/thypot.c')
-rw-r--r-- | tests/thypot.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/thypot.c b/tests/thypot.c index 15abd95e0..6ccaffbce 100644 --- a/tests/thypot.c +++ b/tests/thypot.c @@ -1,6 +1,6 @@ /* Test file for mpfr_hypot. -Copyright 2001, 2002, 2003 Free Software Foundation. +Copyright 2001, 2002, 2003, 2004 Free Software Foundation. Adapted from tarctan.c. This file is part of the MPFR Library. @@ -67,6 +67,19 @@ test_large (void) mpfr_set_str_binary (t, "0.11111001010011000001110110001101011100001000010010100E-1021"); mpfr_hypot (y, x, t, GMP_RNDN); + mpfr_set_prec (x, 240); + mpfr_set_prec (y, 22); + mpfr_set_prec (t, 2); + mpfr_set_str_binary (x, "0.100111011010010010110100000100000001100010011100110101101111111101011110111011011101010110100101111000111100010100110000100101011110111011100110100110100101110101101100011000001100000001111101110100100100011011011010110111100110010101000111e-7"); + mpfr_set_str_binary (y, "0.1111000010000011000111e-10"); + mpfr_hypot (t, x, y, GMP_RNDN); + mpfr_set_str_binary (y, "0.11E-7"); + if (mpfr_cmp (t, y)) + { + printf ("Error in mpfr_hypot (1)\n"); + exit (1); + } + mpfr_clear (x); mpfr_clear (y); mpfr_clear (z); |