summaryrefslogtreecommitdiff
path: root/src/div.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2011-01-14 13:43:28 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2011-01-14 13:43:28 +0000
commit0bfaaddeb0f8fbde659f0b4340e558243b2bb73e (patch)
treee73b587354580df3498babfd1f8be9d42e89d4d7 /src/div.c
parent46d68555b570757562b5f9d995976e4f1b25ce18 (diff)
downloadmpfr-0bfaaddeb0f8fbde659f0b4340e558243b2bb73e.tar.gz
[src/div.c] Set the division-by-zero flag.
[tests/tdiv.c, tests/td_div.c] Updated and improved the test of special cases. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7351 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/div.c')
-rw-r--r--src/div.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/div.c b/src/div.c
index 3762b97f1..17b86d384 100644
--- a/src/div.c
+++ b/src/div.c
@@ -202,7 +202,9 @@ mpfr_div (mpfr_ptr q, mpfr_srcptr u, mpfr_srcptr v, mpfr_rnd_t rnd_mode)
}
else
{
+ MPFR_ASSERTD (! MPFR_IS_INF (u));
MPFR_SET_INF(q);
+ mpfr_set_divby0 ();
MPFR_RET(0);
}
}