Skip to content

Large exponents overflow to negative in polydict ring #6428

@sagetrac-broune

Description

@sagetrac-broune

Large exponents overflow to negative in polydict ring:

sage: from sage.rings.polynomial.multi_polynomial_ring import \
...       MPolynomialRing_polydict
sage: ring = MPolynomialRing_polydict(ZZ, 3, ['a','b','c'], "lex")
sage: a = ring.gens()[0]

sage: a^(2^31-1)
a^2147483647

sage: a^(2^31)
a^-2147483648

sage: a^(2^32)
1

Component: commutative algebra

Author: Willem Jan Palenstijn

Reviewer: Sebastian Pancratz

Merged: sage-4.3.2.alpha0

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions