Re: [sage-devel] Re: rational fractions VERY slow

2010-04-30 Thread Florent Hivert
On Fri, Apr 30, 2010 at 10:11:33AM -0700, Pierre wrote: > i'm on 4.3 (and said so already, look again :-) ) Oups > so there's little hope. I think some variant of sage -upgrade http://sage.math.washington.edu/home/release/sage-4.3.5/ should upgrade your sage to the 4.3.5 version which is

[sage-devel] Re: rational fractions VERY slow

2010-04-30 Thread Pierre
i'm on 4.3 (and said so already, look again :-) ) so there's little hope. It seems to be possible to multiply rational fractions by passing them to pari, which returns a string, then parse the string with regular expressions to get the numerator and denominator, and then try : result= sage.rings.

Re: [sage-devel] Re: rational fractions VERY slow

2010-04-30 Thread Florent Hivert
Hi Pierre, > ok, so it failed with : You didn't answer John's crucial question : > What version of sage are you running? If it was 4.3.5 then you could > do the following. Start in the directory where sage is installed > (usually called SAGE_ROOT). I assume that this sage is in your pat

[sage-devel] Re: rational fractions VERY slow

2010-04-30 Thread Pierre
> Try looking at: > > http://www.sagemath.org/doc/developer/walk_through.html hi rob, i quite like the documentation there, but i don't seem to be able to commit any of it to memory -- lack of practice, surely. Every time somebody mentions applying a patch, i think "oh no, don't want to read all

Re: [sage-devel] Re: rational fractions VERY slow

2010-04-30 Thread Florent Hivert
Hi Pierre On Fri, Apr 30, 2010 at 09:37:43AM -0700, Pierre wrote: > > Just to let you now: This is supposed to be fixed by Ticket #8296 since > > sage-4.3.4. Moreover it actually works on my machine and some other. Please > > tell us if it's still broken after upgrading (if you dare to ;-) >

[sage-devel] Re: rational fractions VERY slow

2010-04-30 Thread Pierre
ok, so it failed with : m-guillot:sage-ratfunc pedro$ hg qpush applying trac4000_433_combined.patch patching file sage/libs/flint/fmpz_poly.pxi Hunk #1 FAILED at 2 Hunk #3 FAILED at 109 2 out of 3 hunks FAILED -- saving rejects to file sage/libs/flint/ fmpz_poly.pxi.rej patching file sage/rings/fr

[sage-devel] Re: rational fractions VERY slow

2010-04-30 Thread Pierre
> Just to let you now: This is supposed to be fixed by Ticket #8296 since > sage-4.3.4. Moreover it actually works on my machine and some other. Please > tell us if it's still broken after upgrading (if you dare to ;-) hi florent, i knew you had a bot checking for the keyword 'emacs' on the sag

Re: [sage-devel] Re: rational fractions VERY slow

2010-04-30 Thread Florent Hivert
Hi Pierre, On Fri, Apr 30, 2010 at 08:09:44AM -0700, Pierre wrote: > hey thanks, i'll try that when i have time. I'm on sage 4.3 -- i > didn't want to upgrade because the emacs completion is broken in some > recent version prior to 4.4, i noticed this on my other computer; i > guess upgradin

[sage-devel] Re: rational fractions VERY slow

2010-04-30 Thread Rob Beezer
On Apr 30, 7:25 am, Pierre wrote: > > Would it be an option for you to apply the patch at > > >    http://trac.sagemath.org/sage_trac/ticket/4000 > > well, i went to sage-days in marseille and i'm supposed to know about > these things... but mostly i went home feeling that it was just a bit > too

[sage-devel] Re: rational fractions VERY slow

2010-04-30 Thread Pierre
hey thanks, i'll try that when i have time. I'm on sage 4.3 -- i didn't want to upgrade because the emacs completion is broken in some recent version prior to 4.4, i noticed this on my other computer; i guess upgrading now would take me to 4.4, so i won't. On 30 avr, 16:59, John Cremona wrote: >

Re: [sage-devel] Re: rational fractions VERY slow

2010-04-30 Thread John Cremona
What version of sage are you running? If it was 4.3.5 then you could do the following. Start in the directory where sage is installed (usually called SAGE_ROOT). I assume that this sage is in your path. sage -clone ratfunc ## wait a while cd devel/sage-ratfunc sage -hg qinit sage -hg qimport h

Re: [sage-devel] Re: rational fractions VERY slow

2010-04-30 Thread John Cremona
That patch applied fine to 4.3.5, but not quite to 4.4 (see the ticket for details): rebase needed. John On 30 April 2010 15:09, Sebastian Pancratz wrote: > Dear Pierre, > >> I'm trying to find a workaround for my particular example, can someone >> help ? > > Would it be an option for you to app

[sage-devel] Re: rational fractions VERY slow

2010-04-30 Thread Pierre
> Would it be an option for you to apply the patch at > >    http://trac.sagemath.org/sage_trac/ticket/4000 well, i went to sage-days in marseille and i'm supposed to know about these things... but mostly i went home feeling that it was just a bit too complicated... i barely remember that step 1

[sage-devel] Re: rational fractions VERY slow

2010-04-30 Thread Sebastian Pancratz
Dear Pierre, > I'm trying to find a workaround for my particular example, can someone > help ? Would it be an option for you to apply the patch at http://trac.sagemath.org/sage_trac/ticket/4000 ? If I remember correctly, everything should be contained in the last patch file on that ticket,

[sage-devel] Re: rational fractions VERY slow

2010-04-30 Thread Pierre
I'm trying to find a workaround for my particular example, can someone help ? Somehow i've managed to compute separately a polynomial A and another one B, such that A/B is what I'm trying to compute. However asking sage sage: A/B just takes ages (exactly how long i was not patient enough to find

Re: [sage-devel] Re: rational fractions VERY slow

2010-04-30 Thread Martin Albrecht
On Friday 30 April 2010, Sebastian Pancratz wrote: > Indeed. Unfortunately, the patch file is rather large, which makes it > difficult to have it tested and reviewed, and to keep it alive as > other Sage code changes. A while ago I spoke to Martin Albrecht about > this and we are both still inter

[sage-devel] Re: rational fractions VERY slow

2010-04-30 Thread Sebastian Pancratz
Indeed. Unfortunately, the patch file is rather large, which makes it difficult to have it tested and reviewed, and to keep it alive as other Sage code changes. A while ago I spoke to Martin Albrecht about this and we are both still interested in trying to push #4000 a little harder again very so

[sage-devel] Re: rational fractions VERY slow

2010-04-29 Thread Pierre
> This is a known bug, and almost fixed: > > http://trac.sagemath.org/sage_trac/ticket/4000 oh, I see. Can't wait until it's part of sage ! -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups

[sage-devel] Re: rational fractions VERY slow

2010-04-29 Thread Bill Hart
I haven't looked at the underlying code, but my impression is that this sort of thing is unavoidable to some extent. MatrixSpace(QQ['t'], 8).random_element() has the option of using relatively well optimised underlying code for elements of QQ['t']. MatrixSpace(QQ['t'].fraction_field(), 8).random_