diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2018-05-24 14:28:57 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2018-05-24 14:28:57 +0000 |
commit | 5f3ae4b65bb7668dc1b3a57492f6424c1c02d0bc (patch) | |
tree | 441bb17997d45f6cf8054818ce0e8e4573253b19 /src/hypot.c | |
parent | bb1c30ec23c7a461dbe23dffa6f932360ea1d07d (diff) | |
download | mpfr-5f3ae4b65bb7668dc1b3a57492f6424c1c02d0bc.tar.gz |
[src/hypot.c] Added 2 TODO.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12712 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/hypot.c')
-rw-r--r-- | src/hypot.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/hypot.c b/src/hypot.c index ca44632d8..c9644737e 100644 --- a/src/hypot.c +++ b/src/hypot.c @@ -69,6 +69,8 @@ mpfr_hypot (mpfr_ptr z, mpfr_srcptr x, mpfr_srcptr y, mpfr_rnd_t rnd_mode) return mpfr_abs (z, x, rnd_mode); } + /* TODO: It may be sufficient to just compare the exponents. + The error analysis would need to be updated. */ if (mpfr_cmpabs (x, y) < 0) { mpfr_srcptr u; @@ -159,6 +161,11 @@ mpfr_hypot (mpfr_ptr z, mpfr_srcptr x, mpfr_srcptr y, mpfr_rnd_t rnd_mode) thanks to a FMA (this problem is transferred to the FMA code). */ sh = (mpfr_get_emax () - 1) / 2 - Ex; + /* TODO: The general case could be improved by first avoiding the + scaling and using 2 mpfr_sqr, a mpfr_add and a mpfr_sqrt, possibly + with faithful rounding. Use scaling and the code below only in case + of overflow or underflow. */ + MPFR_ZIV_INIT (loop, Nt); for (;;) { |