On Sun, Jan 24, 2010 at 8:40 PM, Stefan Boettner wrote:
> That sort of gets my expressions nicer. It doesn't quite solve the issue with
> the computation time but works for now.
Did working over Frac(ZZ['x,y']) speed things up?
--Mike
--
To post to this group, send email to sage-support@googl
That sort of gets my expressions nicer. It doesn't quite solve the issue with
the computation time but works for now.
Would it be too difficult to have such fractions normalized automatically to
some normal form, e.g. monic denominator polynomial, if the coefficient ring is
a field?
Thanks,
St
On Sun, Jan 24, 2010 at 3:45 PM, Yann wrote:
>
>
> On Jan 24, 9:17 pm, William Stein wrote:
>>
>> Here's a potentially good way to do this right now :-)
>>
>> Define this function:
>>
>> def normalize_denoms(f):
>> n, d = f.numerator(), f.denominator()
>> a = [vector(x.coefficients()).de
On Jan 24, 9:17 pm, William Stein wrote:
>
> Here's a potentially good way to do this right now :-)
>
> Define this function:
>
> def normalize_denoms(f):
> n, d = f.numerator(), f.denominator()
> a = [vector(x.coefficients()).denominator() for x in [n,d]]
> return (n*a[0])/(d*a[1])