Open
Description
Currently to compute (1..2)^(1//7)
we are converting the rational to an interval. This loses accuracy.
We should instead use the corresponding MPFR function, mpfr_rootn_si
. Unfortunately Julia does not seem to do this yet; issue here.
For rationals whose denominator is a power of 2, we can alternatively use iterated sqrt
to get a fast version that avoids BigFloat
s (but may not be correctly rounded).
As an example, tests in IntervalContractors.jl (which are originally based on ITF1788, IIRC) are failing due to this. For example,
interval(8.673020346900622e8, 8.673020346900623e8)^(1//8)
has a sup
of 13.100000000000005, whereas it should be 13.100000000000001 (i.e. the result is 2 floats too large).