From 0c333508cd631f9541c241df00d416e6bdb31bdd Mon Sep 17 00:00:00 2001 From: vlefevre Date: Fri, 3 Jun 2016 15:30:53 +0000 Subject: [src/set_float128.c] Added FIXME comment: The mpfr_set_float128 code generates a divide-by-zero exception. Suggest a solution. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10430 280ebfd0-de03-0410-8827-d642c229c3f4 --- src/set_float128.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/set_float128.c b/src/set_float128.c index 98e47449b..fb3a8402f 100644 --- a/src/set_float128.c +++ b/src/set_float128.c @@ -44,6 +44,10 @@ mpfr_set_float128 (mpfr_ptr r, __float128 d, mpfr_rnd_t rnd_mode) } /* Check for INF */ + /* FIXME: The code below generates a divide-by-zero exception, thus + will fail if this exception is trapped. Replace it by > and < + comparisons with the maximum positive (resp. negative) finite + binary128 numbers? */ if (MPFR_UNLIKELY (d == ((__float128) 1.0 / (__float128) 0.0))) { mpfr_set_inf (r, 1); -- cgit v1.2.1