[sage-devel] Re: gmp and mpfr performance in sage

2007-07-30 Thread Jonathan Bober
I just did 'first' and 'third' right now, because they were the ones I could do quickly right now. 'Fifth' does look promising, except that when I looked at the install script earlier I was under the impression that those patches were only applied if the processor was either a core 2 or an amd64.

[sage-devel] Re: computing the number of partitions of an integer

2007-07-30 Thread boothby
Last update, 2005? On Mon, 30 Jul 2007, Bill Hart wrote: > > Hi Didier, > > Thanks. I also just found: > > http://www.nongnu.org/hpalib/ > > which fascinates me. Has anyone used it? > > Bill. > > > On 31 Jul, 01:46, "didier deshommes" <[EMAIL PROTECTED]> wrote: >> 2007/7/30, Bill Hart <[EMAIL P

[sage-devel] Re: gmp and mpfr performance in sage

2007-07-30 Thread David Harvey
h okay there's a few pedantic things I'd like to check. First, in some of the samples below you had the include directory wrong, e.g. > [EMAIL PROTECTED]:~/temp$ g++ partitions_c.cc -O3 > -L/home/bober/sage-2.7.1/sage-2.7.1/local/lib > -I/home/bober/sage-2.7.1/sage-2.7.1/local/lib -lmpfr

[sage-devel] Re: gmp and mpfr performance in sage

2007-07-30 Thread Jonathan Bober
I didn't compile the Ubuntu version myself, but I did compile the versions with the timings listed last in the email. I don't want to attach all of this to the list, so see http://www.math.lsa.umich.edu/~bober/sage_stuff/ for the output from configure and make for these builds of gmp and mpfr,

[sage-devel] Re: computing the number of partitions of an integer

2007-07-30 Thread Bill Hart
Hi Didier, Thanks. I also just found: http://www.nongnu.org/hpalib/ which fascinates me. Has anyone used it? Bill. On 31 Jul, 01:46, "didier deshommes" <[EMAIL PROTECTED]> wrote: > 2007/7/30, Bill Hart <[EMAIL PROTECTED]>: > > > I have a similar problem in some code I am currently > > writin

[sage-devel] Re: gmp and mpfr performance in sage

