diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2005-05-17 15:14:37 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2005-05-17 15:14:37 +0000 |
commit | 10eecffeaa739ebe453ec87438c979a1f21c2fa4 (patch) | |
tree | e9392b63d15549cdf4626a076a633a953f27b32d /tests/thypot.c | |
parent | 4dec763f276eca386383c8319c5f71b3e91441dc (diff) | |
download | mpfr-10eecffeaa739ebe453ec87438c979a1f21c2fa4.tar.gz |
hypot(±oo, NaN) now returns +oo, as in ISO C99 (wasn't documented).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3576 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/thypot.c')
-rw-r--r-- | tests/thypot.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/thypot.c b/tests/thypot.c index e03cf2ae7..3de954e95 100644 --- a/tests/thypot.c +++ b/tests/thypot.c @@ -46,6 +46,16 @@ special (void) mpfr_hypot (z, x, y, GMP_RNDN); MPFR_ASSERTN(mpfr_inf_p (z) && mpfr_sgn (z) > 0); + mpfr_set_inf (x, -1); + mpfr_set_nan (y); + mpfr_hypot (z, x, y, GMP_RNDN); + MPFR_ASSERTN(mpfr_inf_p (z) && mpfr_sgn (z) > 0); + + mpfr_set_nan (x); + mpfr_set_inf (y, -1); + mpfr_hypot (z, x, y, GMP_RNDN); + MPFR_ASSERTN(mpfr_inf_p (z) && mpfr_sgn (z) > 0); + mpfr_clear (x); mpfr_clear (y); mpfr_clear (z); |