I wa going to write: "Is there any reason not to do

sage: m=random_prime(10^5)
sage: K.<r> = CyclotomicField(m)
sage: R = K.ring_of_integers()
"

but I tried it and the last line is (much too) slow, which probably
means that a generic algorithm is being used even though one knows
that R = Z[r].

John

On 15 April 2014 17:48, Vincent Delecroix <20100.delecr...@gmail.com> wrote:
> Hi François,
>
> Might be related to the ticket #16116 on trac
> (http://trac.sagemath.org/ticket/16116). Note that for performance, it
> is possible to use multivariate polynomials as described in the
> ticket.
>
> Best
> Vincent
>
> 2014-04-15 18:30 UTC+02:00, François Colas <fco...@gmail.com>:
>> Hello group,
>>
>> I am playing with quotient ring of Z over cyclotomic polynomial but it is
>> strangely slow:
>>
>> sage: m = random_prime(10^4); m
>> 2437
>> sage: %time R.<r> = ZZ['z'].quotient(cyclotomic_polynomial(m))
>> CPU times: user 2.50 s, sys: 0.00 s, total: 2.50 s
>> Wall time: 2.50 s
>>
>> cyclotomic_polynomial(m) is created instantly whatever the size of m but
>> the quotient becomes very long:
>>
>> sage: m = random_prime(10^5); m
>> 16231
>> sage: %time R.<r> = ZZ['z'].quotient(cyclotomic_polynomial(m))
>> CPU times: user 217.82 s, sys: 0.00 s, total: 217.82 s
>> Wall time: 217.65 s
>>
>>
>> I am using Sage Version 6.1.1, does anyone could confirm this problem?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "sage-devel" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to sage-devel+unsubscr...@googlegroups.com.
>> To post to this group, send email to sage-devel@googlegroups.com.
>> Visit this group at http://groups.google.com/group/sage-devel.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to