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

2007-07-31 Thread Jonathan Bober
On Tue, 2007-07-31 at 17:35 -0500, Alec Mihailovs wrote: > > Actually, even on my 32 bit core duo, the long double type seems to give > > 64 bits of precision, so using it might help a little. Do you have any > > idea how to check at run/compile time what the precision of a double or > > a long do

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

2007-07-31 Thread Jonathan Bober
On Tue, 2007-07-31 at 22:16 -0700, Justin C. Walker wrote: [...] > Checking partition count computation: > > On a Core 2 Duo 2.33 Mhz, computing the number of partitions of 10^9: >Mathematica 5.2 (PartitionsP[10^9]:95.5115 s >Sage 2.7.2.1 (number_of_partitions(10^9): 125.2 s >

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

2007-07-31 Thread Jonathan Bober
On Tue, 2007-07-31 at 22:16 -0700, Justin C. Walker wrote: > > On Jul 31, 2007, at 18:36 , William Stein wrote: > > > > > Hi, > > > > Just to extend this thread some more, a few remarks. > > While we're extending this, here's my $0.02 canadian (:-}) [...] > Checking partition count computatio

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

2007-07-31 Thread William Stein
On 7/31/07, Justin C. Walker <[EMAIL PROTECTED]> wrote: > While we're extending this, here's my $0.02 canadian (:-}) > > Yep -- Mathematica 5.2 interestingly totally sucks at > > computing the number of partitions on an Intel OSX > > machine... and SAGE rocks. > > Checking partition count computat

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

2007-07-31 Thread Justin C. Walker
On Jul 31, 2007, at 18:36 , William Stein wrote: > > Hi, > > Just to extend this thread some more, a few remarks. While we're extending this, here's my $0.02 canadian (:-}) > On sage.math: > SAGE: > sage: time n = number_of_partitions(10^7) > CPU times: user 0.73 s, sys: 0.00 s, total: 0.73 s

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

2007-07-31 Thread William Stein
Hi, Just to extend this thread some more, a few remarks. (1) quaddouble has been included in SAGE for several months now, thanks to the hard work of Didier Deshommes and Robert Bradshaw. sage: RQDF Real Quad Double Field sage: RQDF(2).sin() 0.9092974268256816953960198659117448427022549714478902

[sage-devel] Re: gmp and mpfr performance in sage (problem found)

2007-07-31 Thread Jonathan Bober
Ok, it looks like I've tracked down the problem. When sage built on my machine, it did not compile mpfr with -O2. I've replicated this behavior in my own build of mpfr, and it seems to account exactly for the slowdown. Some other options passed to gcc are different, as well. They may be less impo

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

2007-07-31 Thread Alec Mihailovs
From: "Alec Mihailovs" <[EMAIL PROTECTED]> > Being an assembler programmer, I can say definitely that all FPU registers > on x86 are 80-bit and all compilers that I know compile long double as > 80-bit numbers. >From other point of view, 80-bit real gives 64-bit precision in usual sense (mantis

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

2007-07-31 Thread Alec Mihailovs
> Actually, even on my 32 bit core duo, the long double type seems to give > 64 bits of precision, so using it might help a little. Do you have any > idea how to check at run/compile time what the precision of a double or > a long double is? Being an assembler programmer, I can say definitely tha

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

2007-07-31 Thread Jonathan Bober
Here is a better way to tell exactly what libraries are being used: Specify them exactly by file name and link statically. Finally, I found something that narrows down the problem a little bit, I think. [EMAIL PROTECTED]:~/temp$ g++ partitions_c.cc -O3 /home/bober/sage-2.7.1/sage-2.7.1/local/li

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

2007-07-31 Thread Bill Hart
Or probably 212 actually. :-) On 31 Jul, 22:24, Bill Hart <[EMAIL PROTECTED]> wrote: > I do highly recommend this quad double library by the way. And they've > implemented all manor of transcendental functions too!! The quad- > doubles would give you 206 bits, even on your machine. > > Bill. > >

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

2007-07-31 Thread Bill Hart
I do highly recommend this quad double library by the way. And they've implemented all manor of transcendental functions too!! The quad- doubles would give you 206 bits, even on your machine. Bill. On 31 Jul, 21:33, Jonathan Bober <[EMAIL PROTECTED]> wrote: > On Mon, 2007-07-30 at 17:24 -0700, B

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

