Skip to content

Integer and Rational classes need nth_root and exact_power functions #8

Closed
@sagetrac-dmharvey

Description

@sagetrac-dmharvey

It would be useful for Integer and Rational classes to have:

(1) nth_root: this would wrap GMP's mpz_root.
(2) exact_power: would accept a rational number as an index, and work out which root to take. For example

(-8/27).exact_power(2/3) == 4/9

I had to take an exact 6th root of a rational in some code the other day and it was painful going via real numbers, worrying about bits of precision and all that.

Component: basic arithmetic

Issue created by migration from https://trac.sagemath.org/ticket/8

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions