Is this a bug?

4 views
Skip to first unread message

Alex Lara

unread,
Sep 17, 2010, 2:30:57 PM9/17/10
to sage-support
Hi everyone

In Sage 4.5.2 and Sage 4.5.3, I get the following error using
partial_fraction_decomposition()

sage: R.<x> = GF(3)[]
sage: q = (x+1)/(x^3+x+1)
sage: q.partial_fraction_decomposition()
---------------------------------------------------------------------------
AttributeError Traceback (most recent call
last)

/home/lrodri/<ipython console> in <module>()

/home/lrodri/sage-4.5.2/local/lib/python2.6/site-packages/sage/
structure/element.so in sage.structure.element.Element.__getattr__
(sage/structure/element.c:2632)()

/home/lrodri/sage-4.5.2/local/lib/python2.6/site-packages/sage/
structure/parent.so in sage.structure.parent.getattr_from_other_class
(sage/structure/parent.c:2835)()

/home/lrodri/sage-4.5.2/local/lib/python2.6/site-packages/sage/
structure/parent.so in sage.structure.parent.raise_attribute_error
(sage/structure/parent.c:2602)()

AttributeError: 'sage.rings.fraction_field_FpT.FpTElement' object has
no attribute 'partial_fraction_decomposition'

The same error I get using primes different from 2. But if I use 3^2
instead of 3, or a power of some prime, I get a right answer.

I did not have the problem using Sage 4.4.1.

Thanks in advance.

Alex

kcrisman

unread,
Sep 17, 2010, 3:42:02 PM9/17/10
to sage-support


On Sep 17, 2:30 pm, Alex Lara <lrodr...@gmail.com> wrote:
> Hi everyone
>
> In Sage 4.5.2 and Sage 4.5.3, I get the following error using
> partial_fraction_decomposition()
>
> sage: R.<x> = GF(3)[]
> sage: q = (x+1)/(x^3+x+1)

If you try

sage: q.part[tab]

you'll see that this isn't a method for this object.

You are also right that this *was* a method, even as recently as Sage
4.4.4.

Old:
sage: type(q)
<type 'sage.rings.fraction_field_element.FractionFieldElement'>

New:
sage: type(q)
<type 'sage.rings.fraction_field_FpT.FpTElement'>

Sounds like a small API change to me, though probably unintentional.

Looks like ticket #9051, which added this file, was due to Robert
Bradshaw. I'm sure he or someone else will have additional info for
you. I would log this as a new Trac ticket, but I'm not sure whether
this is related to http://trac.sagemath.org/sage_trac/ticket/8499

Thanks for the report!

- kcrisman

Robert Bradshaw

unread,
Sep 17, 2010, 11:28:50 PM9/17/10
to sage-s...@googlegroups.com
Oops. I'll post a fix.

> --
> To post to this group, send email to sage-s...@googlegroups.com
> To unsubscribe from this group, send email to sage-support...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org
>

Robert Bradshaw

unread,
Sep 18, 2010, 8:12:13 PM9/18/10
to sage-s...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages