You can subscribe to this list here.
2014 
_{Jan}

_{Feb}
(232) 
_{Mar}
(323) 
_{Apr}
(383) 
_{May}
(359) 
_{Jun}
(435) 
_{Jul}
(252) 
_{Aug}
(172) 
_{Sep}
(265) 
_{Oct}
(263) 
_{Nov}
(350) 
_{Dec}
(359) 

2015 
_{Jan}
(267) 
_{Feb}
(220) 
_{Mar}
(311) 
_{Apr}
(269) 
_{May}
(388) 
_{Jun}
(403) 
_{Jul}
(172) 
_{Aug}
(333) 
_{Sep}

_{Oct}

_{Nov}

_{Dec}

S  M  T  W  T  F  S 



1
(3) 
2
(6) 
3
(32) 
4
(23) 
5
(16) 
6
(16) 
7
(17) 
8
(11) 
9
(9) 
10
(14) 
11
(8) 
12
(4) 
13
(3) 
14
(10) 
15
(4) 
16
(6) 
17
(7) 
18
(10) 
19
(7) 
20
(14) 
21
(12) 
22
(26) 
23
(31) 
24
(28) 
25
(23) 
26
(12) 
27
(12) 
28
(11) 
29
(4) 
30
(4) 



From: Dimiter Prodanov <dimiterpp@gm...>  20140424 23:15:43

Dear all, I have written a short package implementing Dirac's delta function. https://github.com/dprodanov/maximadelta The rules can be used during integration and differentiation of expressions containing delta functions. best regards, Dimiter 
From: Raymond Toy <toy.raymond@gm...>  20140424 21:43:12

