#16383: Can't evaluate a polynomial on a finite field if representation is not
"poly"
-------------------------------------------+-------------------
Reporter: landais | Owner:
Type: defect | Status: new
Priority: minor | Milestone:
Component: misc | Resolution:
Keywords: polynomial finite field | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
-------------------------------------------+-------------------
Comment (by landais):
A strange workaround :
Create the finite field with repr="poly" then evaluate any polynomial in
any point then change the representation of finite field elements.
Demo :
{{{
sage: sage: F.<a>=GF(2**8)
sage: sage: PR.<x>=PolynomialRing(F)
sage: sage: f=PR.random_element(9)
sage: sage: b=F.random_element()
sage: sage: f(b)
a^6 + a^5 + a^4 + a^3
sage: F._cache.repr=1
sage: f(b)
78
sage: f=PR.random_element(9)
sage: f(b)
204
sage: f=PR.random_element(7)
sage: b=F.random_element()
sage: f(b)
151
}}}
If you don't evaluate a polynomial before changing the representation, it
does not work. I don't know if changing the representation this way has
any side effect.
--
Ticket URL: <http://trac.sagemath.org/ticket/16383#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.