Open fredrik-johansson opened 1 year ago
In line with the comments about type names in #1516, maybe the type name should be gr_ser_t
rather than gr_series_t
.
One could also try to implement power series based on a generic polynomial interface instead of assuming the gr_poly
representation. Then one could, for example, support series over Q with fmpq_poly
as the underlying representation.
Are we making the rule that the abbreviated names mean dense representation?
Well, that has just been the convention so far. Sparse stuff could be sparse_mat
/ sparse_vec
.
Except in the case of multivariate polynomials where mpoly
already means sparse... but where no one cares about dense anyway :-)
Currently gr_series_t
is used for both R[[x]] and R[[x]] mod x^n. This has two potential upsides: 1) one can reuse a lot of code (e.g. for special functions) for both kinds of rings, 2) it is possible to have inexact representations of elements mod x^n. However, I don't think 2) is really worth the trouble, and the code duplication in 1) should be manageable in other ways.
I think I will refactor this code so that an element of R[[x]] mod x^n is just a gr_poly_t
(or a typedef for one), with a separate gr_ser_t
used only for R[[x]] (and maybe in the future Laurent/Puiseux series).
To do: create a
gr_series
module based on the code already ingr/series.c
and document it.