Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uniformize truncated multiplication for polynomials #18420

Closed
videlec opened this issue May 14, 2015 · 22 comments
Closed

Uniformize truncated multiplication for polynomials #18420

videlec opened this issue May 14, 2015 · 22 comments

Comments

@videlec
Copy link
Contributor

videlec commented May 14, 2015

The operation _mul_trunc on polynomials is currently only implemented in specialized classes with custom declaration. We define a global one in Polynomial with signature

class Polynomial:
    cpdef Polynomial _mul_trunc_(self, Polynomial right, long n)

(and deprecate the former _mul_trunc).

We also add specialized implentation for integer polynomials (relying on fmpz_poly_mullow) and rational polynomials (relying on fmpq_poly_mullow).

Such method would be really helpful for multiplication of power series.

Component: algebra

Author: Vincent Delecroix

Branch/Commit: 063516e

Reviewer: Mario Pernici

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

@videlec videlec added this to the sage-6.7 milestone May 14, 2015
@videlec

This comment has been minimized.

@videlec
Copy link
Contributor Author

videlec commented May 14, 2015

Branch: u/vdelecroix/18420

@videlec
Copy link
Contributor Author

videlec commented May 14, 2015

New commits:

446b952Trac 18420: `_mul_trunc_` for all polynomials

@videlec
Copy link
Contributor Author

videlec commented May 14, 2015

Commit: 446b952

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 14, 2015

Changed commit from 446b952 to 4e96421

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 14, 2015

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

4e96421Trac 18420: `_mul_trunc_` for all polynomials

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 15, 2015

Changed commit from 4e96421 to b73a840

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 15, 2015

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

b73a840Trac 18420: `_mul_trunc_` for all polynomials

@videlec
Copy link
Contributor Author

videlec commented May 15, 2015

comment:5

rebased on 6-7.rc0

@videlec

This comment has been minimized.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 15, 2015

Branch pushed to git repo; I updated commit sha1. New commits:

12d6361Trac #18420: fix declaration im polynomial_template.pxi

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 15, 2015

Changed commit from b73a840 to 12d6361

@sagetrac-pernici
Copy link
Mannequin

sagetrac-pernici mannequin commented May 23, 2015

comment:8

Polynomial._mul_trunc_ doctest example should have _mul_trunc_, not _mul_trunc

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 23, 2015

Changed commit from 12d6361 to febe298

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 23, 2015

Branch pushed to git repo; I updated commit sha1. New commits:

febe298Trac #18420: _mul_trunc -> `_mul_trunc_` in doctest

@sagetrac-pernici
Copy link
Mannequin

sagetrac-pernici mannequin commented May 25, 2015

comment:10

Why did you add the comment in
cpdef ModuleElement _rmul_(self, RingElement c) # ??!?

@videlec
Copy link
Contributor Author

videlec commented May 25, 2015

comment:12

Because this has nothing to do in sage/rings/polynomial/polynomial_modn_dense_ntl.pxd. Moreover, it seems to be never used.

It is a good idea to introduce special rule for multiplication by constants. But this should be done globally. I will make the comment clearer.

Vincent

@videlec
Copy link
Contributor Author

videlec commented May 25, 2015

comment:13

All right, I can just get rid of the declaration in the pxd file and everything is fine. Let me do it.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 25, 2015

Changed commit from febe298 to 063516e

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 25, 2015

Branch pushed to git repo; I updated commit sha1. New commits:

063516eTrac #18420: remove redundant declaration of `_lmul_`, _rmul_

@videlec
Copy link
Contributor Author

videlec commented May 25, 2015

Reviewer: Mario Pernici

@vbraun
Copy link
Member

vbraun commented May 26, 2015

Changed branch from u/vdelecroix/18420 to 063516e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants