summaryrefslogtreecommitdiff
path: root/tests/tset_ld.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2013-09-27 12:57:37 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2013-09-27 12:57:37 +0000
commit328990ba04aeecc6156212ab28396d2c5bc7eda8 (patch)
treea2364f709222b968d851755d3b588ac2aa564bdc /tests/tset_ld.c
parenta61e14af6d43a05b23cbcb35edb3513819f3cf20 (diff)
downloadmpfr-328990ba04aeecc6156212ab28396d2c5bc7eda8.tar.gz
[tests/tset_ld.c] Avoid a division by zero if MPFR_ERRDIVZERO.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8689 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tset_ld.c')
-rw-r--r--tests/tset_ld.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/tset_ld.c b/tests/tset_ld.c
index 5eb52d4e7..15156da9c 100644
--- a/tests/tset_ld.c
+++ b/tests/tset_ld.c
@@ -68,8 +68,11 @@ print_binary (long double d, int flag)
printf ("NaN\n");
return 0;
}
- if (d < (long double) 0.0 ||
- (d == (long double) 0.0 && (1.0 / (double) d < 0.0)))
+ if (d < (long double) 0.0
+#if !defined(MPFR_ERRDIVZERO)
+ || (d == (long double) 0.0 && (1.0 / (double) d < 0.0))
+#endif
+ )
{
if (flag)
printf ("-");