[sage-support] Re: Performance problem in sage-3.0.2 and sage-3.0.3

2008-07-02 Thread Daryl Hammond
Thanks Alec for pointing out the incorrect prime count (I was failing to mark the last element in the array as non-prime). Michael, I divided the sieve program into three parts: create array, mark primes, and count primes. I then ran the sieve program under sage-3.0.1 and sage-3.0.2. Here is a s

[sage-support] Re: Efficient selection from a list: Is there a tric?

2008-07-02 Thread Robert Bradshaw
On Jul 2, 2008, at 10:34 PM, John H Palmieri wrote: > On Jul 2, 10:09 pm, Rolandb <[EMAIL PROTECTED]> wrote: >> Suppose you want to select all possible combinations a,b,c,d to from >> the range [1,2,3,4] , but a,b,c,d should be unique (thus not equal). >> The following approach seems clumsy: >> >

[sage-support] Re: Efficient selection from a list: Is there a tric?

2008-07-02 Thread John H Palmieri
On Jul 2, 10:09 pm, Rolandb <[EMAIL PROTECTED]> wrote: > Suppose you want to select all possible combinations a,b,c,d to from > the range [1,2,3,4] , but a,b,c,d should be unique (thus not equal). > The following approach seems clumsy: > > for a in range(1,5): >  for b in range(1,5): >   for c i

[sage-support] Re: Efficient selection from a list: Is there a tric?

2008-07-02 Thread Robert Bradshaw
How about for a, b, c, d in cartesian_product_iterator([range(5)]*4): print a, b, c, d - Robert On Jul 2, 2008, at 10:09 PM, Rolandb wrote: > > Suppose you want to select all possible combinations a,b,c,d to from > the range [1,2,3,4] , but a,b,c,d should be unique (thus not equal). > Th

[sage-support] Efficient selection from a list: Is there a tric?

2008-07-02 Thread Rolandb
Suppose you want to select all possible combinations a,b,c,d to from the range [1,2,3,4] , but a,b,c,d should be unique (thus not equal). The following approach seems clumsy: for a in range(1,5): for b in range(1,5): for c in range(1,5): for d in range(1,5): if a<>b<>c<>d: print a,

[sage-support] Re: Performance problem in sage-3.0.2 and sage-3.0.3

2008-07-02 Thread Alec Mihailovs
Michael Abshoff wrote: > It is about two orders of magnitude and it looks like your Maple code > is actually compiled. In case I am reading your code right could you > tell us what the runtime of an interpreted version of your code would > be like? I would guess that with Cython one could get sim

[sage-support] Re: Accessing terms in an expression

2008-07-02 Thread Mike Hansen
Hi Phil, I don't think there is an official way to get at the terms, but here is something that works: sage: var('x,y') (x, y) sage: t = x^2 + y^2 sage: type(t) sage: t._operator sage: t._operands [x^2, y^2] sage: t._operands[0] x^2 --Mike On Wed, Jul 2, 2008 at 7:49 PM, phil <[EMAIL PROTECT

[sage-support] Accessing terms in an expression

2008-07-02 Thread phil
I've looked around in the documentation but have not been able to figure out how to access individual terms in an symbolic expression. For example: var('x,y') t = x^2 + y^2 How do I access the first term in t? I want to assign it to another variable, like first_term = t.extract_term(t,1) to get

[sage-support] Re: Performance problem in sage-3.0.2 and sage-3.0.3

2008-07-02 Thread mabshoff
On Jul 2, 7:09 pm, "Alec Mihailovs" <[EMAIL PROTECTED]> wrote: > From: "Daryl Hammond" <[EMAIL PROTECTED]> Hi Alec, > > SAGE Version 3.0, Release Date: 2008-04-23 > > array size:       1000 > > number of primes: 664580 > > Elapsed seconds:  70.93 > > That seems to be quite slow anyway. It

[sage-support] Re: Performance problem in sage-3.0.2 and sage-3.0.3

