On Wed, 17 Sep 2008 21:48:37 -0700 (PDT) John H Palmieri <[EMAIL PROTECTED]> wrote:
> > On Sep 17, 9:09 pm, "William Stein" <[EMAIL PROTECTED]> wrote: > > On Wed, Sep 17, 2008 at 8:59 PM, John H Palmieri > > <[EMAIL PROTECTED]> wrote: <snip> > > > > > Along the same lines, partial fraction decomposition should work > > > for rational numbers; this would work if elements of QQ were > > > instances of FractionFieldElement, right? > > > > Or you could just implement it, which would likely be a good idea. > > It might be a good idea, but I don't know how to do it. How do I > produce, given 1/20, the output 1/4 - 1/5? That is, how do I tell > sage to output 1/4 - 1/5, as an element in QQ, I suppose, without > evaluating it and just printing 1/20? The partial_fraction_decomposition method of FractionFieldElement just returns a list. E.g., sage: (1/20).partial_fraction_decomposition() [1/4, -1/5] Cheers, Burcin --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---