## 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 (293) Sep (303) Oct (331) Nov (346) Dec (163)
S M T W T F S

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

Showing 8 results of 8

 Re: [Maxima-discuss] determinant not working as expected From: andre maute - 2014-03-06 23:02:21 ```On 03/06/2014 11:17 PM, Leo Butler wrote: > The problem is in computing DFTDF. Set > scalarmatrixp:false\$ > to prevent 1x1 matrices from being coerced > to scalars. > > (%i6) determinant(DFTDF) > (%o6) ?%determinant((v[[2]][2]-v[[0]][2])^2+(v[[2]][1]-v[[0]][1])^2) > > You might think that Maxima should return the input, but how is Maxima to > know that the input is a scalar? Thanks that did the trick, I did know there was something/somewhere to prevent the coercing to scalars. Perhaps I ignored scalarmatrixp in the documentation because I had listp and numberp in mind, and not a flag for controlling behavior of maxima. Nevertheless and please forgive me my ignorance, I wonder why scalarmatrixp : true is the default? Kind Regards Andre ```
 Re: [Maxima-discuss] determinant not working as expected From: Leo Butler - 2014-03-06 22:18:16 ``` >From mailnull Thu Mar 6 21:44:58 2014 Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of lists.sourceforge.net designates 172.29.29.179 as permitted sender) client-ip=172.29.29.179; envelope-from=maxima-discuss-bounces@...; helo=lists.sourceforge.net; Received-SPF: pass (sog-mx-3.v43.ch3.sourceforge.com: domain of gmx.de designates 212.227.17.22 as permitted sender) client-ip=212.227.17.22; envelope-from=andre.maute@...; helo=mout.gmx.net; Date: Thu, 6 Mar 2014 22:43:52 +0100 From: andre maute Content-Type: text/plain; charset="us-ascii" Hi list, I have the following two examples for calculating Jacobians. In the first example the 'matrix is removed from DFTDF. and determinant doesn't know what to do with DFTDF. The same happens for determinant(a). Question: Can I make this behavior somehow more consistent, without checking the dimensions of DF? Kind Regards Andre ----- determinant-bug.max ----- display2d : false; build_info(); DF : matrix([v[[2]][1]-v[[0]][1]],[v[[2]][2]-v[[0]][2]]); DFTDF : transpose(DF).DF; determinant(DFTDF); DF : matrix([v[[1]][1]-v[[0]][1],v[[2]][1]-v[[0]][1]], [v[[1]][2]-v[[0]][2],v[[2]][2]-v[[0]][2]]); DFTDF : transpose(DF).DF; determinant(DFTDF); determinant(10); determinant(a); ----- determinant-bug.max ----- ----- determinant-bug.txt ----- Maxima 5.31.3 http://maxima.sourceforge.net using Lisp SBCL 1.1.12-1.fc20 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. (%i1) batch("determinant-bug.max") read and interpret file: /home/user/determinant-bug.max (%i2) display2d:false (%o2) false (%i3) build_info() (%o3) ?%build_info("5.31.3","2014-03-01 11:47:49","x86_64-unknown-linux-gnu","SBCL","1.1.12-1.fc20") (%i4) DF:matrix([v[[2]][1]-v[[0]][1]],[v[[2]][2]-v[[0]][2]]) (%o4) matrix([v[[2]][1]-v[[0]][1]],[v[[2]][2]-v[[0]][2]]) (%i5) DFTDF:transpose(DF) . DF (%o5) (v[[2]][2]-v[[0]][2])^2+(v[[2]][1]-v[[0]][1])^2 The problem is in computing DFTDF. Set scalarmatrixp:false\$ to prevent 1x1 matrices from being coerced to scalars. (%i6) determinant(DFTDF) (%o6) ?%determinant((v[[2]][2]-v[[0]][2])^2+(v[[2]][1]-v[[0]][1])^2) You might think that Maxima should return the input, but how is Maxima to know that the input is a scalar? Leo ```
 Re: [Maxima-discuss] determinant not working as expected From: Michel Talon - 2014-03-06 21:59:07 ```andre maute wrote: > determinant(DFTDF); > determinant(10); > determinant(a); … Bug! But after (%i18) declare(a , scalar); (%o18) done (%i19) determinant(a); (%o19) a -- Michel Talon ```
 [Maxima-discuss] determinant not working as expected From: andre maute - 2014-03-06 21:44:01 ```Hi list, I have the following two examples for calculating Jacobians. In the first example the 'matrix is removed from DFTDF. and determinant doesn't know what to do with DFTDF. The same happens for determinant(a). Question: Can I make this behavior somehow more consistent, without checking the dimensions of DF? Kind Regards Andre ----- determinant-bug.max ----- display2d : false; build_info(); DF : matrix([v[[2]][1]-v[[0]][1]],[v[[2]][2]-v[[0]][2]]); DFTDF : transpose(DF).DF; determinant(DFTDF); DF : matrix([v[[1]][1]-v[[0]][1],v[[2]][1]-v[[0]][1]], [v[[1]][2]-v[[0]][2],v[[2]][2]-v[[0]][2]]); DFTDF : transpose(DF).DF; determinant(DFTDF); determinant(10); determinant(a); ----- determinant-bug.max ----- ----- determinant-bug.txt ----- Maxima 5.31.3 http://maxima.sourceforge.net using Lisp SBCL 1.1.12-1.fc20 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. (%i1) batch("determinant-bug.max") read and interpret file: /home/user/determinant-bug.max (%i2) display2d:false (%o2) false (%i3) build_info() (%o3) ?%build_info("5.31.3","2014-03-01 11:47:49","x86_64-unknown-linux-gnu","SBCL","1.1.12-1.fc20") (%i4) DF:matrix([v[[2]][1]-v[[0]][1]],[v[[2]][2]-v[[0]][2]]) (%o4) matrix([v[[2]][1]-v[[0]][1]],[v[[2]][2]-v[[0]][2]]) (%i5) DFTDF:transpose(DF) . DF (%o5) (v[[2]][2]-v[[0]][2])^2+(v[[2]][1]-v[[0]][1])^2 (%i6) determinant(DFTDF) (%o6) ?%determinant((v[[2]][2]-v[[0]][2])^2+(v[[2]][1]-v[[0]][1])^2) (%i7) DF:matrix([v[[1]][1]-v[[0]][1],v[[2]][1]-v[[0]][1]],[v[[1]][2]-v[[0]][2],v[[2]][2]-v[[0]][2]]) (%o7) matrix([v[[1]][1]-v[[0]][1],v[[2]][1]-v[[0]][1]],[v[[1]][2]-v[[0]][2],v[[2]][2]-v[[0]][2]]) (%i8) DFTDF:transpose(DF) . DF (%o8) matrix([(v[[1]][2]-v[[0]][2])^2+(v[[1]][1]-v[[0]][1])^2,(v[[1]][2]-v[[0]][2])*(v[[2]][2]-v[[0]][2])+(v[[1]][1]-v[[0]][1])*(v[[2]][1]-v[[0]][1])],[(v[[1]][2]-v[[0]][2])*(v[[2]][2]-v[[0]][2])+(v[[1]][1]-v[[0]][1])*(v[[2]][1]-v[[0]][1]),(v[[2]][2]-v[[0]][2])^2+(v[[2]][1]-v[[0]][1])^2]) (%i9) determinant(DFTDF) (%o9) ((v[[1]][2]-v[[0]][2])^2+(v[[1]][1]-v[[0]][1])^2)*((v[[2]][2]-v[[0]][2])^2+(v[[2]][1]-v[[0]][1])^2)-((v[[1]][2]-v[[0]][2])*(v[[2]][2]-v[[0]][2])+(v[[1]][1]-v[[0]][1])*(v[[2]][1]-v[[0]][1]))^2 (%i10) determinant(10) (%o10) 10 (%i11) determinant(a) (%o11) ?%determinant(a) (%o11) "/home/user/determinant-bug.max" ----- determinant-bug.txt ----- ```
 Re: [Maxima-discuss] [newbie] Engineering notation From: Stavros Macrakis - 2014-03-06 20:38:44 Attachments: Message as HTML ```For your second request, take a look at the documentation for fpprintprec. -s On Thu, Mar 6, 2014 at 3:31 PM, Michael W. wrote: > Hugo Coolens kuleuven.be> writes: > > > > > Is there a way to represent numerical results in maxima in so called > > engineering notation? (Engineering notation is a version of scientific > > notation in which the powers of ten must be multiples of three) > > > > e.g. 0.0045 is represented as 4.5e-3 > > > > thanks in advance and with kind regards, > > hugo > > > > > As an electrical engineer, this feature would be very useful. Everything we > do is in SI units X^[+/-(3, 6, 9, 12, or rarely 15)]. I see that the > feature > request has been made and this email is intended primarily to show that > there > is a need for it to be added. > > In addition to the requester's main request, I would also like to clarify > that setting the number of displayed digits after the decimal point would > be > very useful. The tolerances on most components are such that exact results > are of no greater use than rounded ones and only serve to make displaying > them less clear. > > Thanks, > Michael > > > > ------------------------------------------------------------------------------ > Subversion Kills Productivity. Get off Subversion & Make the Move to > Perforce. > With Perforce, you get hassle-free workflows. Merge that actually works. > Faster operations. Version large binaries. Built-in WAN optimization and > the > freedom to use Git, Perforce or both. Make the move to Perforce. > > http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk > _______________________________________________ > Maxima-discuss mailing list > Maxima-discuss@... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > ```
 Re: [Maxima-discuss] [newbie] Engineering notation From: Michael W. - 2014-03-06 20:35:11 ```Hugo Coolens kuleuven.be> writes: > > Is there a way to represent numerical results in maxima in so called > engineering notation? (Engineering notation is a version of scientific > notation in which the powers of ten must be multiples of three) > > e.g. 0.0045 is represented as 4.5e-3 > > thanks in advance and with kind regards, > hugo > As an electrical engineer, this feature would be very useful. Everything we do is in SI units X^[+/-(3, 6, 9, 12, or rarely 15)]. I see that the feature request has been made and this email is intended primarily to show that there is a need for it to be added. In addition to the requester's main request, I would also like to clarify that setting the number of displayed digits after the decimal point would be very useful. The tolerances on most components are such that exact results are of no greater use than rounded ones and only serve to make displaying them less clear. Thanks, Michael ```
 Re: [Maxima-discuss] Why does this loop From: Stavros Macrakis - 2014-03-06 02:00:41 Attachments: Message as HTML ```Your outer "do" statement has no termination condition, so it will loop infinitely unless thre is a 'return' somewhere inside. I think you want simply if ... then (...) and not if ... then do (...) Another point: I haven't looked your whole program, but "if tmp=realpart(tmp) ..." is not a good general way to test if tmp is real. For example, ex:(1-%i)*(1+%i) is real, but not syntactically equal to realpart(ex). Remember that "=" means "syntactically equal". In that case, "if equal(tmp,realpart(tmp))..." would work, but in general, a better test might be "if equal(imagpart(tmp),0)...". For example, consider ex:sinh(1+%i*%pi). -s On Wed, Mar 5, 2014 at 8:16 PM, Thomas D. Dean wrote: > I am missing something really easy, I think. > > Why does this loop? > > Maxima version: "5.32.1" > Maxima build date: "2014-03-02 18:35:41" > Host type: "x86_64-unknown-linux-gnu" > Lisp implementation type: "GNU Common Lisp (GCL)" > Lisp implementation version: "GCL 2.6.10" > > kill(all); > eq:y^3-2*x*y^2+x^2*y+x^3 = 1; > /*thue(eq):=block(*/ > define(f(x,y),lhs(eq)); > print(f(x,y)); > rc:[]; > if f(x,y)=expand(f(x/y,1)*y^hipow(f(x,y),y)) then do ( > /* thule equation */ > soln_x:solve(f(x,1)=rhs(eq),x), > print("soln_x",soln_x), > for s in soln_x do ( > soln_y:solve(ev(f(x,y),s)=rhs(eq),y), > print("soln_y",soln_y), > for t in soln_y do ( > tmp:rhs(t), > if tmp = realpart(tmp) then append(rc,[s,t]) > ) > ) > ) > ; > > Tom Dean > > > ------------------------------------------------------------------------------ > Subversion Kills Productivity. Get off Subversion & Make the Move to > Perforce. > With Perforce, you get hassle-free workflows. Merge that actually works. > Faster operations. Version large binaries. Built-in WAN optimization and > the > freedom to use Git, Perforce or both. Make the move to Perforce. > > http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk > _______________________________________________ > Maxima-discuss mailing list > Maxima-discuss@... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > ```
 [Maxima-discuss] Why does this loop From: Thomas D. Dean - 2014-03-06 01:17:02 ```I am missing something really easy, I think. Why does this loop? Maxima version: "5.32.1" Maxima build date: "2014-03-02 18:35:41" Host type: "x86_64-unknown-linux-gnu" Lisp implementation type: "GNU Common Lisp (GCL)" Lisp implementation version: "GCL 2.6.10" kill(all); eq:y^3-2*x*y^2+x^2*y+x^3 = 1; /*thue(eq):=block(*/ define(f(x,y),lhs(eq)); print(f(x,y)); rc:[]; if f(x,y)=expand(f(x/y,1)*y^hipow(f(x,y),y)) then do ( /* thule equation */ soln_x:solve(f(x,1)=rhs(eq),x), print("soln_x",soln_x), for s in soln_x do ( soln_y:solve(ev(f(x,y),s)=rhs(eq),y), print("soln_y",soln_y), for t in soln_y do ( tmp:rhs(t), if tmp = realpart(tmp) then append(rc,[s,t]) ) ) ) ; Tom Dean ```

Showing 8 results of 8