Looks like a bug, can you open a ticket?

On Monday 19 May 2014 19:13:55 Grégory Landais wrote:
> Hello,
> 
> evaluating a polynomial on a finite field does not work if the finite
> field was created with a 'repr' argument in the constructor different
> than the default one (poly).
> 
> Curently using sage 6.1.1 on ubuntu 12.04 but same behaviour in 6.2.
> 
> Here is the code that works :
> 
> sage: F.<a>=GF(2**8)
> sage: PR.<x>=PolynomialRing(F)
> sage: f=PR.random_element(9)
> sage: b=F.random_element()
> sage: f(b)
> a^6 + a^5 + a^4 + a^3 + a^2 + 1
> 
> 
> 
> 
> And the same code with the repr parameter changed (same behaviour with
> repr="int") :
> 
> sage: F.<a>=GF(2**8, repr="log")
> sage: PR.<x>=PolynomialRing(F)
> sage: f=PR.random_element(9)
> sage: b=F.random_element()
> sage: f(b)
> ---------------------------------------------------------------------------
> NameError                                 Traceback (most recent call last)
> <ipython-input-5-a6714ffdcf66> in <module>()
> ----> 1 f(b)
> 
> /home/local/user/sage/sage-6.2-x86_64-Linux/local/lib/python2.7/site-package
> s/sage/rings/polynomial/polynomial_zz_pex.so in
> sage.rings.polynomial.polynomial_zz_pex.Polynomial_ZZ_pEX.__call__
> (sage/rings/polynomial/polynomial_zz_pex.cpp:14427)()
> 
> /home/local/user/sage/sage-6.2-x86_64-Linux/local/lib/python2.7/site-package
> s/sage/structure/parent.so in sage.structure.parent.Parent.__call__
> (sage/structure/parent.c:8858)()
> 
> /home/local/user/sage/sage-6.2-x86_64-Linux/local/lib/python2.7/site-package
> s/sage/structure/coerce_maps.so in
> sage.structure.coerce_maps.DefaultConvertMap_unique._call_
> (sage/structure/coerce_maps.c:4206)()
> 
> /home/local/user/sage/sage-6.2-x86_64-Linux/local/lib/python2.7/site-package
> s/sage/structure/coerce_maps.so in
> sage.structure.coerce_maps.DefaultConvertMap_unique._call_
> (sage/structure/coerce_maps.c:4113)()
> 
> /home/local/user/sage/sage-6.2-x86_64-Linux/local/lib/python2.7/site-package
> s/sage/rings/finite_rings/finite_field_givaro.pyc in
> _element_constructor_(self, e) 355             2*a4^3 + 2*a4^2 + 1
>     356         """
> --> 357         return self._cache.element_from_data(e)
>     358
>     359     def gen(self, n=0):
> 
> /home/local/user/sage/sage-6.2-x86_64-Linux/local/lib/python2.7/site-package
> s/sage/rings/finite_rings/element_givaro.so in
> sage.rings.finite_rings.element_givaro.Cache_givaro.element_from_data
> (sage/rings/finite_rings/element_givaro.cpp:6459)()
> 
> /home/local/user/sage/sage-6.2-x86_64-Linux/local/lib/python2.7/site-package
> s/sage/rings/finite_rings/element_givaro.so in
> sage.rings.finite_rings.element_givaro.Cache_givaro.element_from_data
> (sage/rings/finite_rings/element_givaro.cpp:5381)()
> 
> <string> in <module>()

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to