[sage-devel] Re: multiple versions of optional packages

2009-12-10 Thread Adam Webb
Just for information, here are some other multiple packages. I would guess that the newer versions of glpk and pexpect in experimental are tests. Others seem to be older versions that were left behind after promotion of the package. standard vs optional boehm_gc-7.1.p2 boehm_gc-7.1.p0 standar

Re: [sage-devel] Sage 4.3.rc0 released!

2009-12-10 Thread Dan Drake
On Fri, 11 Dec 2009 at 10:18AM +0700, Mike Hansen wrote: > Sage 4.3.rc0 is out. Source and binary are available at Builds fine on Ubuntu 9.10 amd64, but I have a couple doctest failures, both of which seem like harmless changes to the LaTeX output: dr...@sagenb:~/s/sage-4.3.rc0$ ./sage -t d

[sage-devel] Re: [Maxima] Maxima stats huge numbers of files at startup?

2009-12-10 Thread Robert Dodier
On 12/10/09, William Stein wrote: > 1. "maxima opens the root directory / and stats each file found there. > Then it does the same thing for the /u (home) directory. The sys > admin believes the bottleneck is the slow response of doing a stat on > each NFS home directory, especially slowed down

Re: [sage-devel] Sage 4.3.rc0 released!

2009-12-10 Thread Dan Drake
On Fri, 11 Dec 2009 at 10:18AM +0700, Mike Hansen wrote: > Hello all, > > Sage 4.3.rc0 is out. Source and binary are available at > > http://sage.math.washington.edu/home/mhansen/release/4.3/rc0/sage-4.3.rc0.tar > http://sage.math.washington.edu/home/mhansen/release/4.3/rc0/sage-4.3.rc0-sage.math

[sage-devel] Re: new book by Brent-Zimmerman

2009-12-10 Thread Jason Grout
William Stein wrote: > Hi Sage-Devel, > > Have you ever wondered about the mathematics behind how MPFR, GMP, > MPIR, etc., work under the hood? Fortunately, Paul Zimmerman and > Richard Brent just published a new very-accessible book about exactly > this, and has the foresight to release their bo

[sage-devel] Sage 4.3.rc0 released!

2009-12-10 Thread Mike Hansen
Hello all, Sage 4.3.rc0 is out. Source and binary are available at http://sage.math.washington.edu/home/mhansen/release/4.3/rc0/sage-4.3.rc0.tar http://sage.math.washington.edu/home/mhansen/release/4.3/rc0/sage-4.3.rc0-sage.math.washington.edu-x86_64-Linux.tar.gz The upgrade path is http://sage

Re: [sage-devel] Do we need a stratergy for upgrading to upstream releases

2009-12-10 Thread William Stein
On Thu, Dec 10, 2009 at 6:07 PM, David Kirkby wrote: > It is clear that new upstream packages are going to be frequently > released. Sometimes upgrading the .spkg in Sage causes problems, so > the upgrade is put off. This was the case with Maxima I believe. But > eventually Maxima was upgraded, an

[sage-devel] Do we need a stratergy for upgrading to upstream releases

2009-12-10 Thread David Kirkby
It is clear that new upstream packages are going to be frequently released. Sometimes upgrading the .spkg in Sage causes problems, so the upgrade is put off. This was the case with Maxima I believe. But eventually Maxima was upgraded, and that upgrade caused numerous issues that needed resolving.

[sage-devel] Re: Multiplying inequality by negative number

2009-12-10 Thread Jason Grout
VictorMiller wrote: > To do this correctly in full generality one needs to get into > "cyclindrical algebraic decomposition" -- a set in R^n has a > cylindrical algebraic > decomposition if it is written as a finite union of sets of the form > { x : f(x) > 0 } where f is a polynomial. There is an

[sage-devel] Re: Multiplying inequality by negative number

2009-12-10 Thread VictorMiller
To do this correctly in full generality one needs to get into "cyclindrical algebraic decomposition" -- a set in R^n has a cylindrical algebraic decomposition if it is written as a finite union of sets of the form { x : f(x) > 0 } where f is a polynomial. There is an algorithm due to Tarski for cr

[sage-devel] Re: Multiplying inequality by negative number

2009-12-10 Thread Simon King
Hi! On 10 Dez., 23:15, William Stein wrote: [...] >                                   f := x < y > > > f*(-3) > > ; > >                                   -3 y < -3 x > > > f*z; > >                                   *(x < y, z) > > > f*a; > >                                   *(x < y, a) What els

Re: [sage-devel] Re: Multiplying inequality by negative number

