Re: [sage-devel] Re: inherit group from monoid

2015-01-19 Thread Robert Bradshaw
On Sun, Jan 18, 2015 at 2:17 AM, Nicolas M. Thiery nicolas.thi...@u-psud.fr wrote: Hi Robert, On Tue, Jan 13, 2015 at 06:11:09PM -0800, Robert Bradshaw wrote: :). It might be possible, but it'd be really, really messy (messier than it is in C++, because one needs the shared

Re: [sage-devel] The fastest way to expand((a1+a2+a3+a4+sqrt(3)*a5)^25)

2015-01-19 Thread mmarco
It is much faster to work with absolute fields instead of towers of extensions: sage: K.sqrt3=QuadraticField(3) sage: F.sqrt5=K.extension(x^2-5) sage: R.a1,a2,a3,a4,a5 = F[] sage: %time _=(a1+a2+a3+sqrt5*a4+sqrt3*a5)^25 CPU times: user 27.4 s, sys: 12 ms, total: 27.4 s Wall time: 27.5 s sage:

Re: [sage-devel] The fastest way to expand((a1+a2+a3+a4+sqrt(3)*a5)^25)

2015-01-19 Thread Ondřej Čertík
Hi Miguel, On Mon, Jan 19, 2015 at 4:03 PM, mmarco mma...@unizar.es wrote: It is much faster to work with absolute fields instead of towers of extensions: sage: K.sqrt3=QuadraticField(3) sage: F.sqrt5=K.extension(x^2-5) sage: R.a1,a2,a3,a4,a5 = F[] sage: %time

Re: [sage-devel] The fastest way to expand((a1+a2+a3+a4+sqrt(3)*a5)^25)

2015-01-19 Thread Nils Bruin
On Monday, January 19, 2015 at 9:27:44 PM UTC-8, Ondřej Čertík wrote: and your approach returns a wrong number of terms, so something is wrong. But it is quite fast. The term count doesn't tell you that. The representation of sqrt3 and sqrt5 doesn't consist of single term expressions:

[sage-devel] Re: The fastest way to expand((a1+a2+a3+a4+sqrt(3)*a5)^25)

2015-01-19 Thread parisse
A perhaps more interesting benchmark : how long does it take to factor it back? -- 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] Re: How does the ECL+Maxima combination work ?

