sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.44k stars 480 forks source link

Improve polynomial templates #17476

Open jdemeyer opened 9 years ago

jdemeyer commented 9 years ago

The files src/sage/rings/polynomial/polynomial_template.pxi and src/sage/libs/flint/nmod_poly_linkage.pxi are a mess:

  1. They are almost completely undocumented
  2. The functions in it cannot be interrupted (see for example #17470)
  3. celement_pow should really be split up in 2 functions: one for the modular case, one for normal powering
  4. This shouldn't be needed:
        except OverflowError:
            return Polynomial.__pow__(self, ee, modulus)

Component: basic arithmetic

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

jpflori commented 9 years ago
comment:2

We should surely have a look at the files organization for p-adics templates as these were written much more recently and possibly in a cleaner way.