2009-12-10 Thread William Stein
On Thu, Dec 10, 2009 at 1:33 PM, kcrisman wrote: > > > On Dec 10, 2:49 pm, William Stein wrote: >> On Thu, Dec 10, 2009 at 10:32 AM, kcrisman wrote: >> >> >> At this point, I'm just throwing some remarks out, not saying that we >> >> should >> >> do anything in particular. >> >> >> I'm curious

[sage-devel] Re: Multiplying inequality by negative number

2009-12-10 Thread kcrisman
On Dec 10, 2:49 pm, William Stein wrote: > On Thu, Dec 10, 2009 at 10:32 AM, kcrisman wrote: > > >> At this point, I'm just throwing some remarks out, not saying that we > >> should > >> do anything in particular. > > >> I'm curious -- who multiplies equalities by a scalar *except* high school

[sage-devel] Maxima stats huge numbers of files at startup?

2009-12-10 Thread William Stein
Hello, In upgrading Sage (http://sagemath.org) from Maxima-5.16 to Maxima-5.19 some of our users have encountered a major show-stopper issue. These are users that install Sage on certain NFS mounted directories where certain filesystem operations are necessarily slow. Basically, starting up Maxi

Re: [sage-devel] Re: Multiplying inequality by negative number

2009-12-10 Thread William Stein
On Thu, Dec 10, 2009 at 10:32 AM, kcrisman wrote: >> >> At this point, I'm just throwing some remarks out, not saying that we should >> do anything in particular. >> >> I'm curious -- who multiplies equalities by a scalar *except* high school >> students or college students taking entry level coll

Re: [sage-devel] Re: Easy question in Python/Sage...

2009-12-10 Thread Robert Bradshaw
On Dec 10, 2009, at 1:55 AM, javier wrote: > Well, the list comprehension doesn't make a lot of sense here. I think they do. List comprehensions are quite fast and express the intent well. def diffE(a,b): b = set(b) return [x for x in a if x not in b] Is both the fastest (on the dat

Re: [sage-devel] Re: inequaliites -1

2009-12-10 Thread William Stein
On Thu, Dec 10, 2009 at 6:47 AM, kcrisman wrote: > > > On Dec 10, 3:30 am, "ma...@mendelu.cz" wrote: >> Dear sage-devel >> >> I tried to use plot_region as follows >> plot_region(-1 > Note that the documentation for region_plot (not plot_region, though > that would be good to add as an alias) say

Re: [sage-devel] multiple versions of optional packages

2009-12-10 Thread William Stein
On Thu, Dec 10, 2009 at 7:35 AM, MaxTheMouse wrote: > I ran into a couple of things while creating a script to install some > optional packages. > > pil-1.1.6 is listed as an optional package and pil-1.1.6.p2 is listed > as standard. The optional one can be dropped? Done. > > A couple of optiona

Re: [sage-devel] Sage matrix times NumPy array

2009-12-10 Thread William Stein
On Thu, Dec 10, 2009 at 4:54 AM, Dag Sverre Seljebotn wrote: > I have a proposal about M * A, where M is a Sage matrix and A a NumPy > array. The current behaviour appears to be the Kronecker product; I'm > guessing that this is just be a side-effect of Python applying > element-wise __mul__ (if i

Re: [sage-devel] Questions and proposals for matrices

2009-12-10 Thread William Stein
On Thu, Dec 10, 2009 at 4:49 AM, Dag Sverre Seljebotn wrote: > I've started work on efficient sparse matrices over RDF/CDF, and here's > my first round of questions/proposals. I commit to providing an > implementation of these if accepted. > > 1) When multiplying sparse with dense, action.pyx conv

Re: [sage-devel] Re: simplify (sqrt(6)-sqrt(5))^-1

2009-12-10 Thread William Stein
On Thu, Dec 10, 2009 at 4:30 AM, andrejv wrote: > > On Dec 10, 12:39 pm, "ma...@mendelu.cz" wrote: > > On 10 pro, 11:02, Harald Schilly wrote: > > > > > > (%i3) ratsimp(a), algebraic=true; > > > > > Ok, is it wise to do this by default if called from sage? > > > > Not sure (could it break someth

[sage-devel] Re: Multiplying inequality by negative number

2009-12-10 Thread kcrisman
> > At this point, I'm just throwing some remarks out, not saying that we should > do anything in particular. > > I'm curious -- who multiplies equalities by a scalar *except* high school > students or college students taking entry level college algebra classes? Or those in calculus or LP classes

[sage-devel] Class Design

2009-12-10 Thread VictorMiller
This is a question about class design in SAGE. I'm going to implement classes for various flavors of decision diagrams using the outside package CUDD. It turns out that Cudd and its library is already part of SAGE -- it's included as part of Polybori (which uses it "under the covers"). The inter

Re: [sage-devel] Multiplying inequality by negative number

2009-12-10 Thread William Stein
On Thu, Dec 10, 2009 at 12:45 AM, Mike Hansen wrote: > On Thu, Dec 10, 2009 at 3:37 PM, ma...@mendelu.cz wrote: >> sage: f = x + 3 < y - 2 >> sage: f*(-1) >> -x - 3 < -y + 2 >> >> Is this really intended behavior? Shouldnt the answer be the >> following? >> >> sage: f*(-1) >> -x - 3 > -y + 2 >> >

[sage-devel] Re: [Polybori-discuss] Portability issue - GNU specific options sent to non-GNU compiler

2009-12-10 Thread Dr. David Kirkby
Alexander Dreyer wrote: > Dear Dave, >> From >> http://developers.sun.com/solaris/articles/cmp_stlport_libCstd.html >> I read, that one might have to build with -library=stlport4 . >> >> I'll try it out. FWIW, the HP C++ compiler for HP-UX has exactly the same issue as the Sun Studio compiler -

[sage-devel] How should these very useful scripts be integrated?

2009-12-10 Thread Dr. David Kirkby
I've created two small scripts (testcc.sh and testcxx.sh) which work out what compiler is in use - whether it is gcc, or one of several other compilers (Sun, HP, IBM etc). It would be really good to get these into Sage, as it would make numerous tests a lot easier. The ticket for these is http

[sage-devel] Re: inequaliites -1

2009-12-10 Thread Jason Grout
kcrisman wrote: > > On Dec 10, 3:30 am, "ma...@mendelu.cz" wrote: >> Dear sage-devel >> >> I tried to use plot_region as follows >> plot_region(-1 > Note that the documentation for region_plot (not plot_region, though > that would be good to add as an alias) says we have to use a list to > do mu

[sage-devel] multiple versions of optional packages

2009-12-10 Thread MaxTheMouse
I ran into a couple of things while creating a script to install some optional packages. pil-1.1.6 is listed as an optional package and pil-1.1.6.p2 is listed as standard. The optional one can be dropped? A couple of optional packages have multiple versions. $ sage -c "install_package('pyx')" Po

[sage-devel] Re: inequaliites -1

2009-12-10 Thread kcrisman
On Dec 10, 3:30 am, "ma...@mendelu.cz" wrote: > Dear sage-devel > > I tried to use plot_region as follows > plot_region(-10, x>0], ...) and technically -1http://groups.google.com/group/sage-devel URL: http://www.sagemath.org

[sage-devel] Re: A strang bug with Piecewise/integral/plot

2009-12-10 Thread kcrisman
On Dec 10, 3:48 am, Pablo Angulo wrote: > This is related to a subtle, undocumented difference between these two > definitions of a symbolic expression: These are not both symbolic expressions per se - one is callable, the other one isn't. These used to be called SymbolicExpression and Callabl

Re: [sage-devel] Questions and proposals for matrices

2009-12-10 Thread Dag Sverre Seljebotn
Dag Sverre Seljebotn wrote: > 3) As mentioned earlier I'd like to implement explicitly diagonal and > hermitian matrices (at least for RDF and CDF). Would this be OK?: > > sage: parent(hermitian_matrix(RDF, 3)) > Full MatrixSpace of 3 by 3 Hermitian matrices over Real Double Field > > sage: parent

Re: [sage-devel] Sage matrix times NumPy array

2009-12-10 Thread Dag Sverre Seljebotn
Dag Sverre Seljebotn wrote: > I have a proposal about M * A, where M is a Sage matrix and A a NumPy > array. The current behaviour appears to be the Kronecker product; I'm > guessing that this is just be a side-effect of Python applying > element-wise __mul__ (if it is intentional and relied upo

[sage-devel] Sage matrix times NumPy array

2009-12-10 Thread Dag Sverre Seljebotn
I have a proposal about M * A, where M is a Sage matrix and A a NumPy array. The current behaviour appears to be the Kronecker product; I'm guessing that this is just be a side-effect of Python applying element-wise __mul__ (if it is intentional and relied upon, this proposal got harder). I do

[sage-devel] Questions and proposals for matrices

2009-12-10 Thread Dag Sverre Seljebotn
I've started work on efficient sparse matrices over RDF/CDF, and here's my first round of questions/proposals. I commit to providing an implementation of these if accepted. 1) When multiplying sparse with dense, action.pyx converts sparse matrices to dense matrices. I'm not sure about other use