2015-01-19 Thread Robert Dodier
On 2015-01-19, Nils Bruin nbr...@sfu.ca wrote: (require `maxima) [...] (in-package :maxima) MAXIMA #$2+2$ 4 MAXIMA '#$x+5$ (MEVAL* '((MPLUS) $X 5)) MAXIMA (meval '((mplus) 2 2)) 4 One more thing that might be relevant in this context. You can call the DISPLA (note the lack of a

[sage-devel] How does the ECL+Maxima combination work ?

2015-01-19 Thread Julien Puydt
Hi, I wanted to play with maxima-in-ecl to understand how it works, but failed: from reading sage's sources I thought I was supposed to use a MEVAL function, but it failed. Here is what I did: jpuydt@cauchy:~/sage-6.4.1$ ./sage -ecl ECL (Embeddable Common-Lisp) 13.5.1 (git:UNKNOWN) Copyright

Re: [sage-devel] Dashes in software name or version number

2015-01-19 Thread Jeroen Demeyer
I believe dashes can appear in the version number (Singular-x-y-z should be safe) but not in the package name. -- 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] Re: How does the ECL+Maxima combination work ?

2015-01-19 Thread Nils Bruin
On Monday, January 19, 2015 at 8:22:15 AM UTC-8, Dima Pasechnik wrote: On 2015-01-19, Julien Puydt julien...@laposte.net javascript: wrote: Hi, I wanted to play with maxima-in-ecl to understand how it works, but failed: from reading sage's sources I thought I was supposed to use a

Re: [sage-devel] The fastest way to expand((a1+a2+a3+a4+sqrt(3)*a5)^25)

2015-01-19 Thread Ralf Stephan
What is here? AMD Phenom 3GHz, 8GB RAM, no other big jobs Since that expression is large, the cache size of the CPU might significantly impact performance. Wouldn't that affect any of the following? │ Sage Version 6.5.beta5, Release Date: 2015-01-05 │ │ Type

[sage-devel] Re: How does the ECL+Maxima combination work ?

2015-01-19 Thread Dima Pasechnik
On 2015-01-19, Julien Puydt julien.pu...@laposte.net wrote: Hi, I wanted to play with maxima-in-ecl to understand how it works, but failed: from reading sage's sources I thought I was supposed to use a MEVAL function, but it failed. Here is what I did: jpuydt@cauchy:~/sage-6.4.1$ ./sage

Re: [sage-devel] The fastest way to expand((a1+a2+a3+a4+sqrt(3)*a5)^25)

2015-01-19 Thread Ralf Stephan
On Sunday, January 18, 2015 at 9:18:53 AM UTC+1, vdelecroix wrote: Your example can be reduced to polynomials sage: K.sqrt3 = QuadraticField(3) sage: R.a1,a2,a3,a4,a5 = K[] sage: timeit((a1+a2+a3+a4+sqrt3*a5)^25) 5 loops, best of 3: 81 ms per loop How do you get this speed? Here

Re: [sage-devel] The fastest way to expand((a1+a2+a3+a4+sqrt(3)*a5)^25)

2015-01-19 Thread William Stein
On Mon, Jan 19, 2015 at 8:55 AM, Ralf Stephan gtrw...@gmail.com wrote: On Sunday, January 18, 2015 at 9:18:53 AM UTC+1, vdelecroix wrote: Your example can be reduced to polynomials sage: K.sqrt3 = QuadraticField(3) sage: R.a1,a2,a3,a4,a5 = K[] sage: timeit((a1+a2+a3+a4+sqrt3*a5)^25) 5

Re: [sage-devel] The fastest way to expand((a1+a2+a3+a4+sqrt(3)*a5)^25)

2015-01-19 Thread William Stein
On Mon, Jan 19, 2015 at 9:46 AM, Ralf Stephan gtrw...@gmail.com wrote: What is here? AMD Phenom 3GHz, 8GB RAM, no other big jobs Since that expression is large, the cache size of the CPU might significantly impact performance. Wouldn't that affect any of the following? │ Sage Version

Re: [sage-devel] The fastest way to expand((a1+a2+a3+a4+sqrt(3)*a5)^25)

2015-01-19 Thread Ondřej Čertík
On Mon, Jan 19, 2015 at 11:19 AM, Ondřej Čertík ondrej.cer...@gmail.com wrote: Hi Vincent, On Sun, Jan 18, 2015 at 10:06 AM, Vincent Delecroix 20100.delecr...@gmail.com wrote: Hi, 2015-01-18 18:03 UTC+01:00, Ondřej Čertík ondrej.cer...@gmail.com: Can you invent an example, that can't be

Re: [sage-devel] The fastest way to expand((a1+a2+a3+a4+sqrt(3)*a5)^25)

2015-01-19 Thread Vincent Delecroix
Hello Ondrej, For such questions of Sage usage, it is better to discuss on ask.sagemath.org or sage-support. You can also deal with all algebraic numbers at once with QQbar sage: sqrt3 = QQbar(sqrt(3)) sage: sqrt5 = QQbar(sqrt(5)) But then polynomials over QQbar are much slower. Vincent

Re: [sage-devel] The fastest way to expand((a1+a2+a3+a4+sqrt(3)*a5)^25)

2015-01-19 Thread Ondřej Čertík
Hi Vincent, On Mon, Jan 19, 2015 at 11:30 AM, Vincent Delecroix 20100.delecr...@gmail.com wrote: Hello Ondrej, For such questions of Sage usage, it is better to discuss on ask.sagemath.org or sage-support. You can also deal with all algebraic numbers at once with QQbar sage: sqrt3 =

Re: [sage-devel] The fastest way to expand((a1+a2+a3+a4+sqrt(3)*a5)^25)

2015-01-19 Thread Ondřej Čertík
Hi Vincent, On Sun, Jan 18, 2015 at 10:06 AM, Vincent Delecroix 20100.delecr...@gmail.com wrote: Hi, 2015-01-18 18:03 UTC+01:00, Ondřej Čertík ondrej.cer...@gmail.com: Can you invent an example, that can't be converted to polynomials? Perhaps (a1+a2+a3+sqrt(5)*a4+sqrt(3)*a5)^25? Still

Re: [sage-devel] The fastest way to expand((a1+a2+a3+a4+sqrt(3)*a5)^25)

2015-01-19 Thread Nils Bruin
On Monday, January 19, 2015 at 9:46:47 AM UTC-8, Ralf Stephan wrote: What is here? AMD Phenom 3GHz, 8GB RAM, no other big jobs On Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz I'm getting the same times as Vincent. That's on 6.5beta4 or 5. The difference you're reporting is very large. You

Re: [sage-devel] The fastest way to expand((a1+a2+a3+a4+sqrt(3)*a5)^25)

2015-01-19 Thread William Stein
On Mon, Jan 19, 2015 at 10:32 AM, Nils Bruin nbr...@sfu.ca wrote: On Monday, January 19, 2015 at 9:46:47 AM UTC-8, Ralf Stephan wrote: What is here? AMD Phenom 3GHz, 8GB RAM, no other big jobs On Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz I'm getting the same times as Vincent. That's on

Re: [sage-devel] The fastest way to expand((a1+a2+a3+a4+sqrt(3)*a5)^25)

2015-01-19 Thread Nils Bruin
On Monday, January 19, 2015 at 10:35:42 AM UTC-8, William wrote: Nils, did you specifically try this **exact input**?? Full session: sage: sage: K.sqrt3 = QuadraticField(3) sage: sage: R.a1,a2,a3,a4,a5 = K[] sage: sage: timeit((a1+a2+a3+a4+sqrt3*a5)^25) 5 loops, best of 3: 79.9 ms per

Re: [sage-devel] The fastest way to expand((a1+a2+a3+a4+sqrt(3)*a5)^25)

2015-01-19 Thread Vincent Delecroix
The computation in pari (directed from Sage): sage: x=pari(x) sage: y=pari(y) sage: sqrt3=pari(Mod)(x, x^2-3) sage: sqrt5=pari(Mod)(y, y^2-5) sage: a1=pari(a1) sage: a2=pari(a2) sage: a3=pari(a3) sage: a4=pari(a4) sage: a5=pari(a5) sage: time f = (a1+a2+a3+sqrt5*a4+sqrt3*a5)**18 CPU times: user