diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2001-06-29 11:56:51 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2001-06-29 11:56:51 +0000 |
commit | a11d6ad162593d565951e044408798279e61204b (patch) | |
tree | 07308f828c0d97c9a7956c84b0c7655adf5c5c9f /div_ui.c | |
parent | 155d1ab1d082b965a7fe8c754eaa8a6205827b30 (diff) | |
download | mpfr-a11d6ad162593d565951e044408798279e61204b.tar.gz |
fixed bug when dividend is 0
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1098 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'div_ui.c')
-rw-r--r-- | div_ui.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -67,6 +67,12 @@ mpfr_div_ui(y, x, u, rnd_mode) } MPFR_CLEAR_INF(y); + + if (MPFR_IS_ZERO(x)) + { + MPFR_SET_ZERO(y); + return 0; + } TMP_MARK(marker); xn = (MPFR_PREC(x)-1)/BITS_PER_MP_LIMB + 1; |