[sage-devel] Re: simplify (sqrt(6)-sqrt(5))^-1

2009-12-10 Thread ma...@mendelu.cz
Great, thanks for explanation. Robert On 10 pro, 13:30, andrejv wrote: > > I don't think there is a bug there. It's just that one form is harder > to compute numerically because of rounding errors. > -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this

[sage-devel] Re: simplify (sqrt(6)-sqrt(5))^-1

2009-12-10 Thread andrejv
On Dec 10, 12:39 pm, "ma...@mendelu.cz" wrote: > On 10 pro, 11:02, Harald Schilly wrote: > > > > (%i3) ratsimp(a), algebraic=true; > > > Ok, is it wise to do this by default if called from sage? > > Not sure (could it break something in integration for example?) but > without this we have bug des

[sage-devel] Re: Easy question in Python/Sage...

2009-12-10 Thread Simon King
Hi Florent! On Dec 10, 10:56 am, Florent Hivert wrote: > > AFAIK, a set is internally represented by a sorted binary tree that, > > ideally, is balanced. > > I think that's not true. It is implemented as a hash table. Indeed, when you > put something into a set, you need the element to be hashabl

[sage-devel] Re: simplify (sqrt(6)-sqrt(5))^-1

2009-12-10 Thread ma...@mendelu.cz
On 10 pro, 11:02, Harald Schilly wrote: > > (%i3) ratsimp(a), algebraic=true; > > Ok, is it wise to do this by default if called from sage? Not sure (could it break something in integration for example?) but without this we have bug described at http://groups.google.cz/group/sage-devel/browse_t

