Skip to content

Overflow in singular polynomial rings #40838

@Connor-McCartney

Description

@Connor-McCartney

Steps To Reproduce

Sage 10.7

#PR.<x, y> = PolynomialRing(Zmod(2**1000))
PR.<x, y> = PolynomialRing(Zmod(2**1000), implementation='singular')
#PR.<x, y> = PolynomialRing(Zmod(2**1000), implementation='generic')
f = x + ZZ(pi.n(10)*2**1000)

Expected Behavior

no overflow

Actual Behavior

generic works fine, but singular now gives OverflowError: Python int too large to convert to C long

Additional Information

seems to be in https://github.com/sagemath/sage/pull/39075/files#diff-c54b2fff7cdc449afa3e0b5f2ffa9f9e5494f772963835c977b591f5e7bf2faaR521, some bug with n_Z2m

Environment

  • Sage Version: 10.7

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide

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