Skip to content

GCD, XGCD for polynomial rings with templating #6941

@sagetrac-spancratz

Description

@sagetrac-spancratz

GCD and XGCD methods should return monic greatest common divisors. However, at the moment these two methods in the template file sage/rings/polynomial/polynomial_template.pxi prevent this by enforcing that gcd(a,0) == a and gcd(0,b) == b.

I suggest that the code for these two methods in the template file should only refer to the corresponding celement_foo methods of the actual implementation. This way, all the logic is in the celement_foo methods, rather than being split between the two levels.

The patch for this should touch the template file as well as the two linkage files for GF2X and zmod polynomials.

CC: @rwst @jpflori

Component: algebra

Author: Sebastian Pancratz

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

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