Re: [sage-devel] Re: Easy question in Python/Sage...

2009-12-10 Thread Nathann Cohen
but aren't all the hashable elements ordered in python ? You can compare tuples, integers, Sets, etc... I always wondered how these comparison worked ( and guesses hash functions should be hiding somewhere ) Nathann -- To post to this group, send an email to sage-devel@googlegroups.com To unsub

Re: [sage-devel] Re: Easy question in Python/Sage...

2009-12-10 Thread Florent Hivert
Hi Simon, > Not a big surprise, I would say. I mean, think what "v in b" does, if > b is a list that does not contain v, and what it does if b is a set. > AFAIK, a set is internally represented by a sorted binary tree that, > ideally, is balanced. > > So, in order to find out that v is NOT

[sage-devel] Re: Easy question in Python/Sage...

2009-12-10 Thread Jason Grout
Nathann Cohen wrote: > Thank you very much for your answers !!! I will try to fix these small > issues along with real patches, as I go over the code in the Graph > Section... Most of the time lists are used to represent sets, and I > guess it can be improved in a few cases :-) If you know the un

[sage-devel] Re: simplify (sqrt(6)-sqrt(5))^-1

2009-12-10 Thread Harald Schilly
On Dec 10, 7:27 am, andrejv wrote: > Maxima will remove roots from the denominator by default. You need to > set the option variable algebraic: > > (%i3) ratsimp(a), algebraic=true; Ok, is it wise to do this by default if called from sage? H -- To post to this group, send an email to sage-deve

Re: [sage-devel] Re: Easy question in Python/Sage...

2009-12-10 Thread Nathann Cohen
Thank you very much for your answers !!! I will try to fix these small issues along with real patches, as I go over the code in the Graph Section... Most of the time lists are used to represent sets, and I guess it can be improved in a few cases :-) Nathann -- To post to this group, send an emai

[sage-devel] Re: Easy question in Python/Sage...

2009-12-10 Thread javier
Well, the list comprehension doesn't make a lot of sense here. Even if you want to be as pythonic as possible, you don't want to run the comprehension through all the elements on A, when you can do it just in the elements of B: def diffD(a,b): c = copy(a) for y in b: c.remove(y)

Re: [sage-devel] Re: Easy question in Python/Sage...

2009-12-10 Thread Nathann Cohen
Thankss !!! :-) Nathann 2009/12/10 Carlo Hamalainen : > On Thu, Dec 10, 2009 at 10:37 AM, Nathann Cohen > wrote: >> After a few tests, lists are slightly better for append/pop than set >> is for add/remove. Obviously remove(i) for lists is linear, and hence >> much longer than it is in

Re: [sage-devel] Re: Easy question in Python/Sage...