2008-07-02 Thread Alec Mihailovs
From: "Daryl Hammond" <[EMAIL PROTECTED]> > SAGE Version 3.0, Release Date: 2008-04-23 > array size: 1000 > number of primes: 664580 > Elapsed seconds: 70.93 That seems to be quite slow anyway. For example, for my Maple program ES2, see http://www.mapleprimes.com/blog/alec/the-eratost

[sage-support] Re: Performance problem in sage-3.0.2 and sage-3.0.3

2008-07-02 Thread mabshoff
On Jul 2, 4:11 pm, Daryl Hammond <[EMAIL PROTECTED]> wrote: Hi Daryl, > I recently did a clean install of Fedora 9 (formerly running Fedora 8) > and then > installed sage-3.0.3 from source (formerly running sage-3.0).  After > running > "sage -testall" I ran a couple of my own programs. > > I wa

[sage-support] Performance problem in sage-3.0.2 and sage-3.0.3

2008-07-02 Thread Daryl Hammond
I recently did a clean install of Fedora 9 (formerly running Fedora 8) and then installed sage-3.0.3 from source (formerly running sage-3.0). After running "sage -testall" I ran a couple of my own programs. I was surprised to see one of the programs (sieve of Erasthenes) run 70% longer. I instal

[sage-support] Re: Support for creating data bases; fast linear algebra over finite fields

2008-07-02 Thread Simon King
Dear John, On Jul 2, 4:53 pm, John H Palmieri <[EMAIL PROTECTED]> wrote: > > - a quotient of a graded-commutative ring, isomorphic to the > > cohomology ring; these are data in Singular. > > Do you mean, a quotient of a "free" graded-commutative ring, or > something like that? Otherwise, why say

[sage-support] Re: Support for creating data bases; fast linear algebra over finite fields

2008-07-02 Thread Martin Albrecht
> > What dimensions are you talking about? > > Not *that* big, actually. It can easily be more than 1000 rows/columns > (dense), but probably not much more than 3000. How much is the speed > up in that dimensions? > > Cheers > Simon I never checked those dimensions since i always considered

[sage-support] Re: Support for creating data bases; fast linear algebra over finite fields

2008-07-02 Thread John H Palmieri
On Jul 2, 5:36 am, Simon King <[EMAIL PROTECTED]> wrote: > Dear Sage team, > > this time i have two groups of questions. > > 1. > My main project is the creation of a data base of cohomology rings of > finite p-groups (coefficients in GF(p), of course). For each group in > the data base, it shou

[sage-support] Re: Support for creating data bases; fast linear algebra over finite fields

2008-07-02 Thread Simon King
Hi Martin, > the improvement is for GF(2) only but it is in Sage 3.0.3... Good! I mainly work over GF(2), so i am relieved to read that i don't need to load more packages. > What dimensions are you talking about? Not *that* big, actually. It can easily be more than 1000 rows/columns (dense), b

[sage-support] solve doesn't always solve

2008-07-02 Thread Stan Schymanski
Dear all, When I use solve, the variable to be solved for sometimes appears on both sides of the solution. Example: -- | SAGE Version 3.0.2, Release Date: 2008-05-24 | | Type notebook() for the GUI, and lic

[sage-support] Re: Support for creating data bases; fast linear algebra over finite fields

2008-07-02 Thread Martin Albrecht
> 2. > There is a long thread about improving linear algebra (specifically > over small fields) in Sage: > http://groups.google.com/group/sage-devel/browse_thread/thread/aa4edc241ca4 >d6bb/df55b9b03e056e4d?hl=en&lnk=gst&q=M4RM#df55b9b03e056e4d > > Has this improvement become part of the Sage distr

[sage-support] Support for creating data bases; fast linear algebra over finite fields

2008-07-02 Thread Simon King
Dear Sage team, this time i have two groups of questions. 1. My main project is the creation of a data base of cohomology rings of finite p-groups (coefficients in GF(p), of course). For each group in the data base, it should provide - a quotient of a graded-commutative ring, isomorphic to the c