diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2021-02-03 00:54:18 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2021-02-03 00:54:18 +0000 |
commit | 604fb667ce910a3ce23f54cbc25048e764322dfe (patch) | |
tree | a2acb1693494ad6aee3d0033cb71722de3e0a1f5 /src/atan2u.c | |
parent | ef0fbce8fe50c131cfcc09af49d22353fff40b3a (diff) | |
download | mpfr-604fb667ce910a3ce23f54cbc25048e764322dfe.tar.gz |
[src/atan2u.c] Added a FIXME: the code is incorrect if y/x yields
an overflow or an underflow.
git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14328 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/atan2u.c')
-rw-r--r-- | src/atan2u.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/atan2u.c b/src/atan2u.c index 6d23eadd5..1839bb7ed 100644 --- a/src/atan2u.c +++ b/src/atan2u.c @@ -207,6 +207,8 @@ mpfr_atan2u (mpfr_ptr z, mpfr_srcptr y, mpfr_srcptr x, unsigned long u, Fourth quadrant: [-1/2,0] [-u/4,0] */ inex = mpfr_div (tmp, y, x, MPFR_RNDN); MPFR_SET_SIGN (tmp, 1); + /* FIXME: The division may overflow or underflow, in which case + the following MPFR_GET_EXP is incorrect. */ expt = MPFR_GET_EXP(tmp); /* |tmp - y/x| <= e1 := 1/2*ulp(tmp) = 2^(expt-prec-1) */ inex |= mpfr_atanu (tmp, tmp, u, MPFR_RNDN); |