2007-07-30 Thread David Harvey
Did you compile the ubuntu GMP library yourself, or do they come as packaged binaries? (sorry I don't know anything about ubuntu) If you compiled them yourself, what is the CFLAGS string that GMP's configure program produces? Is it the same as what the GMP inside SAGE produces? In fact it woul

[sage-devel] Re: computing the number of partitions of an integer

2007-07-30 Thread didier deshommes
2007/7/30, Bill Hart <[EMAIL PROTECTED]>: > I have a similar problem in some code I am currently > writing. I need precisely quad precision, so mpfr is out of the > question. Hi Bill, You might want to consider Yozo Hida's quaddouble C/C++ package here: http://www.cs.berkeley.edu/~yozo/ There is

[sage-devel] Re: computing the number of partitions of an integer

2007-07-30 Thread Bill Hart
On 31 Jul, 01:24, Bill Hart <[EMAIL PROTECTED]> wrote: > It would be interesting to see the time for Mathematica on a 32 bit > X86 machine, since this would tell us if that is what they do. Doh! I should have read William's timings more carefully. He gives the times for a 32 bit machine. So I g

[sage-devel] Re: gmp and mpfr performance in sage

2007-07-30 Thread Jonathan Bober
Here are some examples of timings with different compilation options. (I'm using 3*10^8) here because it takes long enough to see the difference, but short enough to conveniently run lots of tests. After running hg_sage.pull() to get the newest version, of the code, I get: sage: time a = number

[sage-devel] Re: computing the number of partitions of an integer

2007-07-30 Thread Bill Hart
Wow!! Excellent work indeed. In fact on 64 bit X86 systems you could actually use the 128 bit long doubles to give you a little bit more precision (I believe it only gives you 80 bits including exponent and sign, so probably 64 bit mantissa). It would be interesting to see the time for Mathemati

[sage-devel] Re: questions about element.pyx

2007-07-30 Thread Robert Bradshaw
On Jul 30, 2007, at 12:45 PM, Soroosh Yazdani wrote: > Hi, > > I am trying to implement scalar division in sage, and I'm starting > to get a bit confused about the class hierarchy. I believe that a > while ago there was some discussion about the class hierarchy, but > I have no idea what th

[sage-devel] Re: 3 feature request for multivariate polynomials

2007-07-30 Thread didier deshommes
2007/7/30, Martin Albrecht <[EMAIL PROTECTED]>: > > Hi Didier, > > I hope you don't mind that I have some remarks about your patches Not at all! I am just poking my way through the multivariate code and any input from someone more knowledgeable than me would be greatly appreciated. > > The R.ran

[sage-devel] Re: gmp and mpfr performance in sage

2007-07-30 Thread Jonathan Bober
Short answer: This has occurred to me, and I don't think that it is the problem. I'll try to document this carefully and give a more detailed answer later. On Mon, 2007-07-30 at 14:25 -0700, William Stein wrote: > On 7/30/07, David Harvey <[EMAIL PROTECTED]> wrote: > > Hi, I haven't been followi

[sage-devel] Re: 3 feature request for multivariate polynomials

2007-07-30 Thread Carl Witty
On Jul 30, 12:26 pm, "didier deshommes" <[EMAIL PROTECTED]> wrote: > 2007/7/30, Carl Witty <[EMAIL PROTECTED]>: > > > It seems pretty strange to me, mostly because you lose too much > > information by eliding zeroes. As far as I can tell, given > > MPolynomialRing(QQ,2,order='lex'), all of the fo

[sage-devel] Re: gmp and mpfr performance in sage

2007-07-30 Thread William Stein
On 7/30/07, David Harvey <[EMAIL PROTECTED]> wrote: > Hi, I haven't been following closely, but I wonder if it's a static vs > shared thing. But usually that shouldn't account for such a large > difference, so that's probably not the issue. Do you build and link in the dynamic version of GMP? Th

[sage-devel] Re: gmp and mpfr performance in sage

2007-07-30 Thread David Harvey
Hi, I haven't been following closely, but I wonder if it's a static vs shared thing. But usually that shouldn't account for such a large difference, so that's probably not the issue. david On Jul 30, 2007, at 2:16 PM, Jonathan Bober wrote: > > Update: I've just been looking at this some more,

[sage-devel] Re: gmp and mpfr performance in sage

2007-07-30 Thread Jonathan Bober
Update: I've just been looking at this some more, having realized that sage creates a detailed install.log file, and I can't find any significant difference between the compiler options used when sage compiles gmp and when I compile gmp manually. In particular, they both identify the processor th

[sage-devel] Re: posible licence issue raised by GPL-v3

2007-07-30 Thread William Stein
On 7/30/07, Alec Mihailovs <[EMAIL PROTECTED]> wrote: > > the situation is similar to how one can legally use a program from > > bash -- but are there weird legal issues with doing this: > > sage: mathematica(2) + gap(2) > > 4 > > Related to that, I wonder whether implementing something li

[sage-devel] Re: posible licence issue raised by GPL-v3

2007-07-30 Thread Alec Mihailovs
From: "William Stein" <[EMAIL PROTECTED] > the situation is similar to how one can legally use a program from > bash -- but are there weird legal issues with doing this: > sage: mathematica(2) + gap(2) > 4 Related to that, I wonder whether implementing something like number_of_partition

[sage-devel] questions about element.pyx

2007-07-30 Thread Soroosh Yazdani
Hi, I am trying to implement scalar division in sage, and I'm starting to get a bit confused about the class hierarchy. I believe that a while ago there was some discussion about the class hierarchy, but I have no idea what the results were, and I figured I will just ask my questions here. First,

[sage-devel] Re: 3 feature request for multivariate polynomials

2007-07-30 Thread didier deshommes
2007/7/30, Carl Witty <[EMAIL PROTECTED]>: > It seems pretty strange to me, mostly because you lose too much > information by eliding zeroes. As far as I can tell, given > MPolynomialRing(QQ,2,order='lex'), all of the following polynomials: > > 3*x^2 + 1 > 3*x^5 + x > 3*y^7 + 1 > 3*y + 1

[sage-devel] Re: gmp and mpfr performance in sage

2007-07-30 Thread Jonathan Bober
On Mon, 2007-07-30 at 01:21 -0700, William Stein wrote: > On 7/30/07, Jonathan Bober <[EMAIL PROTECTED]> wrote: > > > While timing the code that I wrote to compute p(n), I noticed that, in > > the latest version, it computes p(10^9) in: > > > > - approximately 2m 30s if I link to the gmp and mpfr

[sage-devel] Re: 3 feature request for multivariate polynomials

2007-07-30 Thread Carl Witty
On Jul 27, 9:20 pm, didier deshommes <[EMAIL PROTECTED]> wrote: > Hi there, > I'm trying to work with multivariate polynomials in SAGE and here are > 3 features that I would like. Assume f is a multi-poly: > * f.coefficients() for multivariate polynomials. I would like to get > all the coefficie

[sage-devel] SAGE and ATLAS

2007-07-30 Thread Kate Minola
William, In the discussion Problem building "linbox" on Gentoo Linux (gcc 4.2.0) you stated: : There is also http://sagemath.org/SAGEbin/linux/64bit/ : however that binary is not built against ATLAS, whereas if : you have ATLAS on your system and build SAGE from source : you'll get a SAGE

[sage-devel] Re: gmp and mpfr performance in sage

2007-07-30 Thread William Stein
On 7/30/07, Jonathan Bober <[EMAIL PROTECTED]> wrote: > While timing the code that I wrote to compute p(n), I noticed that, in > the latest version, it computes p(10^9) in: > > - approximately 2m 30s if I link to the gmp and mpfr included in Ubuntu > (gmp version 3.something, I think) > > - appro

[sage-devel] Re: 3 feature request for multivariate polynomials

2007-07-30 Thread Martin Albrecht
Hi Didier, I hope you don't mind that I have some remarks about your patches The f.coefficients() patch is only against MPolynomial_libsingular but is implemented generally enough to be pushed down to MPolynomial such that MPolynomial_polydict may benefit from it as well. Also, using f.dict()

[sage-devel] gmp and mpfr performance in sage

2007-07-30 Thread Jonathan Bober
Hello. While timing the code that I wrote to compute p(n), I noticed that, in the latest version, it computes p(10^9) in: - approximately 2m 30s if I link to the gmp and mpfr included in Ubuntu (gmp version 3.something, I think) - approximately 3m 30s if I link to the gmp and mpfr included in s