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 return A-B.
I wrote [v for v in A if v not in B] which may
O.K. so the magic is Maxima flag algebraic=true, as explained in
http://groups.google.cz/group/sage-devel/t/4928c36765ff6972
On 10 pro, 07:38, "ma...@mendelu.cz" wrote:
> Seems that this comes from Maxima. Look at this
>
--
To post to this group, send an email to sage-devel@googlegroups.com
To
On Wed, Dec 9, 2009 at 10:23 PM, Nathann Cohen wrote:
> Just a random thought : wouldn't it be way more efficient to write the
> definitions of a Graph ( and perhaps the basic functions too )
> directly in C, then to wrap them through Cython ?
>
> Nathann
Re: Cython vs C, there isn't a speed diff
Seems that this comes from Maxima. Look at this
sage: fu=maxima(k6).fullratsimp().sage();fu
-12*(3*(28960879780288*sqrt(2) + 49414857768735)*sqrt(3) -
150485145634059*sqrt(2) - 256767132912716)/(3*(40774373203317*sqrt(2)
- 90564557902141)*sqrt(3) - 211869858104760*sqrt(2) + 470587246954565)
sage:
On Dec 10, 6:21 am, kcrisman wrote:
> On Dec 9, 5:07 pm, Harald Schilly wrote:
>
>
>
> > Hi, i got a "report a problem" comment about how
> > simplify/full_simplify works. I think this could be sent to maxima
> > upstream?
>
> > Well, here is the (rather educational) example:
>
> > sage: a=(sqrt(
OK, these are both tickets now:
http://trac.sagemath.org/sage_trac/ticket/7640
http://trac.sagemath.org/sage_trac/ticket/7651
These will need to be dealt with before we can switch. I'm optimistic,
given that this is still a pretty short list. I hope everyone reading
this will try out the patch he
Just a random thought : wouldn't it be way more efficient to write the
definitions of a Graph ( and perhaps the basic functions too )
directly in C, then to wrap them through Cython ?
Nathann
--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, s
Well, in my use of directed graphs I can swear I need to talk about
out-neighbors at least as often as I need to talk about out-
neighbors Storing them two time would not be a waste in opinion,
and anyway we can not afford to have only the out-neighbors
available... I have not read the implemen
sage: a=(sqrt(6)-sqrt(5))^-1
sage: maxima(a).trigrat()
sqrt(6)+sqrt(5)
Now the question is, how to include trigrat function into Sage. I
attempted to do something similar for logarithms and logcontract,
logexpand in http://trac.sagemath.org/sage_trac/ticket/7334 - see the
related dicussion on sag
On Dec 9, 5:07 pm, Harald Schilly wrote:
> Hi, i got a "report a problem" comment about how
> simplify/full_simplify works. I think this could be sent to maxima
> upstream?
>
> Well, here is the (rather educational) example:
>
> sage: a=(sqrt(6)-sqrt(5))^-1
>
> sage: a
> -1/(sqrt(5) - sqrt(6))
>
On 12/08/2009 04:56 PM, William Stein wrote:
> theory" component, which has an *enormous* number (=19) of tickets
> that need review.Is there any plan to get this under review?
If it's not too much trouble, could you please set up Rado's graph editor
http://trac.sagemath.org/sage_trac/ticket/
The following problem, which is ticket
http://trac.sagemath.org/sage_trac/ticket/7645
is one more example of where trying to build Sage on an uncommon platform
(HP-UX) discovers bugs which affect *all* platforms. This is yet one more
justification of why it is desirable to write POSIX compati
I was trying to simplify a somewhat complicated expression involving
two square roots, and seem to have found bugs in how sage parses
things from sympy and maxima. At least, Ondrej checked and sympy
handles things fine, the answer gets corrupted somehow in sage. I
suspect the same is true for ma
On Dec 9, 2009, at 5:40 AM, Pablo De Napoli wrote:
> Many thanks to everybody for your help.
>
> some questions/remarks:
>
> 1) ¿Does every function needs to have two versions: a symbolic one and
> a numerical one?
Somewhat. The situation arises because one often only defines the
function numer
Hi, i got a "report a problem" comment about how
simplify/full_simplify works. I think this could be sent to maxima
upstream?
Well, here is the (rather educational) example:
sage: a=(sqrt(6)-sqrt(5))^-1
sage: a
-1/(sqrt(5) - sqrt(6))
sage: a.full_simplify()
1/(sqrt(2)*sqrt(3) - sqrt(5))
sage:
Responding to a comment from trac:
> One problem IMHO with `c_graph` is that as is (correct me if I'm wrong)
> we won't be able to have a fast `in_neighbors`.
This is certainly true, if you're using a SparseGraph to represent a
DiGraph. In this case, I think there should actually be two
SparseGrap
More details:
gcc --version
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-46)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
Here are some more rele
if you use a constant as a piece in "Piecewise":
sage: f = Piecewise([[(-1,0),0],[(0,pi),sin(x)]])
then you can do anything with this function:
sage: f.default_variable()
...
/home/hassan/Apps/sage-4.2.1/local/lib/python2.6/site-packages/sage/
functions/piecewise.py in default_variable(self)
66
I refer to this book regularly, as it is a good introductory reference
and contains plenty of literature citations.
Some of the more recent algorithms are yet to be described in it, but
having it available is invaluable for the field.
Sadly, I cannot use this as an excuse to bring out the old jok
2009/12/8 Harald Hanche-Olsen :
> Trying to build sage 4.2.1 on Mac OS X 10.5.8 ended in this error message:
> I might have tred to debug this myself, but I don't find "files that
> should have been built weren't" terribly informative. And the
> reference to running ldconfig seems bogus, since t
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 book under a Creative
Commons licen
I don't know. I think Paul Butler wrote that function. Maybe he knows?
On Wed, Dec 9, 2009 at 9:20 AM, Philippe Saade wrote:
> Hello Folks,
>
> This works ==
>
> var('x')
> f1(x) = 2
> f2(x) = 4-x
> f3(x) = exp(x)/10
> f4(x) = sin(2*x)
> f = Piecewise([[(0,1),f1],[(1,2),f2],[(2,3),f3],[(3
Pablo De Napoli wrote:
> 2) the current implementation treats f(x)=sin(x) as a symbolic expression
>
> sage: f(x)=sin(x)
> sage: f
> x |--> sin(x)
> sage: type(f)
>
>
> However, mathematically a function is something different: for instance it
> has a domain and a range (say: this function take
Hello Folks,
This works ==
var('x')
f1(x) = 2
f2(x) = 4-x
f3(x) = exp(x)/10
f4(x) = sin(2*x)
f = Piecewise([[(0,1),f1],[(1,2),f2],[(2,3),f3],[(3,10),f4]])
F = f.integral()
F.plot()
This does not (f1 changed, nothing else)
var('x')
f1(x) = 1
f2(x) = 4-x
f3(x) = exp(x)/10
Many thanks to everybody for your help.
some questions/remarks:
1) ¿Does every function needs to have two versions: a symbolic one and
a numerical
one?
2) the current implementation treats f(x)=sin(x) as a symbolic expression
sage: f(x)=sin(x)
sage: f
x |--> sin(x)
sage: type(f)
However, math
On Wed, 09 Dec 2009 at 04:51AM -0800, Harald Schilly wrote:
> On Dec 9, 1:34 pm, Alex Ghitza wrote:
> > Any other ideas?
>
> Yes, mpmath. It focuses on numerical evaluation and all "special
> functions". Try this:
> http://mpmath.googlecode.com/svn/trunk/doc/build/calculus/integration.html
> ->
On Dec 9, 1:34 pm, Alex Ghitza wrote:
> Any other ideas?
Yes, mpmath. It focuses on numerical evaluation and all "special
functions". Try this:
http://mpmath.googlecode.com/svn/trunk/doc/build/calculus/integration.html
-> i.e. quad, quadosc
H
--
To post to this group, send an email to sage-d
Dear sage-devel,
I am in the process of translating some lecture notes on "experimental
mathematics" from Mathematica to Sage, and I'm running into some
issues that I'll eventually ask about here after they've been brewing
in my head for some time.
Here's the first installment: suppose we want to
On Wed, Dec 9, 2009 at 7:01 PM, Nathann Cohen wrote:
> Would it be possible, using this, to define a symbolic Sum ? Something
> like Sum(Set([1,2,3,4,5,6]))...This would be extremely useful in
What would the output of that be?
There is http://trac.sagemath.org/sage_trac/ticket/3587 , but I don't
Would it be possible, using this, to define a symbolic Sum ? Something
like Sum(Set([1,2,3,4,5,6]))...This would be extremely useful in
LP !!!
Nathann
On Dec 9, 12:48 pm, Jason Grout wrote:
> Nick Alexander wrote:
> > Implementing a particular symbolic function is not outlandishly
> > difficul
Nick Alexander wrote:
> Implementing a particular symbolic function is not outlandishly
> difficult, thanks to the tireless work of Burcin Erocal and Mike
> Hansen. (Apologies to any contributers I have forgotten.)
>
> You need to subclass sage.symbolic.function.SFunction. I don't see
> ma
Robert Bradshaw wrote:
> @sage.symbolic.function.symbolic
> def my_func(x, n):
> if x < 0: return 0
> else: return exp(-1/x^n)
How about exposing the many other properties too:
@sage.symbolic.function.symbolic(latex_name="\phi",...)
def my_func(x,n):
...
which translates to:
de
On Tue, 8 Dec 2009 21:57:30 -0800
Robert Bradshaw wrote:
> > On Wed, Dec 9, 2009 at 12:44 PM, Nick Alexander
> > wrote:
> >> You need to subclass sage.symbolic.function.SFunction. I don't see
> >> many examples, so here is a minimal one:
> >>
> >> from sage.symbolic.function import SFunctio
33 matches
Mail list logo