1) What is [a, b, c, d, e]?

2) Your would better replace

  [a, b, c, d, e][randint(0,4)]

by

  choice([a,b,c,d,e])


On 27 October 2016 at 10:00, Jori Mäntysalo <jori.mantys...@uta.fi> wrote:
> As we now have Singular 4, I just made a little random test:
>
> set_random_seed(0)
> for i in range(1000):
>     P = 1
>     while random() < 0.9:
>         M = (randint(1, 5) * ([a, b, c, d, e][randint(0, 4)])^randint(1, 5))
>         A = (randint(1, 5) * ([a, b, c, d, e][randint(0, 4)])^randint(1, 5))
>         P = P*M + A
>     Q = 1
>     while random() < 0.9:
>         M = (randint(1, 5) * ([a, b, c, d, e][randint(0, 4)])^randint(1, 5))
>         A = (randint(1, 5) * ([a, b, c, d, e][randint(0, 4)])^randint(1, 5))
>         Q = Q*M + A
>     if i == 112:
>         print(P)
>         print()
>         print(Q)
>     F = factor(P*Q)
>
> and this got stuck. Might be that it just needs more memory than I have; I
> don't know how much it normally uses.
>
> --
> Jori Mäntysalo

-- 
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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to