2007-07-31 Thread Bill Hart
Ah, that's better. Excellent. I feel much happier with this library now. Thanks. Bill. On 31 Jul, 21:38, "Mike Hansen" <[EMAIL PROTECTED]> wrote: > From COPYING, > > "Redistribution and use in source and binary forms, with or without > modification, are permitted provided that the following con

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

2007-07-31 Thread Bill Hart
I believe that the IEEE standard guarantees you 80 bits (though it's only 64 bits of mantissa or something like that). The trouble is, you aren't guaranteed the IEEE standard. I've spent much time researching this, but either I didn't look at the right websites, or this stuff isn't documented wel

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

2007-07-31 Thread Mike Hansen
>From COPYING, "Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met" --Mike On 7/31/07, Bill Hart <[EMAIL PROTECTED]> wrote: > > Oh well, I don't understand all this licensing stuff. So do you > understand

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

2007-07-31 Thread Jonathan Bober
On Mon, 2007-07-30 at 17:24 -0700, Bill Hart wrote: > 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 > m

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

2007-07-31 Thread Bill Hart
Oh well, I don't understand all this licensing stuff. So do you understand this license? What about derived works. Does that mean it is not possible to modify this library and redistribute the modified version? In particular, as a C++ library it is no use to me unmodified. There are also some fun

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

2007-07-31 Thread Pablo De Napoli
In this case, the license does not says that it is in the public domain (but that it is a copyrighted work!), but you can use it as "AS IS". I think that the only condition that is imposed to us is to include the declaimer. Pablo On 7/31/07, Pablo De Napoli <[EMAIL PROTECTED]> wrote: > Certainly

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

2007-07-31 Thread Pablo De Napoli
Certainly no, not everything from a public institution is in the public domain. This should be analyzed case by case. In case of doubt it would be better to ask the author. Pablo On 7/31/07, Bill Hart <[EMAIL PROTECTED]> wrote: > > Yes, I've ended up using Hida and Bailey's quad-double package.

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

2007-07-31 Thread Soroosh Yazdani
ok, so I did misunderstand your response. :) Regarding ModuleElements and AdditiveGroupElements, I guess I was considering modules to be Abelian groups with the action of a ring. I guess I can see advantage and disadvantage for both hierarchy. I think AdditiveGroupElement being derived from Module

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

2007-07-31 Thread Robert Bradshaw
On Jul 31, 2007, at 11:16 AM, Soroosh Yazdani wrote: > I just realized that I was using a seriously outdated version of > sage (2.6.something). Using 2.7.2.1, scalar division on matrices > does work. In case anybody was wondering. > > However, I am still confused on your response regarding Ma

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

2007-07-31 Thread Bill Hart
Yes, I've ended up using Hida and Bailey's quad-double package. Very cool. But the license just says not to use the LB name to promote any derived product. Am I right in assuming this is GPL compatible, i.e. because they are a public institution everything is automatically public domain? Bill.

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

2007-07-31 Thread Soroosh Yazdani
I just realized that I was using a seriously outdated version of sage ( 2.6.something). Using 2.7.2.1, scalar division on matrices does work. In case anybody was wondering. However, I am still confused on your response regarding Matrix being derived from AlgebraElement. Are you saying that Matrix

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

2007-07-31 Thread Nick Alexander
"William Stein" <[EMAIL PROTECTED]> writes: > I also added f.polynomial(...) for f a multivariate polynomial, which > sort of fits into the thread of this discussion. This is > a very useful function for certain applications -- it allows you to > view a multivariate polynomial as a single variab

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

2007-07-31 Thread Robert Bradshaw
On Jul 30, 2007, at 12:26 PM, didier deshommes 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 following polyno

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

2007-07-31 Thread John Cremona
I think you do not need to specify stdc++ explicitly when calling the compiler & linker via "g++" but you do if via "gcc". And it's the library containing C++ specifics including cin, cout etc. John On 7/31/07, David Harvey <[EMAIL PROTECTED]> wrote: > > h okay there's a few pedantic things

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

2007-07-31 Thread William Stein
On 7/31/07, Martin Albrecht <[EMAIL PROTECTED]> wrote: > > > Is this a bug, or am I not using this correctly? > > I'll add the option to construct an MPolynomial_libsingular from a PolyDict. Too late, I just did it, since I needed it for something else I'm doing (related to power series over polyn

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

2007-07-31 Thread Martin Albrecht
> Is this a bug, or am I not using this correctly? I'll add the option to construct an MPolynomial_libsingular from a PolyDict. Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _www: http://www.informatik.uni-bremen.de/~malb _jab: [EMAIL PROTE