>>>>> "Robert" == Robert Dodier <robert.dodier@...> writes: Robert> On 20140424, Dan Gildea <gildea@...> wrote: >> If I run the following command at the maxima command line several >> times in a row, I usually get the first result below, but >> sometimes the second: >> >> (%i46) ev( quad_qawf (exp (u), u, au, omega, sin, limit=32), au=0, omega=2); >> >> (%o46) [0.4000000000000001,22.165709488159253e12,175,0] >> (%i47) ev( quad_qawf (exp (u), u, au, omega, sin, limit=32), au=0, omega=2); >> >> (%o47) quad_qawf(%e^u,u,0,2,sin,epsabs = 10.e11,limit = 32,maxp1 = 100, >> limlst = 10) Robert> Confirmed w/ ECL 11.1.1 (yes, I know it's out of date) + current Maxima Robert> from Git. Tracing SLATEC:DQAWF shows that its last argument is an array Robert> which seems to contain garbage; it has a lot of very large and very Robert> small values, and sometimes NaN. I'm guessing those values cause DQAWF Robert> to fail. Based on the documentation in dqawf.f, the last arg is a work array. Presumably, it can contain any kind of garbage on entry, but it's supposed to contain some useful information on exit. If there are junk values on exit, then we have a problem. Ray 
From: Gunter Königsmann <gunter@pe...>  20140424 21:27:17

BEGIN PGP SIGNED MESSAGE Hash: SHA1 Hello, Gnuplot supports a wide range of terminals. Not all of them are physically able to support the same line types, line colors and so on. The programmers therefore didn't even try to give realworld names for things half the terminals don't support but enumerated them instead. I always felt that as a disadvantage of gnuplot. The draw interface of maxima trys to get rid of this disadvantage by giving the line types real names in grcommon.lisp (function updatelinestyle, near line 706). Would it be possible to allow the user to pass both names ("dots", "solid", "dashes" etc.) *and* numbers of line types? I would then be able to use line types 35.   I have to add a "dashed" in gnuplot.lisp to the "set terminal" line for pdfcairo to make the styles "dashes" and "dashdots" work. According to the gnuplot documentation all terminals save postscript need a "dashed". In Reality pngcairo, pdfcairo, postscript, epslatex, svg, wxt and x11 seem to be the only drivers that support "dashed" as linestyle. Don't know about aquaterm, though, because my gnuplot doesn't support it. Thanks a lot, and kind regards, Gunter. BEGIN PGP SIGNATURE Version: GnuPG v1 Comment: Using GnuPG with Thunderbird  http://www.enigmail.net/ iQIcBAEBAgAGBQJTWYGnAAoJEFyGwOQhHVuOvVQP/iLOqR4P/iHaNJMuJ2oG2ADx FboQcibH2ZwJv161CFtbIl1Qnl/bYKXu+RBZt9kUPmLxCk3Tc1g4msgydoC1HmgT 3cxGGxe54Z9eX4CmdNNgIfGHnRbpS8gpcYZ1SrvbYU9rOiarCgislPzzpzQgAatB NVbRbVzb+m0ytcvZmNg9ZToQAd0Wgxm/5agiTR53o5/zxli4CYUNQ9W26Ld5lsk5 uz2g70PeRhf/iHtLsUB3AO3mkdkDy8Km2NZM+3MRO6znUyjpVdFXWYhYGVdIkJY2 ize05r2coHjPohQk6OBHXQ+WBkBgfRjpYDb3jNg8vRuPiCSgr6PI8xXHj3eVkA/G 6BmYp8wVPrLNLIhOyk+mdfmqzBN/hbfpUqpsDwvnslVVXO2df1ueg9VVE6r2E09E HzV9aQfYW60u1bn7/xZ6ojEJ2LPUat268+HRacGgQ5ji3tfGnIF5sNBu6dJ/c+yd lDFn+m3NYhnBl2svUA9EQ9L011flv+cVwDPf99CP2Gboeqh8+9vQag73cT7+ENZ8 MZLdCqDHBoilScJldH+9v1th/UaVF2DfSsLQufbLkQkVz5+U7OhX43SdKVZ8qR63 Nt3yOZoFjfn5m6AKyuLSShzVxr4zSzlcA6YhA3TgthtZNZEO2qHyPvDEQ0z5fqIq zVgpJMRm8qx07RpMQmve =HHh6 END PGP SIGNATURE 
From: Robert Dodier <robert.dodier@gm...>  20140424 18:39:05

On 20140424, Robert Dodier <robert.dodier@...> wrote: > Confirmed w/ ECL 11.1.1 (yes, I know it's out of date) + current Maxima > from Git. Tracing SLATEC:DQAWF shows that its last argument is an array > which seems to contain garbage; it has a lot of very large and very > small values, and sometimes NaN. I'm guessing those values cause DQAWF > to fail. In a new Maxima session, I find: $ sh maximalocal l ecl (%i1) :lisp (makearray 10 :elementtype 'doublefloat) #(2.1219957909652723e314 2.7585945288971393e313 1.904591395066357e185 9.083672029158622e223 5.681754927174335e322 6.892763928445077e228 7.365061980200348e271 1.1663826040732875e200 2.25522120789225e80 2.5747123037014493e310) while in a new ECL session: $ ecl ECL (Embeddable CommonLisp) 11.1.1 > (makearray 10 :elementtype 'doublefloat) #(0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0) I wonder if Maxima is fiddling with some ECLspecific memory management or optimization flag which is preventing ECL from initializing arrays. best Robert Dodier 
From: Robert Dodier <robert.dodier@gm...>  20140424 18:12:04

On 20140424, Dan Gildea <gildea@...> wrote: > If I run the following command at the maxima command line several > times in a row, I usually get the first result below, but > sometimes the second: > > (%i46) ev( quad_qawf (exp (u), u, au, omega, sin, limit=32), au=0, omega=2); > > (%o46) [0.4000000000000001,22.165709488159253e12,175,0] > (%i47) ev( quad_qawf (exp (u), u, au, omega, sin, limit=32), au=0, omega=2); > > (%o47) quad_qawf(%e^u,u,0,2,sin,epsabs = 10.e11,limit = 32,maxp1 = 100, > limlst = 10) Confirmed w/ ECL 11.1.1 (yes, I know it's out of date) + current Maxima from Git. Tracing SLATEC:DQAWF shows that its last argument is an array which seems to contain garbage; it has a lot of very large and very small values, and sometimes NaN. I'm guessing those values cause DQAWF to fail. With Clisp and SBCL, that array contains all nil values and all zeros, respectively. best Robert Dodier 
From: Raymond Toy <toy.raymond@gm...>  20140424 18:01:52

>>>>> "Daniel" == Daniel Gildea <gildea@...> writes: Daniel> The problem doesn't happen with other lisps. Daniel> If I disable the error handling in quadqawf in quadpack.lisp, Daniel> I get an error like: Daniel> Maxima encountered a Lisp error: Daniel> 8985370930000934825 is not of type (F2CLLIB:INTEGER4). Do you know where this is happening? Using maxima g should get you to a lisp debug repl that might help figure out what's going on. I don't have ecl 13.5.1, so it will take me a little while to upgrade. Ray Daniel> On Thu, April 24, 2014 at 9:15AM, Raymond Toy wrote: >> >>>>> "Dan" == Dan Gildea <gildea@...> writes: >> Dan> I intermittently get the following error in the maxima Dan> test suite with ecl 13.5.1: >> Dan> Running tests in rtest8: Dan> ********************** Problem 104 *************** Dan> Input: Dan> ev(e5, au = 0, omega = 2) >> >> Dan> Result: Dan>  u Dan> quad_qawf(%e , u, 0, 2, sin, epsabs = 10.e11, limit = 32, maxp1 = 100, Dan> limlst = 10) >> Dan> This differed from the expected result: Dan> [0.4000000000000001, 22.16570948815925e12, 175, 0] >> >> >> Dan> If I run the following command at the maxima command line several Dan> times in a row, I usually get the first result below, but Dan> sometimes the second: >> >> >> Dan> (%i46) ev( quad_qawf (exp (u), u, au, omega, sin, limit=32), au=0, omega=2); >> Dan> (%o46) [0.4000000000000001,22.165709488159253e12,175,0] Dan> (%i47) ev( quad_qawf (exp (u), u, au, omega, sin, limit=32), au=0, omega=2); >> Dan> (%o47) quad_qawf(%e^u,u,0,2,sin,epsabs = 10.e11,limit = 32,maxp1 = 100, Dan> limlst = 10) >> >> Well this is really weird. Is it only with ecl 13.5.1? I don't recall >> anything nondeterministic in the quad_qawf algorithm, so this doesn't >> really make sense to me. >> >> Ray Daniel>  Daniel> Start Your Social Network Today  Download eXo Platform Daniel> Build your Enterprise Intranet with eXo Platform Software Daniel> Java Based Open Source Intranet  Social, Extensible, Cloud Ready Daniel> Get Started Now And Turn Your Intranet Into A Collaboration Platform Daniel> http://p.sf.net/sfu/ExoPlatform 
From: Daniel Gildea <gildea@cs...>  20140424 17:19:33

The problem doesn't happen with other lisps. If I disable the error handling in quadqawf in quadpack.lisp, I get an error like: Maxima encountered a Lisp error: 8985370930000934825 is not of type (F2CLLIB:INTEGER4). On Thu, April 24, 2014 at 9:15AM, Raymond Toy wrote: > >>>>> "Dan" == Dan Gildea <gildea@...> writes: > > Dan> I intermittently get the following error in the maxima > Dan> test suite with ecl 13.5.1: > > Dan> Running tests in rtest8: > Dan> ********************** Problem 104 *************** > Dan> Input: > Dan> ev(e5, au = 0, omega = 2) > > > Dan> Result: > Dan>  u > Dan> quad_qawf(%e , u, 0, 2, sin, epsabs = 10.e11, limit = 32, maxp1 = 100, > Dan> limlst = 10) > > Dan> This differed from the expected result: > Dan> [0.4000000000000001, 22.16570948815925e12, 175, 0] > > > > Dan> If I run the following command at the maxima command line several > Dan> times in a row, I usually get the first result below, but > Dan> sometimes the second: > > > > Dan> (%i46) ev( quad_qawf (exp (u), u, au, omega, sin, limit=32), au=0, omega=2); > > Dan> (%o46) [0.4000000000000001,22.165709488159253e12,175,0] > Dan> (%i47) ev( quad_qawf (exp (u), u, au, omega, sin, limit=32), au=0, omega=2); > > Dan> (%o47) quad_qawf(%e^u,u,0,2,sin,epsabs = 10.e11,limit = 32,maxp1 = 100, > Dan> limlst = 10) > > Well this is really weird. Is it only with ecl 13.5.1? I don't recall > anything nondeterministic in the quad_qawf algorithm, so this doesn't > really make sense to me. > > Ray 
From: Kris Katterjohn <katterjohn@gm...>  20140424 17:08:37

On 04/24/2014 11:15 AM, Raymond Toy wrote: >>>>>> "Dan" == Dan Gildea <gildea@...> writes: > Dan> If I run the following command at the maxima command line several > Dan> times in a row, I usually get the first result below, but > Dan> sometimes the second: > > Dan> (%i46) ev( quad_qawf (exp (u), u, au, omega, sin, limit=32), au=0, omega=2); > > Dan> (%o46) [0.4000000000000001,22.165709488159253e12,175,0] > Dan> (%i47) ev( quad_qawf (exp (u), u, au, omega, sin, limit=32), au=0, omega=2); > > Dan> (%o47) quad_qawf(%e^u,u,0,2,sin,epsabs = 10.e11,limit = 32,maxp1 = 100, > Dan> limlst = 10) > > Well this is really weird. Is it only with ecl 13.5.1? I don't recall > anything nondeterministic in the quad_qawf algorithm, so this doesn't > really make sense to me. > I see the same thing with ECL 13.5.1 on 64bit Linux and 32bit NetBSD. (Sometimes I need to run the command 8 times on the 64bit machine to trigger this, but it always seems to happen within 4 times on the 32bit machine.) I haven't been able to reproduce this using Clisp or SBCL. > Ray > Kris Katterjohn 
From: Edwin Woollett <woollett@ch...>  20140424 17:05:40

On Wednesday, April 23, 2014 I wrote:  > Chapter 2, Initial Value Problems (Computational Physics Using > R and Maxima) has been posted to my web page. > From that web page: >  > Chapter 2, Initial Value Problems > A variety of initial value problems are solved using both > R and Maxima. Homemade codes for the Euler method and > the classical fourth order RungeKutta method are > demonstrated with numerous examples. The standard > Maxima methods rk and rkf45 are discussed, and the > R deSolve package ode method is extensively discussed > with many examples. Finally, methods for solving initial > value problems in which the derivatives are discontinuous > and in which the dependent variables are discontinous are discussed. > cp2.pdf : Ch. 2, April 23, 2014, Maxima 5.31.0, R 3.0.2, 71 pages > cp2.tex : Ch. 2 Latex code file > k2util.mac : Maxima utility functions for Ch. 2, April 23, 2014 > myode.mac : Maxima code for Ch. 2 , April 23, 2014, Maxima 5.31 > myode.R : R code for Ch. 2, April 23, 2014, R 3.0.2 > myrkf45.mac : Maxima code for Ch. 2 , April 23, 2014, Maxima 5.31 > Chapter 2 Topics > 1 The Euler Method, Truncation Errors, Roundoff Errors, Instability > 2 4th Order RungeKutta Code for R and Maxima > 3 The Maxima Methods rk and rkf45 > 4 The R package deSolve and Use of ode > 5 Solving O.D.E.'s with External Forcing Data > 6 Integrating O.D.E.'s with Discontinuous Derivatives > 7 Integrating O.D.E.'s with Discontinuous Dependent Variables Using R > 1 Events Specified with a data.frame > 2 Intravenous Drug Injection Model > 3 Using an Event Function at Specified Times > 4 Using an Event Function when a Root Condition is Satisfied > 5 Use of a Switching Parameter as a Dependent Variable >  I somehow failed to upload the cp2.pdf file yesterday as planned. I have now uploaded cp2.pdf to my web page and you should be able to download it. Thanks to those who alerted me to this missing file. Ted Woollett http://www.csulb.edu/~woollett/ 
From: Raymond Toy <toy.raymond@gm...>  20140424 16:15:43

>>>>> "Dan" == Dan Gildea <gildea@...> writes: Dan> I intermittently get the following error in the maxima Dan> test suite with ecl 13.5.1: Dan> Running tests in rtest8: Dan> ********************** Problem 104 *************** Dan> Input: Dan> ev(e5, au = 0, omega = 2) Dan> Result: Dan>  u Dan> quad_qawf(%e , u, 0, 2, sin, epsabs = 10.e11, limit = 32, maxp1 = 100, Dan> limlst = 10) Dan> This differed from the expected result: Dan> [0.4000000000000001, 22.16570948815925e12, 175, 0] Dan> If I run the following command at the maxima command line several Dan> times in a row, I usually get the first result below, but Dan> sometimes the second: Dan> (%i46) ev( quad_qawf (exp (u), u, au, omega, sin, limit=32), au=0, omega=2); Dan> (%o46) [0.4000000000000001,22.165709488159253e12,175,0] Dan> (%i47) ev( quad_qawf (exp (u), u, au, omega, sin, limit=32), au=0, omega=2); Dan> (%o47) quad_qawf(%e^u,u,0,2,sin,epsabs = 10.e11,limit = 32,maxp1 = 100, Dan> limlst = 10) Well this is really weird. Is it only with ecl 13.5.1? I don't recall anything nondeterministic in the quad_qawf algorithm, so this doesn't really make sense to me. Ray 
From: Stavros Macrakis <macrakis@al...>  20140424 14:37:20

The matrix transpose is nice. Remember that Maxima lists are linear linked lists, so random access requires iterating through the list (O(n)), so this is better: multimap_for(f,l) := for i in args(transpose(apply('matrix,l))) do f(i)$ If you want to accumulate the result, instead of for/push/reverse, just use map: multimap_map(f,l) := map(f,args(transpose(apply('matrix,l))))$ On Thu, Apr 24, 2014 at 9:31 AM, Pankaj Sejwal <pankajsejwal@...>wrote: > May be you can riffle information like this, >  > riffle(x):=block([mat:transpose(apply(matrix,x)),out:[]],for i:1 thru > first(matrix_size(mat)) do (push(args(mat[i]),out)),reverse(out))$ > > Usage :: riffle([[a,b,c],[d,e,f],[g,h,i]]); > OUT :: [[a,d,g],[b,e,h],[c,f,i]] >  > Than you can map 'print' or any other function. >  > Regards, > Pankaj Sejwal > _______________________________________________ > "The more I read, the more I acquire, the more certain I am that I know > nothing.”  Voltaire<http://www.goodreads.com/author/show/5754446.Voltaire>; > > >  > Start Your Social Network Today  Download eXo Platform > Build your Enterprise Intranet with eXo Platform Software > Java Based Open Source Intranet  Social, Extensible, Cloud Ready > Get Started Now And Turn Your Intranet Into A Collaboration Platform > http://p.sf.net/sfu/ExoPlatform > _______________________________________________ > Maximadiscuss mailing list > Maximadiscuss@... > https://lists.sourceforge.net/lists/listinfo/maximadiscuss > > 
From: Helmut Jarausch <jarausch@ig...>  20140424 13:54:11

Many thanks, Leo, that's a nice solution. Beware, next time I ask for generators in Maxima (approaching Lisp), Helmut On 04/24/2014 03:37:43 PM, Leo Butler wrote: > Helmut Jarausch <jarausch@...> writes: > > > On 04/24/2014 10:28:37 AM, Gunter Königsmann wrote: > >> Use append(ylist,tlist) as the list you iterate over. > > > > This doesn't work. For the values below > > append(ylist,tlist) gives (1,2,9,1,2,3) > > But as shown by my solution, I need pairs > > i.e. the first element of tlist together with the first element of > > ylist, > > and the second .... in the next iteration an so on. > > > > I could do > > > > for ty in makelist([tlist[i],ylist[i]],i,1,length(tlist)) do ( > > t:first(ty), y:second(ty), > > print(t,y) > > ); > > > > but that isn't appealing either. > > Helmut > > Maxima does not have a parallel loop facility like the CL loop > macro. But map provides all the functionality you need. > > Here is a parallel loop facility written on top of map: > > (%i1) > pfor(variables,lists,[body]) ::= > buildq([variables:variables,lists:lists,body:body], > map(lambda(variables,splice(body)),splice(lists)))$ > > (%i2) > pfor([x,y],[[1,2,3],[1,3,5]], > is(x=y)); > > > (%o2) [true,false,false] > > I do neither the time nor inclination to do so, but it is possible to > redefine Maxima's syntax so that you could redo %i2 as > > pFor [x,y], pIn [[1,2,3],[1,3,5]], pDo is(x=y); > > Note that unlike Maxima's for .. do construction, pfor has a return > value. > > If you want to see the code pfor produces, do > > (%i3) macroexpand(''%i2); > > (%o3) map(lambda([x,y],is(x = y)),[1,2,3],[1,3,5]) > > >  > Leo Butler <l_butler@...> > SDF Public Access UNIX System  http://sdf.lonestar.org > > >  > Start Your Social Network Today  Download eXo Platform > Build your Enterprise Intranet with eXo Platform Software > Java Based Open Source Intranet  Social, Extensible, Cloud Ready > Get Started Now And Turn Your Intranet Into A Collaboration Platform > http://p.sf.net/sfu/ExoPlatform > _______________________________________________ > Maximadiscuss mailing list > Maximadiscuss@... > https://lists.sourceforge.net/lists/listinfo/maximadiscuss > 
From: Pankaj Sejwal <pankajsejwal@gm...>  20140424 13:47:56

Barton and Gunter, member1(l,lis):=block([li:lis,p:false],load(basic),if member(l,li) then p:true else (while(not li=[]) do (li:apply(append,li), if(member(l,li)) then p:true,li:sublist(li,listp))),p)$ I think I had parameters names switched, IN :: member1("+",[[1,2]]); /*It expects everything in a list, so just [1,2] won't work */ IN :: member1([1,2],1); /* member: "2nd "argument must be a nonatomic expression; found .... Thanks for pointing out mistake, and I agree loading should be outside, but I was experimenting if its possible to do it from inside the function in case user is not aware. But sincere thanks for advice indeed. Regards, Pankaj Sejwal On Thu, Apr 24, 2014 at 5:37 PM, Gunter Königsmann <gunter@...>wrote: > Why don't you load basic from outside the function? > > > > > > And... Should (not >li=[]) better read (li # [])? > > Kind regards, > > Gunter. >  > Diese Nachricht wurde von meinem Mobiltelefon mit Kaiten Mail gesendet. >  Regards, Pankaj Sejwal _______________________________________________ "The more I read, the more I acquire, the more certain I am that I know nothing.”  Voltaire <http://www.goodreads.com/author/show/5754446.Voltaire>; 
From: Leo Butler <l_butler@us...>  20140424 13:38:11

Helmut Jarausch <jarausch@...> writes: > On 04/24/2014 10:28:37 AM, Gunter Königsmann wrote: >> Use append(ylist,tlist) as the list you iterate over. > > This doesn't work. For the values below > append(ylist,tlist) gives (1,2,9,1,2,3) > But as shown by my solution, I need pairs > i.e. the first element of tlist together with the first element of > ylist, > and the second .... in the next iteration an so on. > > I could do > > for ty in makelist([tlist[i],ylist[i]],i,1,length(tlist)) do ( > t:first(ty), y:second(ty), > print(t,y) > ); > > but that isn't appealing either. > Helmut Maxima does not have a parallel loop facility like the CL loop macro. But map provides all the functionality you need. Here is a parallel loop facility written on top of map: (%i1) pfor(variables,lists,[body]) ::= buildq([variables:variables,lists:lists,body:body], map(lambda(variables,splice(body)),splice(lists)))$ (%i2) pfor([x,y],[[1,2,3],[1,3,5]], is(x=y)); (%o2) [true,false,false] I do neither the time nor inclination to do so, but it is possible to redefine Maxima's syntax so that you could redo %i2 as pFor [x,y], pIn [[1,2,3],[1,3,5]], pDo is(x=y); Note that unlike Maxima's for .. do construction, pfor has a return value. If you want to see the code pfor produces, do (%i3) macroexpand(''%i2); (%o3) map(lambda([x,y],is(x = y)),[1,2,3],[1,3,5])  Leo Butler <l_butler@...> SDF Public Access UNIX System  http://sdf.lonestar.org 
From: Pankaj Sejwal <pankajsejwal@gm...>  20140424 13:32:29

May be you can riffle information like this,  riffle(x):=block([mat:transpose(apply(matrix,x)),out:[]],for i:1 thru first(matrix_size(mat)) do (push(args(mat[i]),out)),reverse(out))$ Usage :: riffle([[a,b,c],[d,e,f],[g,h,i]]); OUT :: [[a,d,g],[b,e,h],[c,f,i]]  Than you can map 'print' or any other function.  Regards, Pankaj Sejwal _______________________________________________ "The more I read, the more I acquire, the more certain I am that I know nothing.”  Voltaire <http://www.goodreads.com/author/show/5754446.Voltaire>; 
From: Evgeniy Maevskiy <emaevskiy@e...>  20140424 13:13:58

Hello! Maybe this: member1(e,L):=block([p:false], if member(e,L) then return(true), for l in L do if (not atom(l)) then p:p or member1(e,l), p )$ ? Evgeniy 23.04.2014 20:14, Pankaj Sejwal пишет: > Hi, > 1) `member` function works only on first level of list, ex, >  > %IN:: li : [[a, b, > c],[2,3,4,[3,4,5,[00,99,88,[77,66,55,"+"]]]],[ff,gg,tt], [[t, y, > u,[jj,kk,ll]]]] $ > %IN:: member([a,b,c],li) /*True*/ > %IN:: member(b,li); /*False*/ >  > In my opinion this is not completely correct. So, I tried writing this, >  > > member1(lis,l):=block([li:lis,p:false],load(basic),if member(l,li) then > p:true else (while(not li=[]) do (li:apply(append,li), > if(member(l,li)) then > p:true,li:sublist(li,listp))),p)$ > > Usage:: member1(b,li); /*True*/ > member1([a,b,c],li)/*True*/ > member1 > ("+",li)/*True*/ > >  > Should it not be included in maxima > ? > > 2) > I found that there is no function to reach to some specific level in > nested lists and collect the same level lists from various sublists, so > I tried, >  > atlevel(lis,n):=block([li:lis,elem:[]],load(basic),for i:1 thru n do > (li:apply(append,li), > push(sublist(li,lambda([x],(symbolp(x) or > integerp(x) or operatorp(x) or stringp(x) or floatnump(x)))),elem), > li:sublist(li,listp)),[reverse(elem),li])$ > > Usage:: > atlevel(li,2); > /* > [[[a,b,c,2,3,4,ff,gg,tt],[3,4,5,t,y,u]],[[0,99,88,[77,66,55,"a"]],[jj,kk,ll]]] > */ > %IN:: atlevel(li,4) > /* > [[[a,b,c,2,3,4,ff,gg,tt],[3,4,5,t,y,u],[0,99,88,jj,kk,ll],[77,66,55,"a"]],[]] >  > It collects two lists, one of them collects elements in each level > before the level specified and next collects the sublists at specified > level. > These are very tiny functions but can be helpful in list manipulation. > Please try these and suggest optimizations. > > >  > Regards, > Pankaj Sejwal 
From: Gunter Königsmann <gunter@pe...>  20140424 12:08:04

Why don't you load basic from outside the function? And... Should (not >li=[]) better read (li # [])? Kind regards, Gunter.  Diese Nachricht wurde von meinem Mobiltelefon mit Kaiten Mail gesendet. 
From: Barton Willis <willisb@un...>  20140424 11:43:36

> member1(lis,l):=block([li:lis,p:false],load(basic),if member(l,li) then p:true else (while(not >li=[]) do (li:apply(append,li), > if(member(l,li)) then p:true,li:sublist(li,listp))),p)$ OK: (%i2) member1([1,2],1); (%o2) true Bug: (%i3) member1([1,2],x); append: argument must be a nonatomic expression; found 1#0: member1(lis=[1,2],l=x) Also notice that each time member1 is called, Maxima has to load basicthat's a bit slow. Barton  
From: Dan Gildea <gildea@us...>  20140424 11:18:09

I intermittently get the following error in the maxima test suite with ecl 13.5.1: Running tests in rtest8: ********************** Problem 104 *************** Input: ev(e5, au = 0, omega = 2) Result:  u quad_qawf(%e , u, 0, 2, sin, epsabs = 10.e11, limit = 32, maxp1 = 100, limlst = 10) This differed from the expected result: [0.4000000000000001, 22.16570948815925e12, 175, 0] If I run the following command at the maxima command line several times in a row, I usually get the first result below, but sometimes the second: (%i46) ev( quad_qawf (exp (u), u, au, omega, sin, limit=32), au=0, omega=2); (%o46) [0.4000000000000001,22.165709488159253e12,175,0] (%i47) ev( quad_qawf (exp (u), u, au, omega, sin, limit=32), au=0, omega=2); (%o47) quad_qawf(%e^u,u,0,2,sin,epsabs = 10.e11,limit = 32,maxp1 = 100, limlst = 10) 
From: Helmut Jarausch <jarausch@ig...>  20140424 10:18:26

On 04/24/2014 10:28:37 AM, Gunter Königsmann wrote: > Use append(ylist,tlist) as the list you iterate over. This doesn't work. For the values below append(ylist,tlist) gives (1,2,9,1,2,3) But as shown by my solution, I need pairs i.e. the first element of tlist together with the first element of ylist, and the second .... in the next iteration an so on. I could do for ty in makelist([tlist[i],ylist[i]],i,1,length(tlist)) do ( t:first(ty), y:second(ty), print(t,y) ); but that isn't appealing either. Helmut > > Kind regards, > > Gunter. > > On 24. April 2014 10:05:34 MESZ, Helmut Jarausch > <jarausch@...> wrote: > >Hi, > > > >given two list tlist and ylist of equal length, how can I iterate of > >both list like > > for (t,y) in (tlist,ylist) do .... > > > >My current solution is not appealing: > > > > > >tlist:[1,2,3]$ ylist:[1,2,9]$ > >yc:copylist(ylist)$ > >for t in tlist do block([y], > > y:first(yc), yc:rest(yc), > > print(t,y) > >); > > > > > >Many thanks for a hint, > >Helmut > > > >Start Your Social Network Today  Download eXo Platform > >Build your Enterprise Intranet with eXo Platform Software > >Java Based Open Source Intranet  Social, Extensible, Cloud Ready > >Get Started Now And Turn Your Intranet Into A Collaboration Platform > >http://p.sf2Enet/sfu/ExoPlatform > >_______________________________________________ > >Maximadiscuss mailing list > >Maximadiscuss@... > >https://lists.sourceforge.net/lists/listinfo/maximadiscuss > >  > Diese Nachricht wurde von meinem Mobiltelefon mit Kaiten Mail > gesendet. 
From: Pankaj Sejwal <pankajsejwal@gm...>  20140424 08:41:54

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> I would start by looking at, say, share/lapack/dgeqrf.lisp or eigensys.lisp to see how to implement an interface to the underlying lapack routines. This requires some knowledge of lisp, some knowledge of how Fortran works, some knowledge of lapack, and some knowledge of how Maxima stores matrices. I can help with that. Actually, there's a huge amount of boilerplate stuff and perhaps a lot of this could be hidden behind some macros to make it more uniform and consistent. This will also help with writing new interfaces. I can try implementing that. Ray >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> I will investigate it and learn things you suggested. Looks like it is going to take some good time seeing how learned I am with all that is referred to. I am too thankful for your grace to offer me help.  Regards, Pankaj Sejwal _______________________________________________ "The more I read, the more I acquire, the more certain I am that I know nothing.”  Voltaire 
From: Gunter Königsmann <gunter@pe...>  20140424 08:29:00

Use append(ylist,tlist) as the list you iterate over. Kind regards, Gunter. On 24. April 2014 10:05:34 MESZ, Helmut Jarausch <jarausch@...> wrote: >Hi, > >given two list tlist and ylist of equal length, how can I iterate of >both list like > for (t,y) in (tlist,ylist) do .... > >My current solution is not appealing: > > >tlist:[1,2,3]$ ylist:[1,2,9]$ >yc:copylist(ylist)$ >for t in tlist do block([y], > y:first(yc), yc:rest(yc), > print(t,y) >); > > >Many thanks for a hint, >Helmut > >Start Your Social Network Today  Download eXo Platform >Build your Enterprise Intranet with eXo Platform Software >Java Based Open Source Intranet  Social, Extensible, Cloud Ready >Get Started Now And Turn Your Intranet Into A Collaboration Platform >http://p.sf.net/sfu/ExoPlatform >_______________________________________________ >Maximadiscuss mailing list >Maximadiscuss@... >https://lists.sourceforge.net/lists/listinfo/maximadiscuss  Diese Nachricht wurde von meinem Mobiltelefon mit Kaiten Mail gesendet. 
From: Helmut Jarausch <jarausch@ig...>  20140424 08:05:40

Hi, given two list tlist and ylist of equal length, how can I iterate of both list like for (t,y) in (tlist,ylist) do .... My current solution is not appealing: tlist:[1,2,3]$ ylist:[1,2,9]$ yc:copylist(ylist)$ for t in tlist do block([y], y:first(yc), yc:rest(yc), print(t,y) ); Many thanks for a hint, Helmut 
From: Stavros Macrakis <macrakis@al...>  20140424 02:35:12

You may be right; I may be remembering the behavior of obsolete Lisp systems. On Wed, Apr 23, 2014 at 9:58 PM, Robert Dodier <robert.dodier@...>wrote: > On 20140423, Stavros Macrakis <macrakis@...> wrote: > > >> Aside from allowing functions in both value and function cells (in Lisp > >> terms), Maxima resolves the ambiguity of a symbol which has both in > >> favor of the function cell, which has the unfortunate effect of favoring > >> a global declaration to a local one; such action at a distance is, > >> I guess, what makes the suprise unpleasant. > >> > > > > This is the standard behavior in Lisp2 systems. > > Not sure what you mean. In CL at least (I'm not familiar with other > Lisp2's) the kind of ambiguity which afflicts Maxima is impossible. > > (foo 1) > > only looks at the function cell of FOO. > > (funcall foo 1) > > only looks at the value cell, right? > > best > > Robert Dodier > > > >  > Start Your Social Network Today  Download eXo Platform > Build your Enterprise Intranet with eXo Platform Software > Java Based Open Source Intranet  Social, Extensible, Cloud Ready > Get Started Now And Turn Your Intranet Into A Collaboration Platform > http://p.sf.net/sfu/ExoPlatform > _______________________________________________ > Maximadiscuss mailing list > Maximadiscuss@... > https://lists.sourceforge.net/lists/listinfo/maximadiscuss > 
From: Stavros Macrakis <macrakis@al...>  20140424 02:33:49

On Wed, Apr 23, 2014 at 9:40 PM, Robert Dodier <robert.dodier@...>wrote: > On 20140423, Stavros Macrakis <macrakis@...> wrote: > > > * not all of Maxima allows x[1] where it allows a variable > > ** for x[1] thru 3 => syntax error > > ** function, block, and lambda formals (do we really want x[i] and x[2] > as > > formals?) > > ** ... I'm sure there are more > > declare doesn't allow subscripted variables. > That's an interesting one. If I say declare(x[i],integer), does that mean x[i] for all i? or just the literal i? or just expressions which are equal to i? (e.g. x[(i^21)/(i1)1]) If the last, what is the criterion for equality? Does assume(equal(i,j)) mean that x[j] is now declared integer? What if I declare x[i] to be an integer and *later* assume(equal(i,j)) or *locally* assume(equal(i,j))? What if I forget() the assumption that equal(i,j)? > For the record, I don't see any reason to disallow subscripted variables > > as local variables. > I can't think of any language that *does* allow subscripted variables as local variables. Consider (x:[a,b,c],block([x[2]],x:[])? What is the value of x after that? What about (x:[a,b,c],y:x,block([x[2]],y[2]:5))? The obvious implementation would result in x=[a,b,c], y=[a,b,c]. Is that reasonable? Or should the result be x=[a,b,c], y=[a,5,c], at the cost of changing the sharing relationships? Maxima has computing/memoized subscripts. What if x[0]:1, x[i]:=i*x[i1]. Now what is the value of block([x[0]:2],x[3])? This will depend on whether x[1] has been memo'ized before or not.... Is that a good idea, especially because now the value of x[1] *outside* the block will depend on this. In short, I don't think allowing subscripted variables as local will simplify anything; rather it will make the language harder to understand and more implementationdependent. s 