Skip to content

three-argument pow() on integers returns IntegerMod #34143

@yyyyx4

Description

@yyyyx4

Example:

sage: pow(5,7,13).parent()
Ring of integers modulo 13

This contradicts the docstring ("Return (left ^ right) % modulus."), and it doesn't happen for other parents:

sage: R.<x> = GF(59)[]
sage: pow(x,123,x^5-x+1).parent()
Univariate Polynomial Ring in x over Finite Field of size 59

Component: basic arithmetic

Author: Lorenz Panny

Branch/Commit: 299f265

Reviewer: Dave Morris

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions