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

Implement univariate polynomial rings over absolute number fields #10591

Open
lftabera opened this issue Jan 11, 2011 · 3 comments
Open

Implement univariate polynomial rings over absolute number fields #10591

lftabera opened this issue Jan 11, 2011 · 3 comments

Comments

@lftabera
Copy link
Contributor

After some discussion with Sebastian Spancratz it can be interesting to add a specific implementation for univariate polynomials over number fields. This can improve a lot performance, at least for multiplication, addition and gcd.

One approach is to implement Nuberfield(f)[x] more likely QQ[x][y].quotient(f(y))

Note, with patch #10255

sage: K=QQ[x]['y']
sage: y=K.gen()
sage: L=K.quotient(y^16+y^5+y^4+y^3+y^2+y+1)
sage: f=L(K.random_element(16,1500))
sage: g=L(K.random_element(16,1500))
sage: P=NumberField(x^16+x^5+x^4+x^3+x^2+x+1,'a')[x]
sage: f1 = P.random_element(1500)
sage: g1 = P.random_element(1500)
sage: def nfpol_to_pari(f):
    return pari([c._pari_('a') for c in f.list()]).Polrev()
....: 
sage: fpari = nfpol_to_pari(f1)
sage: gpari = nfpol_to_pari(g1)
sage: %time _ = f*g
CPU times: user 1.92 s, sys: 0.00 s, total: 1.92 s
Wall time: 1.94 s
sage: %time _ = f1*g1
CPU times: user 20.29 s, sys: 0.04 s, total: 20.32 s
Wall time: 20.34 s
sage: %time _ = fpari*gpari
CPU times: user 66.50 s, sys: 0.02 s, total: 66.52 s
Wall time: 66.58 s
sage: %time _=f+g
CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s
Wall time: 0.01 s
sage: %time _=f1+g1
CPU times: user 0.02 s, sys: 0.00 s, total: 0.02 s
Wall time: 0.02 s
sage: %time _=fpari+gpari
CPU times: user 0.01 s, sys: 0.00 s, total: 0.01 s
Wall time: 0.01 s

Related tickets: #8558, #10255

Things to do (to be completed):

CC: @wbhart @miguelmarco

Component: basic arithmetic

Keywords: polynomials

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

@lftabera lftabera added this to the sage-4.6.2 milestone Jan 11, 2011
@lftabera

This comment has been minimized.

@lftabera

This comment has been minimized.

@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@miguelmarco
Copy link
Contributor

comment:8

Flint should have suppport for this through Antic, right?

@mkoeppe mkoeppe removed this from the sage-6.4 milestone Dec 29, 2022
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

5 participants