summaryrefslogtreecommitdiff
path: root/src/root.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2016-02-03 15:27:03 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2016-02-03 15:27:03 +0000
commit10f821ec2ea48215a34d44beb595d6681ea9ec2e (patch)
treec2703d8cdedc26c0e661294d43f0ad60e7f3bb85 /src/root.c
parent25d0c53fc087dab5564051351e195b2bc0552949 (diff)
downloadmpfr-10f821ec2ea48215a34d44beb595d6681ea9ec2e.tar.gz
[src/root.c] Added TODO for code rewrite (discussion between VL and PZ).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9931 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/root.c')
-rw-r--r--src/root.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/root.c b/src/root.c
index e0f9c142e..eaa2555de 100644
--- a/src/root.c
+++ b/src/root.c
@@ -23,6 +23,20 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
#define MPFR_NEED_LONGLONG_H
#include "mpfr-impl.h"
+/* TODO [discussion between VL and PZ]:
+ * - If k = 2 or 3, use mpfr_sqrt / mpfr_cbrt, but check with timings first.
+ * - If k = 4, mpfr_sqrt twice may be more interesting than the current code
+ * (to be tested).
+ * - For large values of k, use exp(log(x)/k). Detect the exact cases a bit
+ * like in mpfr_pow_general: if the Ziv test fails a first time, check for
+ * exactness (first check with the sizes of the numbers from the first 1
+ * to the last 1 in the significand, and if the sizes are compatible,
+ * compute y^k exactly and compare).
+ * - Do timings (in low and high precision) to find the minimal k for which
+ * this is interesting, and possibly get rid of the old code, depending on
+ * these timings.
+ */
+
/* The computation of y = x^(1/k) is done as follows:
Let x = sign * m * 2^(k*e) where m is an integer