## maxima-discuss — Maxima discussion list

You can subscribe to this list here.

 2014 2015 2016 2017 Jan Feb (232) Mar (323) Apr (383) May (359) Jun (435) Jul (252) Aug (172) Sep (265) Oct (263) Nov (350) Dec (359) Jan (267) Feb (220) Mar (311) Apr (269) May (388) Jun (403) Jul (172) Aug (399) Sep (364) Oct (269) Nov (357) Dec (468) Jan (618) Feb (592) Mar (625) Apr (516) May (375) Jun (155) Jul (346) Aug (262) Sep (346) Oct (291) Nov (333) Dec (335) Jan (436) Feb (460) Mar (370) Apr (189) May (252) Jun (272) Jul (286) Aug (292) Sep (233) Oct Nov Dec

Showing results of 14853

<< < 1 2 3 4 5 .. 595 > >> (Page 3 of 595)
 Re: [Maxima-discuss] Substitution of 0 into polynomials From: macsyma - 2017-09-15 09:36:05 ```Dear Michael, Sorry, in general case, F is not only univariate. For instance, if  (S:[a+b=0,c+d=0,e+f=0],   F:(c+a)*y^2+x*((c+b)*y+d+c)+(e+d)*y+(b+a)*x^2+f+e); then I want  (c+a)*y^2+(c+b)*x*y+(e+d)*y That mean, F is an output of  facsum(a polynomial in [x,y,a,b,c,d,e,f],[x,[y,[a,[b,[c,[d,[e,[f]]]]]]]]); and any lhs of any element of S is a coefficient of F. Best regards, macsyma ----- Original Message ----- > From: "Soegtrop, Michael" > To: macsyma  > Date: 2017/9/15, Fri 17:00 > Subject: RE: [Maxima-discuss] Substitution of 0 into polynomials > > Dear Macsyma, > > If you apply apply the ratsubsts individually, you see where the problem is. The > following might work for you: > > sum(x^i*subst(S,coeff(F,x,i)),i,0,2) > > Best regards, > > Michael > Intel Deutschland GmbH > Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany > Tel: +49 89 99 8853-0, http://www.intel.de > Managing Directors: Christin Eisenschmid, Christian Lamprechter > Chairperson of the Supervisory Board: Nicole Lau > Registered Office: Munich > Commercial Register: Amtsgericht Muenchen HRB 186928 > ```
 Re: [Maxima-discuss] Substitution of 0 into polynomials From: Soegtrop, Michael - 2017-09-15 08:01:32 ```Dear Macsyma, If you apply apply the ratsubsts individually, you see where the problem is. The following might work for you: sum(x^i*subst(S,coeff(F,x,i)),i,0,2) Best regards, Michael Intel Deutschland GmbH Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, http://www.intel.de Managing Directors: Christin Eisenschmid, Christian Lamprechter Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928 ```
 Re: [Maxima-discuss] Substitution of 0 into polynomials From: macsyma - 2017-09-15 07:23:27 ```Dear Gunter, Sorry, in genereal case, the elements in S are not only liner equations. >From: Gunter Königsmann > > >(S:[a+b=0,b+c=0],F:(a+b)*x^2+(a+c)*x+b+c,psubst(solve(S,[a,b]),F)); > > >Am 15. September 2017 08:27:59 MESZ schrieb macsyma >Dear all, >> >>Let me ask about substitution of 0 into polynomials.  >> >>For instance, >>(%i1) (S:[a+b=0,b+c=0],F:(a+b)*x^2+(a+c)*x+b+c,subst(S,F)); >>I expect (a+c)*x or (c+a)*x, but >>(%o1) (c+a)*x+c+b >>and I try ratsubst >>(%i2) (load("lrats"),lratsubst(S,F)); >>However >>(%o2) (a-b)*x-b-a >> >>So I made >> subst2(S,L):=block([ss,sl:string(L)], >> for ss in map(string,map(lhs,S)) do sl:ssubst("0",ss,sl), >> eval_string(sl))\$ >>This subst2 works properly, but too slower than subst. >> >>Please tell me how to get an output as I want, in faster method. >> >>best regards, >>macsyma >>________________________________ >>Check out the vibrant tech community on one of the world's most >>engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>________________________________ >>Maxima-discuss mailing list >>Maxima-discuss@... >>https://lists.sourceforge.net/lists/listinfo/maxima-discuss >> >-- >Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet. > > ```
 Re: [Maxima-discuss] Substitution of 0 into polynomials From: Gunter Königsmann - 2017-09-15 06:52:35 Attachments: Message as HTML ```(S:[a+b=0,b+c=0],F:(a+b)*x^2+(a+c)*x+b+c,psubst(solve(S,[a,b]),F)); Am 15. September 2017 08:27:59 MESZ schrieb macsyma : >Dear all, > >Let me ask about substitution of 0 into polynomials.  > >For instance, >(%i1) (S:[a+b=0,b+c=0],F:(a+b)*x^2+(a+c)*x+b+c,subst(S,F)); >I expect (a+c)*x or (c+a)*x, but >(%o1) (c+a)*x+c+b >and I try ratsubst >(%i2) (load("lrats"),lratsubst(S,F)); >However >(%o2) (a-b)*x-b-a > >So I made > subst2(S,L):=block([ss,sl:string(L)], > for ss in map(string,map(lhs,S)) do sl:ssubst("0",ss,sl), > eval_string(sl))\$ >This subst2 works properly, but too slower than subst. > >Please tell me how to get an output as I want, in faster method. > >best regards, >macsyma > > >------------------------------------------------------------------------------ >Check out the vibrant tech community on one of the world's most >engaging tech sites, Slashdot.org! http://sdm.link/slashdot >_______________________________________________ >Maxima-discuss mailing list >Maxima-discuss@... >https://lists.sourceforge.net/lists/listinfo/maxima-discuss -- Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.```
 [Maxima-discuss] Substitution of 0 into polynomials From: macsyma - 2017-09-15 06:28:09 ```Dear all, Let me ask about substitution of 0 into polynomials.  For instance, (%i1) (S:[a+b=0,b+c=0],F:(a+b)*x^2+(a+c)*x+b+c,subst(S,F)); I expect (a+c)*x or (c+a)*x, but (%o1) (c+a)*x+c+b and I try ratsubst (%i2) (load("lrats"),lratsubst(S,F)); However (%o2) (a-b)*x-b-a So I made  subst2(S,L):=block([ss,sl:string(L)],  for ss in map(string,map(lhs,S)) do sl:ssubst("0",ss,sl),  eval_string(sl))\$ This subst2 works properly, but too slower than subst. Please tell me how to get an output as I want, in faster method. best regards, macsyma ```
 Re: [Maxima-discuss] bug at startup Maxima 40 From: Gunter Königsmann - 2017-09-15 01:05:37 Attachments: Message as HTML ```Which version of sbcl are you using? Am 14. September 2017 22:53:46 MESZ schrieb Dimiter Prodanov : >Dear all, > >on Win 8 freshly installed Maxima gives off the following startup bug > >Message from maxima's stderr stream: >; file: C:/Users/adminprodanov/.sbclrc >; in: SETF SB-IMPL::DEFAULT-EXTERNAL-FORMAT >; (SETF SB-IMPL::DEFAULT-EXTERNAL-FORMAT :UTF-8) >; ==> >; (SETQ SB-IMPL::DEFAULT-EXTERNAL-FORMAT :UTF-8) >; >; caught WARNING: >; undefined variable: SB-IMPL::DEFAULT-EXTERNAL-FORMAT >; >; compilation unit finished >; Undefined variable: >; SB-IMPL::DEFAULT-EXTERNAL-FORMAT >; caught 1 WARNING condition > >best regards, > >Dimiter -- Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.```
 Re: [Maxima-discuss] how to get match variables? From: Dimiter Prodanov - 2017-09-14 22:57:30 Attachments: Message as HTML ```Thanks, This is what I have in mind protectvars(expr, oper, lst):=block( buildq([lst, oper, expr], block (lst, apply(oper, expr) ) ) ); /* nesting of patterns */ %matchparams; predmatch( expr, match):=block([lv, vv, ee], lv:propvars(matchdeclare), ee:protectvars([expr], match, lv), ee:ev(ee, nouns), if listp(ee) then ( for vv in ee do %matchparams[lhs(vv)]:rhs(vv), true )else ee ); This code allows for nesting of patterns without much side effects. I want to avoid proliferation of matching variables. So I bundle all the side effects into the action onto %matchparams, which is easier to control. best regards, Dimiter On Thu, Sep 14, 2017 at 7:40 PM, Robert Dodier wrote: > On Thu, Sep 14, 2017 at 3:09 AM, Dimiter Prodanov > wrote: > > > The question is how to get the match variables used in a particular > > matchdeclare definition? > > propvars(matchdeclare) returns all variables which have a matchdeclare > property at the time of the call. properties(foo) returns the list of > properties of a symbol foo; you can see if matchdeclare is in the > list. The documentation for matchdeclare says something about this > stuff. > > Hope this helps, > Robert Dodier > ```
 [Maxima-discuss] Help Please! From: Brian Dolle - 2017-09-14 21:05:23 Attachments: Message as HTML ```Hi All, I tried to install Maxima but something is wrong. Please help!! Last login: Thu Sep 14 16:58:36 on ttys000 brians-mbp:~ bd\$ exec '/Applications/Maxima.app/Contents/Resources/maxima.sh' Maxima 5.38.0 http://maxima.sourceforge.net using Lisp SBCL 1.2.10 Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. plot-options-parser: Expecting a symbol for the option name, found: " [{gnuplot_term, qt}]" -- an error. To debug this try: debugmode(true); Maxima encountered a Lisp error: attempt to THROW to a tag that does not exist: MACSYMA-QUIT Automatically continuing. To enable the Lisp debugger set *debugger-hook* to nil. debugger invoked on a SB-INT:SIMPLE-CONTROL-ERROR in thread #: attempt to THROW to a tag that does not exist: RETURN-FROM-DEBUGGER Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL. restarts (invokable by number or by possibly-abbreviated name): 0: [MACSYMA-QUIT] Maxima top-level 1: [CONTINUE ] Ignore runtime option --eval "(cl-user::run)". 2: [ABORT ] Skip rest of --eval and --load options. 3: Skip to toplevel READ/EVAL/PRINT loop. 4: [EXIT ] Exit SBCL (calling #'EXIT, killing the process). (SB-C:UNWIND) 0] -- Brian S. Dolle BS in International Business - Drexel University's Lebow College of Business USA/美國: +1.610.304.9577 China/中國: +86.131.4593.1946 ```
 [Maxima-discuss] bug at startup Maxima 40 From: Dimiter Prodanov - 2017-09-14 20:54:24 Attachments: Message as HTML ```Dear all, on Win 8 freshly installed Maxima gives off the following startup bug Message from maxima's stderr stream: ; file: C:/Users/adminprodanov/.sbclrc ; in: SETF SB-IMPL::DEFAULT-EXTERNAL-FORMAT ; (SETF SB-IMPL::DEFAULT-EXTERNAL-FORMAT :UTF-8) ; ==> ; (SETQ SB-IMPL::DEFAULT-EXTERNAL-FORMAT :UTF-8) ; ; caught WARNING: ; undefined variable: SB-IMPL::DEFAULT-EXTERNAL-FORMAT ; ; compilation unit finished ; Undefined variable: ; SB-IMPL::DEFAULT-EXTERNAL-FORMAT ; caught 1 WARNING condition best regards, Dimiter ```
 Re: [Maxima-discuss] taylor(x,...) * f(x) From: Stavros Macrakis - 2017-09-14 19:15:32 Attachments: Message as HTML ```Definitely intentional. On Sep 14, 2017 5:43 PM, "Stanislav Maslovski" < stanislav.maslovski@...> wrote: > Hi, > > I've been using Maxima for years, and somehow I was not aware of such > behavior: > > (%o1) false > (%i2) taylor(1,x,0,7); > > (%o2) +1 > (%i3) %*sin(3*x); > > (%o3) 3*x-(9*x^3)/2+(81*x^5)/40-(243*x^7)/560 > > Is this intended? > > It is Maxima 5.40.0 on Android. I know that taylor expansions are special > expressions in Maxima (marked with /T/ usually... not here, I do not know > why...). But I did not know that multiplying such an expression by f(x) > will force expansion of f(x)! > > > -- > Sent from my Android device with K-9 Mail. Please excuse my brevity. > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Maxima-discuss mailing list > Maxima-discuss@... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > > ```
 Re: [Maxima-discuss] how to get match variables? From: Richard Fateman - 2017-09-14 17:58:10 ```If I understand what you are trying to do  (I'm not sure ...) you want to keep the result of matching from binding the global symbol to the result of the match. e.g. matchdeclare(aaa, true); defmatch(m1,sin(aaa)); m1(sin(x));    binds aaa to x and also returns [aaa = x] You want to stop the binding, I think. So you construct  k1(ex):=    block([aaa], m1(ex)); Actually there is a bug in matchdeclare / propvars .. matchdeclare([aa,bb],true) matchdeclare(qq,true) propvars(matchdeclare);    --> returns only [qq] I'm not sure this really does what you want, in the sense that if you use the same dummy pattern names over again in different patterns, what do want to do?  If you don't use the same names over again, why do you need to bind them only locally? but I may not understand your objective. RJF ```
 Re: [Maxima-discuss] how to get match variables? From: Robert Dodier - 2017-09-14 17:40:42 ```On Thu, Sep 14, 2017 at 3:09 AM, Dimiter Prodanov wrote: > The question is how to get the match variables used in a particular > matchdeclare definition? propvars(matchdeclare) returns all variables which have a matchdeclare property at the time of the call. properties(foo) returns the list of properties of a symbol foo; you can see if matchdeclare is in the list. The documentation for matchdeclare says something about this stuff. Hope this helps, Robert Dodier ```
 [Maxima-discuss] taylor(x,...) * f(x) From: Stanislav Maslovski - 2017-09-14 12:47:34 Attachments: Message as HTML ```Hi, I've been using Maxima for years, and somehow I was not aware of such behavior: (%o1) false (%i2) taylor(1,x,0,7); (%o2) +1 (%i3) %*sin(3*x); (%o3) 3*x-(9*x^3)/2+(81*x^5)/40-(243*x^7)/560 Is this intended? It is Maxima 5.40.0 on Android. I know that taylor expansions are special expressions in Maxima (marked with /T/ usually... not here, I do not know why...). But I did not know that multiplying such an expression by f(x) will force expansion of f(x)! -- Sent from my Android device with K-9 Mail. Please excuse my brevity.```
 [Maxima-discuss] how to get match variables? From: Dimiter Prodanov - 2017-09-14 10:10:19 Attachments: Message as HTML ```Dear all, I would like to do sequential matching. match >> match2 >> .. matchn For that I would like to protect from the side effects of defmatch. So I want to box the functionality of defmatch in a layer of code that protects the match variables and passes them on the mlist variable to be used further. The question is how to get the match variables used in a particular matchdeclare definition? Presumably the code should look like this: protectvars(expr, lst)::=buildq([lst, expr], block(lst, expr) ); defmatchp( expr, match, mlst):=block([lv, ee], lv:listofvars(match), disp(lv), ee:protectvars(match(expr), lv), if listp(ee) then mlst:ee else ee ); best regards, Dimiter ```
 Re: [Maxima-discuss] packaging system security problems, was: Feature Request - B?ttcher function of a complex variable From: Raymond Toy - 2017-09-13 22:36:20 ```>>>>> "Rocky" == Rocky Bernstein writes: Rocky> Here are some of the ways this is handled in other systems. First of all there are organizations Rocky> funded by the U.S. Government like NVD https://nvd.nist.gov/ Rocky> and https://cve.mitre.org/. https://www.cvedetails.com  Rocky> Right now I don't see any vulnerabilities reported against maxima or gcl. It's easy to do a buffer overflow in most lisp systems: (defun foo (x n) (declare (type (simple-array double-float (*)) x) (fixnum n) (optimize (speed 3) (safety 0) (debug 0))) (setf (aref x n) 42d0)) (defvar *x* (make-array 1 :element-type 'double-float)) (compile 'foo) (foo *x* 99) This will write past the end of the array. Whether this is exploitable or not, I don't know, but buffer overflow is one good first step in exploiting a system. Maxima used to compile lots of code with speed 3 and safety 0. I think we've replaced this so we don't do safety 0 except in certain cases. (Not for security reasons, but because it's too hard to figure out what caused maxima to crash if something bad happens when safety = 0. These kinds of things often show up long after the corruption has happened.) And if you're running code you downloaded from the internet, who needs a vulnerability to exploit? You've already been (potentially) compromised. -- Ray ```
 Re: [Maxima-discuss] Nested funmakes with evaluation inside of a function From: Richard Fateman - 2017-09-13 20:47:31 Attachments: Message as HTML ```On 9/13/2017 1:34 PM, Stavros Macrakis (Σταῦρος Μακράκης) wrote: > ​product -> produce​ > > > On Wed, Sep 13, 2017 at 9:25 PM, Stavros Macrakis (Σταῦρος Μακράκης) > > wrote: > > ​You say that the fourth result is "screwed up". What did you > expect it to be? There are many correct equivalent forms, and > Maxima does not know which one you want. > > Does scanmap('factor,​...) product the result you expect? > > > On Wed, Sep 13, 2017 at 9:16 PM, Roland Salz > > wrote: > > Thanks a lot to both of you. Yes, ‘apply’ is what I was > looking for. > > The overall problem is visible in the following example (I > misuse Maxima equations here, this is for output purposes only). > > s:sum((x-x_0)^i,i,1,n); > > 'diff(s,x) = diff(s,x); > > 'integrate(s,x) = integrate(s,x); > > 'integrate(s,x,a,b) = integrate(s,x,a,b); > intosum(%); sumcontract(%); ratsimp(%); may solve your problem. You are right that there are multiple "stable" forms for equivalent expressions in general representation.  For purely polynomial forms, there is a canonical representation used by rat()    but even that is subject to ordering of variables. Good luck. RJF PS -- the general discussion of using funmake etc.  I did not study it all but this may be another example where using expressions rather than functions is better. Here is a fun example that shows that Maxima is a "lisp-2", like common lisp, not like scheme. square(z):= z^2; f(a,sqrt) := sqrt(a); g(a,sqrt):= apply(sqrt,[a]); f(9,square);    result is 3 g(9,square);  result is 81 less surprising would be     h(a,expression_in_x):=   subst(a, x, expression_in_x); and then use it as h(9, '(sqrt(x)); RJF > As you notice, the first three lines give the desired result > while the forth does not. The result is correct, but by some > coincidences in the simplification process the numerators in > the two sums on the right hand side are screwed up. The reason > in my opinion is that Maxima has multiple stable (canonical) > forms if it comes to sums of the form a-b appearing in > fractions. No build-in simplification routine will cure this, > I believe. So I wrote (already some time ago) a routine to > manipulate the minus signs of such fractions (by switching > them around from the position in front of the fraction, in the > numerator, and in the denominator) in order to bring the > expression into the desired form manually. (In the above case > I need to do some more manipulations, though.) > > This problem with the ‘wrong location of the minus sign in > fractions’ happens very frequently, so I was trying to make my > simplification routine easier to use. I studied, but never > used pattern matching before, but now I will try to make use > of it here. Thanks for this hint, too. > > Roland > > *From:*Stavros Macrakis [mailto:macrakis@... > ] > *Sent:* Wednesday, September 13, 2017 9:30 AM > > ''(...) is a gimmick that only works in direct interaction. So > if you are experimenting because you expect to write > functions, you shouldn't use it at all. > > ev is almost always a terrible idea in functions because it > doesn't just apply functions; it also evaluates variables. > > As Dodier says, you probably want 'apply'... or better, > pattern matching. Writing expression-manipulating code is > fine, too, but I doubt that substpart is what you want. > > On Sep 13, 2017 1:29 AM, "Robert Dodier" > > wrote: > > On Tue, Sep 12, 2017 at 4:10 PM, Roland Salz > > wrote: > > > What the line does, is to manipulate part of an expression > and then > > substitute the result in the expression. > > Well, rules defined by defrule do that. My advice is to use > defrule > instead of reimplementing it. What is the larger problem that > you want > to solve here? > > > > > ’’(funmake(substpart,cons(’’(funmake(manipulating_function,[opt,’’(funmake(part,expr))])),expr))); > > I don't recommend this approach, but: maybe you mean to use > 'apply' > here instead of 'funmake'. > > best, > > Robert Dodier > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Maxima-discuss mailing list > Maxima-discuss@... > > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > ; > > > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > _______________________________________________ > Maxima-discuss mailing list > Maxima-discuss@... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss ```
 Re: [Maxima-discuss] Nested funmakes with evaluation inside of a function From: Roland Salz - 2017-09-13 20:43:04 Attachments: Message as HTML ```From: macrakis@... [mailto:macrakis@...] On Behalf Of Stavros Macrakis (Sta???? ?a??????) Sent: Wednesday, September 13, 2017 10:25 PM You say that the fourth result is "screwed up". What did you expect it to be? There are many correct equivalent forms, and Maxima does not know which one you want. Well, I think it is obvious that a representation of the form sum(((b-x_0)^(i+1))/(i+1),i,1,n)-sum(((a-x_0)^(i+1))/(i+1),i,1,n); would be much simpler (= much better simplified) than what Maxima returns. But I would agree that it is hard for Maxima to see that and to work into this direction by itself. Does scanmap('factor,​...) produce the result you expect? I’ll have to look at that. From: macrakis@... [mailto:macrakis@...] On Behalf Of Stavros Macrakis (Sta???? ?a??????) Sent: Wednesday, September 13, 2017 10:25 PM To: Roland Salz Cc: Subject: Re: [Maxima-discuss] Nested funmakes with evaluation inside of a function ​You say that the fourth result is "screwed up". What did you expect it to be? There are many correct equivalent forms, and Maxima does not know which one you want. Does scanmap('factor,​...) product the result you expect? ```
 Re: [Maxima-discuss] Nested funmakes with evaluation inside of a function From: Stavros Macrakis (Σταῦρος Μακράκης) - 2017-09-13 20:35:06 Attachments: Message as HTML ```​product -> produce​ On Wed, Sep 13, 2017 at 9:25 PM, Stavros Macrakis (Σταῦρος Μακράκης) < macrakis@...> wrote: > ​You say that the fourth result is "screwed up". What did you expect it to > be? There are many correct equivalent forms, and Maxima does not know which > one you want. > > Does scanmap('factor,​...) product the result you expect? > > > On Wed, Sep 13, 2017 at 9:16 PM, Roland Salz > wrote: > >> Thanks a lot to both of you. Yes, ‘apply’ is what I was looking for. >> >> >> >> The overall problem is visible in the following example (I misuse Maxima >> equations here, this is for output purposes only). >> >> >> >> s:sum((x-x_0)^i,i,1,n); >> >> 'diff(s,x) = diff(s,x); >> >> 'integrate(s,x) = integrate(s,x); >> >> 'integrate(s,x,a,b) = integrate(s,x,a,b); >> >> >> >> As you notice, the first three lines give the desired result while the >> forth does not. The result is correct, but by some coincidences in the >> simplification process the numerators in the two sums on the right hand >> side are screwed up. The reason in my opinion is that Maxima has multiple >> stable (canonical) forms if it comes to sums of the form a-b appearing in >> fractions. No build-in simplification routine will cure this, I believe. So >> I wrote (already some time ago) a routine to manipulate the minus signs of >> such fractions (by switching them around from the position in front of the >> fraction, in the numerator, and in the denominator) in order to bring the >> expression into the desired form manually. (In the above case I need to do >> some more manipulations, though.) >> >> >> >> This problem with the ‘wrong location of the minus sign in fractions’ >> happens very frequently, so I was trying to make my simplification routine >> easier to use. I studied, but never used pattern matching before, but now I >> will try to make use of it here. Thanks for this hint, too. >> >> >> >> Roland >> >> >> >> >> >> *From:* Stavros Macrakis [mailto:macrakis@...] >> *Sent:* Wednesday, September 13, 2017 9:30 AM >> >> ''(...) is a gimmick that only works in direct interaction. So if you are >> experimenting because you expect to write functions, you shouldn't use it >> at all. >> >> >> >> ev is almost always a terrible idea in functions because it doesn't just >> apply functions; it also evaluates variables. >> >> >> >> As Dodier says, you probably want 'apply'... or better, pattern matching. >> Writing expression-manipulating code is fine, too, but I doubt that >> substpart is what you want. >> >> >> >> On Sep 13, 2017 1:29 AM, "Robert Dodier" wrote: >> >> On Tue, Sep 12, 2017 at 4:10 PM, Roland Salz >> wrote: >> >> > What the line does, is to manipulate part of an expression and then >> > substitute the result in the expression. >> >> Well, rules defined by defrule do that. My advice is to use defrule >> instead of reimplementing it. What is the larger problem that you want >> to solve here? >> >> >> > ’’(funmake(substpart,cons(’’(funmake(manipulating_function,[ >> opt,’’(funmake(part,expr))])),expr))); >> >> I don't recommend this approach, but: maybe you mean to use 'apply' >> here instead of 'funmake'. >> >> best, >> >> Robert Dodier >> >> >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Maxima-discuss mailing list >> Maxima-discuss@... >> https://lists.sourceforge.net/lists/listinfo/maxima-discuss >> >> > ```
 Re: [Maxima-discuss] Nested funmakes with evaluation inside of a function From: Stavros Macrakis (Σταῦρος Μακράκης) - 2017-09-13 20:25:22 Attachments: Message as HTML ```​You say that the fourth result is "screwed up". What did you expect it to be? There are many correct equivalent forms, and Maxima does not know which one you want. Does scanmap('factor,​...) product the result you expect? On Wed, Sep 13, 2017 at 9:16 PM, Roland Salz wrote: > Thanks a lot to both of you. Yes, ‘apply’ is what I was looking for. > > > > The overall problem is visible in the following example (I misuse Maxima > equations here, this is for output purposes only). > > > > s:sum((x-x_0)^i,i,1,n); > > 'diff(s,x) = diff(s,x); > > 'integrate(s,x) = integrate(s,x); > > 'integrate(s,x,a,b) = integrate(s,x,a,b); > > > > As you notice, the first three lines give the desired result while the > forth does not. The result is correct, but by some coincidences in the > simplification process the numerators in the two sums on the right hand > side are screwed up. The reason in my opinion is that Maxima has multiple > stable (canonical) forms if it comes to sums of the form a-b appearing in > fractions. No build-in simplification routine will cure this, I believe. So > I wrote (already some time ago) a routine to manipulate the minus signs of > such fractions (by switching them around from the position in front of the > fraction, in the numerator, and in the denominator) in order to bring the > expression into the desired form manually. (In the above case I need to do > some more manipulations, though.) > > > > This problem with the ‘wrong location of the minus sign in fractions’ > happens very frequently, so I was trying to make my simplification routine > easier to use. I studied, but never used pattern matching before, but now I > will try to make use of it here. Thanks for this hint, too. > > > > Roland > > > > > > *From:* Stavros Macrakis [mailto:macrakis@...] > *Sent:* Wednesday, September 13, 2017 9:30 AM > > ''(...) is a gimmick that only works in direct interaction. So if you are > experimenting because you expect to write functions, you shouldn't use it > at all. > > > > ev is almost always a terrible idea in functions because it doesn't just > apply functions; it also evaluates variables. > > > > As Dodier says, you probably want 'apply'... or better, pattern matching. > Writing expression-manipulating code is fine, too, but I doubt that > substpart is what you want. > > > > On Sep 13, 2017 1:29 AM, "Robert Dodier" wrote: > > On Tue, Sep 12, 2017 at 4:10 PM, Roland Salz > wrote: > > > What the line does, is to manipulate part of an expression and then > > substitute the result in the expression. > > Well, rules defined by defrule do that. My advice is to use defrule > instead of reimplementing it. What is the larger problem that you want > to solve here? > > > > ’’(funmake(substpart,cons(’’(funmake(manipulating_function, > [opt,’’(funmake(part,expr))])),expr))); > > I don't recommend this approach, but: maybe you mean to use 'apply' > here instead of 'funmake'. > > best, > > Robert Dodier > > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Maxima-discuss mailing list > Maxima-discuss@... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > > ```
 Re: [Maxima-discuss] Nested funmakes with evaluation inside of a function From: Roland Salz - 2017-09-13 20:16:17 Attachments: Message as HTML ```Thanks a lot to both of you. Yes, ‘apply’ is what I was looking for. The overall problem is visible in the following example (I misuse Maxima equations here, this is for output purposes only). s:sum((x-x_0)^i,i,1,n); 'diff(s,x) = diff(s,x); 'integrate(s,x) = integrate(s,x); 'integrate(s,x,a,b) = integrate(s,x,a,b); As you notice, the first three lines give the desired result while the forth does not. The result is correct, but by some coincidences in the simplification process the numerators in the two sums on the right hand side are screwed up. The reason in my opinion is that Maxima has multiple stable (canonical) forms if it comes to sums of the form a-b appearing in fractions. No build-in simplification routine will cure this, I believe. So I wrote (already some time ago) a routine to manipulate the minus signs of such fractions (by switching them around from the position in front of the fraction, in the numerator, and in the denominator) in order to bring the expression into the desired form manually. (In the above case I need to do some more manipulations, though.) This problem with the ‘wrong location of the minus sign in fractions’ happens very frequently, so I was trying to make my simplification routine easier to use. I studied, but never used pattern matching before, but now I will try to make use of it here. Thanks for this hint, too. Roland From: Stavros Macrakis [mailto:macrakis@...] Sent: Wednesday, September 13, 2017 9:30 AM ''(...) is a gimmick that only works in direct interaction. So if you are experimenting because you expect to write functions, you shouldn't use it at all. ev is almost always a terrible idea in functions because it doesn't just apply functions; it also evaluates variables. As Dodier says, you probably want 'apply'... or better, pattern matching. Writing expression-manipulating code is fine, too, but I doubt that substpart is what you want. On Sep 13, 2017 1:29 AM, "Robert Dodier" wrote: On Tue, Sep 12, 2017 at 4:10 PM, Roland Salz wrote: > What the line does, is to manipulate part of an expression and then > substitute the result in the expression. Well, rules defined by defrule do that. My advice is to use defrule instead of reimplementing it. What is the larger problem that you want to solve here? > ’’(funmake(substpart,cons(’’(funmake(manipulating_function,[opt,’’(funmake(part,expr))])),expr))); I don't recommend this approach, but: maybe you mean to use 'apply' here instead of 'funmake'. best, Robert Dodier ```
 Re: [Maxima-discuss] Feature Request - B?ttcher function of a complex variable From: Gunter Königsmann - 2017-09-13 19:55:16 ```> > No one reviews the current maxima-commits list for even just > functionality or correctness. Who wants to review yet another list > for an admittedly MUCH harder task of checking security? > Well... ...at least lisp code that obviously creates a server or contacts internet hosts would most probably be found if it weren't too obfuscated. ...But informing the user that external packages aren't reviewed at all would be an alternative I would accept: This way we don't fake security for downloadable packages. But we still provide them. Kind regards, Gunter. ```
 Re: [Maxima-discuss] Feature Request - B?ttcher function of a complex variable From: Kris Katterjohn - 2017-09-13 16:40:41 ```On Wed, Sep 13, 2017 at 07:54:33AM -0700, Raymond Toy wrote: > >>>>> "Gunter" == Gunter Königsmann writes: > Gunter> Would there be the possibility to create a thing like the maxima-commits > Gunter> mailing list for this repo so anyone who wants to volunteer can review > Gunter> the commits for malicious code? If yes I believe we would do more for > Gunter> security than google does. > > No one reviews the current maxima-commits list for even just > functionality or correctness. Who wants to review yet another list > for an admittedly MUCH harder task of checking security? > > I'm all for security reviews and such, but I'm just too old and > cynical, I guess, to think this will actually work. I really hope it > does, though. Yep. If we're not really reviewing commits to the main branch, why should we think another list of commits will be reviewed? Personally, if I had to pick, I'd much rather have maxima-commits reviewed more thoroughly than having effort spent on some list of contributed packages. Not that reviewing these packages is a bad thing, of course. It's better to say "we haven't reviewed these packages" than to mislead others (and perhaps ourselves) into thinking the packages have been reviewed when they really haven't been. I certainly don't think that having a mailing list for these commits means that "we would do more for security than google does" (whatever that's supposed to mean). Cheers, Kris Katterjohn ```
 Re: [Maxima-discuss] Feature Request - B?ttcher function of a complex variable From: Richard Fateman - 2017-09-13 15:30:02 ```On 9/13/2017 7:54 AM, Raymond Toy wrote: > I think you really need to have a different mind set if you doing > security work. I'm not thinking maliciously enough to catch even the > most basic holes. I expect that few "security teams" would be familiar enough with Lisp to be useful as reviewers. There are problems with contributed programs already in the distribution. Notably, documentation that is, for some files, inadequate to figure out how to use the programs  (and sometimes the programs are unnecessarily hard to use). In other cases the documentation is huge, but directed to an audience that already knows what the program is supposed to do already. In yet other cases, (including parts of the manual!) the documentation consists of a collection of calculations that the program does NOT do. That is, the documentation shows "edge" cases where the program either fails or returns something that is unexpected. There are also contributed programs that are relatively weak and naive, duplicative of features in the core system, or duplicative of other contributed programs.  (This is also true of duplicate lisp definitions in different files, written at different times by different people.) An example -- I thing a program to test "is this expression a polynomial" is defined in several places. I think it would be possible to redefine certain obvious security-hole system-access procedures in Lisp to give warnings or ask for permission.  But then it might be possible to  re-redefine them to remove the warnings. I suppose one could try to have a group of trusted (somehow) people checking over contributions for security, but we don't even check things over adequately for completeness and correctness, now. The Sage project supposedly checks contributions, but since one of the contributions is Maxima, I don't think it is very thorough :) RJF ```
 Re: [Maxima-discuss] Package manager (was Feature Request - B?ttcher function of a complex variable) From: Raymond Toy - 2017-09-13 15:00:49 ```>>>>> "Dimiter" == Dimiter Prodanov writes: Dimiter> Dear Michael, Dimiter> My idea is rather minimalistic. Just to distribute a Dimiter> mechanism (i.e. quicklisp) to download shared packages Dimiter> from number of update sites. Can quicklisp actually download packages not from the quicklisp repository? [snip] Dimiter> Only the share packages currently distributed with Maxima Dimiter> are to be vetted for utility and safety. Has ony actually any vetted any share package for utility or safety? For the few share packages I've contributed, I would say there's some utility to them, and it might work for problems other than the examples. If you find a bug, I'll try to fix it. Are they safe to use? Who knows? I didn't go out of my way to add a backdoor or add the ability to blow up your computer, but who knows what might happen? -- Ray ```
 Re: [Maxima-discuss] Feature Request - B?ttcher function of a complex variable From: Raymond Toy - 2017-09-13 14:54:50 ```>>>>> "Gunter" == Gunter Königsmann writes: Gunter> On 13.09.2017 00:24, Robert Dodier wrote: >> On Tue, Sep 12, 2017 at 12:54 PM, Raymond Toy wrote: >> >>> How does quicklisp help? Don't you need the quicklisp manager to make >>> all the packages available? And isn't it only for lisp packages? >>> There are many maxima packages that are not in lisp. >> >> Well, QL is a packaging solution which could be adapted. I suppose the >> Maxima project would have to maintain its own repository of tarballs >> if the QL maintainer doesn't want them. I don't remember if I tried to >> ask him about it. Anyway this is somewhat speculative. >> Gunter> Would there be the possibility to create a thing like the maxima-commits Gunter> mailing list for this repo so anyone who wants to volunteer can review Gunter> the commits for malicious code? If yes I believe we would do more for Gunter> security than google does. No one reviews the current maxima-commits list for even just functionality or correctness. Who wants to review yet another list for an admittedly MUCH harder task of checking security? I'm all for security reviews and such, but I'm just too old and cynical, I guess, to think this will actually work. I really hope it does, though. An example: at work, I needed to implement something similar to other features that were known to be targets of malicious attacks. I tried to be very careful. Fortunately, we have a security team, and I had them review it. The review showed that I forgot to check for this and that and so many other things that could all be exploited. An eye-opening experience to be sure. I think you really need to have a different mind set if you doing security work. I'm not thinking maliciously enough to catch even the most basic holes. -- Ray ```
11 messages has been excluded from this view by a project administrator.

Showing results of 14853

<< < 1 2 3 4 5 .. 595 > >> (Page 3 of 595)