Skip to content

Document PowerMode #674

Open
Open
@dpsanders

Description

@dpsanders

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 BigFloats (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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    1.0Planned for the major 1.0 releasedoc

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions