#9438: IntegerMod_int.log has side-effect in Pari
--------------------------------+-------------------------------------------
Reporter: SimonKing | Owner: AlexGhitza
Type: defect | Status: new
Priority: critical | Milestone: sage-4.5
Component: basic arithmetic | Keywords: log finite field pari
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
--------------------------------+-------------------------------------------
Motivated by a bug hunt for #2420, I found:
{{{
sage: R.<a, b> = QQ[]
sage: b._pari_()
b
sage: GF(7)(5).log()
5
sage: b._pari_()
Mod(3, 7)
}}}
The reason is that in the {{{log}}} method, the string
{{{
'b=Mod(%s,%s); if(znorder(b)!=eulerphi(%s),-1,znlog(%s,b))'%(b,
self.__modulus.sageInteger,
self.__modulus.sageInteger, self)
}}}
is evaluated in {{{pari}}}, so that afterwards {{{pari('b')}}} isn't doing
what it should.
Since this bug is triggered whenever a GAP representation of a finite
field element is created, I mark this ticket "critical". I hope "basic
arithmetic" is the right component.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9438>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.