On Wednesday, July 10, 2013 10:14:52 AM UTC-7, John H Palmieri wrote:
>
>
>
> On Wednesday, July 10, 2013 9:31:25 AM UTC-7, Peter Mueller wrote:
>>
>> In the following code the computation seems to run forever, even hitting 
>> Ctrl-C doesn't stop that.
>>
>> k.<b,c> = QQ[]
>> l = k.fraction_field()
>> r.<x> = l[]
>> A = 2*(x^4+x^40)+b*(x^8+x^36)+c*(x^12+x^32)
>> B = A.subs(1/x)
>>
>> If I drop the factor 2* in A=..., then I instantly get the correct 
>> result. I'm running Sage 5.10.
>>
>> I know that factorizations of multivariate polynomials always has been a 
>> mess in Sage, but I'm surprised to see that even a trivial formal 
>> computation doesn't work reliably.
>>
>
> I don't know why this happens, but a workaround:
>

Another workaround: don't use the fraction field l, so replace 

l = k.fraction_field()
r.<x> = l[]

with

r.<x> = k[]

I think that working in iterated fraction fields (where you've first 
inverted b, c, etc., and then by using 1/x, you've inverted x, etc.) is 
very slow. You could also do

r.<x> = k[]
s = r.fraction_field()
A = s(A)

so now A is in the fraction field of QQ[b,c,x]. Then A.subs(x=1/x) works.

-- 
John

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to