2009-12-10 Thread Carlo Hamalainen
On Thu, Dec 10, 2009 at 10:37 AM, Nathann Cohen wrote: > After a few tests, lists are slightly better for append/pop than set > is for add/remove. Obviously remove(i) for lists is linear, and hence > much longer than it is in sets... Time complexity of various operations on sets, lists, dictionar

[sage-devel] Re: Easy question in Python/Sage...

2009-12-10 Thread Nathann Cohen
After a few tests, lists are slightly better for append/pop than set is for add/remove. Obviously remove(i) for lists is linear, and hence much longer than it is in sets... I will take a look at the Graph section considering this :-) Nathann On Dec 10, 10:30 am, Nathann Cohen wrote: > ( I forgo

Re: [sage-devel] Re: Easy question in Python/Sage...

2009-12-10 Thread Nathann Cohen
( I forgot to add that in all these cases, lists represent Sets and nothing else ( no repetition, no order, etc... )) 2009/12/10 Nathann Cohen : > In understand, but then there are many places where lists are used in > the Graph section where sets would greatly improve the performances ! > > Natha

Re: [sage-devel] Re: Easy question in Python/Sage...

2009-12-10 Thread Nathann Cohen
In understand, but then there are many places where lists are used in the Graph section where sets would greatly improve the performances ! Nathann 2009/12/10 Simon King : > Hi Nathann! > > On Dec 10, 9:02 am, Nathann Cohen wrote: > [...] >> time cA=diffA(a,b) >> CPU times: user 29.36 s, sys: 0.

[sage-devel] Re: Easy question in Python/Sage...

2009-12-10 Thread Simon King
Hi Nathann! On Dec 10, 9:02 am, Nathann Cohen wrote: [...] > time cA=diffA(a,b) > CPU times: user 29.36 s, sys: 0.09 s, total: 29.45 s > Wall time: 29.76 s > > time cB=diffB(a,b) > CPU times: user 0.03 s, sys: 0.01 s, total: 0.04 s > Wall time: 0.04 s Not a big surprise, I would say. I mean, thi

[sage-devel] Re: Easy question in Python/Sage...

2009-12-10 Thread Nathann Cohen
Hello !!! I just tried it, and I'm actually quite surprised def diffA(a,b): return [v for v in a if v not in b] def diffB(a,b): return list(Set(a).difference(Set(b))) n=10 k=1 a = range(n) b = list(Set([randint(0,n) for i in range(k)])) time cA=diffA(a,b) CPU times: user 29

[sage-devel] Re: A strang bug with Piecewise/integral/plot

2009-12-10 Thread Pablo Angulo
This is related to a subtle, undocumented difference between these two definitions of a symbolic expression: var('v') r(v)=v print r /// v |--> v r=v print r /// v so both are printed different, but they return the same value when called with a question mark: r? /// *File:* /opt/sage-4.1.1/loc

Re: [sage-devel] Multiplying inequality by negative number

2009-12-10 Thread Mike Hansen
On Thu, Dec 10, 2009 at 3:37 PM, ma...@mendelu.cz wrote: > sage: f = x + 3 < y - 2 > sage: f*(-1) > -x - 3 < -y + 2 > > Is this really intended behavior? Shouldnt the answer be the > following? > > sage: f*(-1) > -x - 3 > -y + 2 > > But what about f*(a)  or f*(x-2)? Should Sage return this? > (-x-

[sage-devel] Re: Easy question in Python/Sage...

2009-12-10 Thread MaxTheMouse
On Dec 10, 8:58 am, Nathann Cohen wrote: > Hello everybody !!! > > I recently had to write two very easy lines of python, and I wondered > if there was ( there is ) a better way to write them. The problem is > easy : I have a list A, a list B whose elements all belong to A, and I > want to retur

[sage-devel] Multiplying inequality by negative number

2009-12-10 Thread ma...@mendelu.cz
Dear sage-devel this is doctested in relation.py sage: f = x + 3 < y - 2 sage: f*(-1) -x - 3 < -y + 2 Is this really intended behavior? Shouldnt the answer be the following? sage: f*(-1) -x - 3 > -y + 2 But what about f*(a) or f*(x-2)? Should Sage return this? (-x-3)*(x-2)<(2-y)*(x-2) Or rai

[sage-devel] inequaliites -1

2009-12-10 Thread ma...@mendelu.cz
Dear sage-devel I tried to use plot_region as follows plot_region(-1http://groups.google.com/group/sage-devel URL: http://www.sagemath.org