Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

## maxima-discuss — Maxima discussion list

You can subscribe to this list here.

 2014 Jan Feb (232) Mar (323) Apr (383) May (359) Jun (435) Jul (209) Aug Sep Oct Nov Dec

Showing results of 1941

<< < 1 2 3 4 .. 78 > >> (Page 2 of 78)
 Re: [Maxima-discuss] convert list access to function From: Pankaj Sejwal - 2014-07-21 13:06:48 Attachments: Message as HTML ```Hi, Using Barton's suggestion I fixed it as, ex(ll,x,f):=apply(substinpart,cons(apply(f,piece),cons(ll,x)))\$ ex(ll,[3,3,4],fun) => [2,3,[a,b,[t,y,[u,i],fun(o,p),6,7]],8,8] With this now one can get functionality similar to Mathematica's "MapAt" feature. I am thankful to provided suggestions and help. ​>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>​ On Mon, Jul 21, 2014 at 4:59 PM, Barton Willis wrote: > Try using either inpart or substinpart; example > > (%i12) substinpart(apply(f,piece), ll, 3,3,3); > (%o12) [2,3,[a,b,[t,y,f(u,i),[o,p],6,7]],8,8] > > --bw > > ________________________________________ > > I want to access list elements based on their position but I don't > intend to extract the elements out of list but instead keep my curosr > there to apply some function on it, say, > > ll:[2,3,[a,b,[t,y,[u,i],[o,p],6,7]],8,8] > > I can reachout to various elements using, > > a) Using substitution, > subst(apply(f,ll[3][3][3]),ll[3][3][3],ll) > > b) Or using positions directly as, > ll[3][3][4]:apply(f,ll[3][3][4]); > > Showing the combined result of above two expressions, > ll now, [2,3,[a,b,[t,y,f(u,i),f(o,p),6,7]],8,8] > > I want to create a function say, > map_at_position(ll,[3,3,4],f) that shall give me > [2,3,[a,b,[t,y,[u,i],f(o,p),6,7]],8,8] > > Function definition needs to be like, > > > map_at_position(ll,a,f):=block([],ll[a1][a2]a[3]...[an]:apply(f,ll[a1],[a2],[a3]...[an]),ll) > where a = [a1,a2,a3...an] representing the positions > > I am not able to figure out how to convert [3,3,3] to ll[3][3][3] kind > of expression. I mean there can't be consed/joined/appended etc > without comma. > > -- > -- Regards, Pankaj Sejwal _______________________________________________ "The more I read, the more I acquire, the more certain I am that I know nothing.” - Voltaire ; ```
 Re: [Maxima-discuss] convert list access to function From: Stavros Macrakis (Σταῦρος Μακράκης) - 2014-07-21 12:59:21 Attachments: Message as HTML ```Take a look at substpart and apply. ```
 [Maxima-discuss] Re: Bug in implicit_plot, julia, mandelbrot and transform_xy From: 有坂富雄 - 2014-07-21 12:15:31 Attachments: Message as HTML ```Hi Jaime, On 2014-7-21, Jaime Villate wrote: > I don't think functions wxmandelbrot and wxjulia should be added to > Maxima, they should rather be added to Wxmaxima. I cannot test the code > you sent me, because I do not have Wxmaxima installed and other users > might be faced with the same problem. > Regards, > Jaime I understand your opinion. By the way, current version of complex_dynamics.lisp has a bug. julia() and mandelbrot() can not display any graphics with wxMaxima as follows: On 2014-6-02, 有坂富雄 wrote: > julia (-0.55, 0.6, [iterations, 36], [x, -0.3, 0.2], [y, 0.3, 0.9], >        [grid, 400, 400], [color_bar_tics, 0, 6, 36]); > Maxima encountered a Lisp error: >  error opening #P"/sw/Applications/maxout.gnuplot": Permission denied > Automatically continuing. > To enable the Lisp debugger set *debugger-hook* to nil. >  > mandelbrot ([iterations, 30], [x, -2, 1], [y, -1.2, 1.2], [grid,400,400]); > Maxima encountered a Lisp error: >  error opening #P"/sw/Applications/maxout.gnuplot": Permission denied > Automatically continuing. > To enable the Lisp debugger set *debugger-hook* to nil. >  > The path "/sw/Applications/" is the location of wxMaxima. > > So that I made a patch to fix it. \$ diff -u ./maxima-code-5dfc138beaff7c04e2a4b8b7bacdba071cae9df5/share/dynamics/complex_dynamics.lisp ./share/dynamics/complex_dynamics.lisp  --- ./maxima-code-5dfc138beaff7c04e2a4b8b7bacdba071cae9df5/share/dynamics/complex_dynamics.lisp 2014-07-20 15:34:42.000000000 +0900 +++ ./share/dynamics/complex_dynamics.lisp 2014-06-02 18:57:16.000000000 +0900 @@ -46,7 +46,7 @@      (setf output-file (getf options :gnuplot_out_file))      (if (and (eq gnuplot-term '\$default) output-file)          (setq file-name (plot-file-path output-file)) -        (setq file-name "maxout.gnuplot")) +        (setq file-name (plot-temp-file "maxout.gnuplot")))        (unless (getf options :yx_ratio) (setf (getf options :same_xy) t))       @@ -113,7 +113,7 @@      (setf output-file (getf options :gnuplot_out_file))      (if (and (eq gnuplot-term '\$default) output-file)          (setq file-name (plot-file-path output-file)) -        (setq file-name "maxout.gnuplot")) +        (setq file-name (plot-temp-file "maxout.gnuplot")))        (unless (getf options :yx_ratio) (setf (getf options :same_xy) t))       I hoped this patch would help you. Regards, Tomio P.S. My environment: wxbuild_info(); wxMaxima version: 13.4.2 Maxima version: 5.33.0 Maxima build date: 2014-04-20 04:11:32 Host type: x86_64-apple-darwin10.8.0 Lisp implementation type: SBCL Lisp implementation version: 1.1.17 ```
 Re: [Maxima-discuss] Bug in implicit_plot, julia, mandelbrot and transform_xy From: Jaime Villate - 2014-07-21 08:42:48 ```On 17-07-2014 11:52, 有坂富雄 wrote: > I would like to set both wxjulia() and wxmandelbrot() to be > automatically loaded. > So that I made the patch for the file max_ext.lisp as follows: > > Hi Tomio, I don't think functions wxmandelbrot and wxjulia should be added to Maxima, they should rather be added to Wxmaxima. I cannot test the code you sent me, because I do not have Wxmaxima installed and other users might be faced with the same problem. Regards, Jaime ```
 Re: [Maxima-discuss] bug in graphs From: Gunter Königsmann - 2014-07-21 04:15:19 Attachments: Message as HTML ```Try to delete all .o files in the path maxima is complaining about. It will then automatically generate correct versions of them. Kind regards, Gunter. On 21. Juli 2014 00:21:29 MESZ, Dimiter Prodanov wrote: >package graph does not load in Maxima 33.0 Win XP > >build_info(version="5.33.0",timestamp="2014-04-06 06:26:49",host= >"i686-pc-mingw32",lisp_name="GNU Common Lisp (GCL)",lisp_version="GCL >2.6.8") > >Loading C:/Documents and Settings/adminprodanov/My >Documents/maxima/binary/binary-gcl/share/contrib/graphs/graph_core.o >loadfile: failed to load >C:/PROGRA~1/MAXIMA~1.0/share/maxima/5.33.0/share/graphs/load-graphs.lisp > -- an error. To debug this try: debugmode(true); > > >------------------------------------------------------------------------ > >------------------------------------------------------------------------------ >Want fast and easy access to all the code in your enterprise? Index and >search up to 200,000 lines of code with a free copy of Black Duck >Code Sight - the same software that powers the world's largest code >search on Ohloh, the Black Duck Open Hub! Try it now. >http://p.sf.net/sfu/bds > >------------------------------------------------------------------------ > >_______________________________________________ >Maxima-discuss mailing list >Maxima-discuss@... >https://lists.sourceforge.net/lists/listinfo/maxima-discuss -- Diese Nachricht wurde von meinem Mobiltelefon mit Kaiten Mail gesendet.```
 [Maxima-discuss] convert list access to function From: Pankaj Sejwal - 2014-07-21 03:06:52 ```Hi, I want to access list elements based on their position but I don't intend to extract the elements out of list but instead keep my curosr there to apply some function on it, say, ll:[2,3,[a,b,[t,y,[u,i],[o,p],6,7]],8,8] I can reachout to various elements using, a) Using substitution, subst(apply(f,ll[3][3][3]),ll[3][3][3],ll) b) Or using positions directly as, ll[3][3][4]:apply(f,ll[3][3][4]); Showing the combined result of above two expressions, ll now, [2,3,[a,b,[t,y,f(u,i),f(o,p),6,7]],8,8] I want to create a function say, map_at_position(ll,[3,3,4],f) that shall give me [2,3,[a,b,[t,y,[u,i],f(o,p),6,7]],8,8] Function definition needs to be like, map_at_position(ll,a,f):=block([],ll[a1][a2]a[3]...[an]:apply(f,ll[a1],[a2],[a3]...[an]),ll) where a = [a1,a2,a3...an] representing the positions I am not able to figure out how to convert [3,3,3] to ll[3][3][3] kind of expression. I mean there can't be consed/joined/appended etc without comma. -- Regards, Pankaj Sejwal _______________________________________________ "The more I read, the more I acquire, the more certain I am that I know nothing.” - Voltaire ```
 [Maxima-discuss] bug in graphs From: Dimiter Prodanov - 2014-07-20 22:21:56 Attachments: Message as HTML ```package graph does not load in Maxima 33.0 Win XP build_info(version="5.33.0",timestamp="2014-04-06 06:26:49",host= "i686-pc-mingw32",lisp_name="GNU Common Lisp (GCL)",lisp_version="GCL 2.6.8") Loading C:/Documents and Settings/adminprodanov/My Documents/maxima/binary/binary-gcl/share/contrib/graphs/graph_core.o loadfile: failed to load C:/PROGRA~1/MAXIMA~1.0/share/maxima/5.33.0/share/graphs/load-graphs.lisp -- an error. To debug this try: debugmode(true); ```
 Re: [Maxima-discuss] Comfort feature for explicit() From: Martin Kraska - 2014-07-20 22:14:11 Attachments: Message as HTML ```Mario, thanks for the proposal. Ill try to implement the requested feature in a modified version of explicit() and put that in the session init file. Your code snippet should be a good start for that. I just want to provide color cycling and automatic keys. All further flexibility could be provided by using separate draw objects. Martin Von: Mario Rodriguez [mailto:biomates@...] Gesendet: Donnerstag, 10. Juli 2014 07:56 An: Martin Kraska; maxima-discuss@... Betreff: Re: [Maxima-discuss] Comfort feature for explicit() El 15/06/14 16:44, Martin Kraska escribió: Hi, I would like to suggest an extension of the explicit() object in the draw package. Objective is to be of similar comfort like plot2d in standards situations. The extension would be to allow for lists of functions as first argument, e.g. explicit( [ sin(x), cos(x) ] , x,0,10 ). This then would trigger cycling through a set of colors and adding key entries based on the function name. Attached is an example of how the plot commands have to be provided now and how this could look like with the extension. Perhaps it is sufficient to somehow re-define explicit() in the init file? Best regards, Martin Kraska Martin, I took a closer look at your request. In order to maintain overall homogeneity in package draw, this extension should be made to all 2d and 3d graphic objects. Also, I don't have a clear idea how to add style options to every single object. Instead of making these changes, I suggest to write a simple function that helps you to get the same final result: explicit_list(fs, var, x0, x1) := draw2d(makelist(explicit(k, var, x0, x1), k, fs)) \$ explicit_list( [ sin(x), cos(x) ] , x, 0, 10 )\$ This solution is more flexible, since with a little more coding, you can adapt the function to your particular needs. For example, in case you want to add colors and other local options, together with global options and other graphic objects, explicit_list_2(fs, var, x0, x1) := makelist([ color = first(k), line_width = second(k), key = third(k), explicit(fourth(k), var, x0, x1)], k, fs) \$ draw2d( terminal = wxt, title = "Examples", explicit_list_2( [ [red,2,"fun1",sin(t)], [green,4,"fun2",cos(t)] ] , t, 0, 10 ), color= black, parametric(u,u^2,u,-1,1))\$ You can write these or other similar functions into a file to design your own drawing syntax. -- Mario ```
 Re: [Maxima-discuss] fatal bug map From: Gunter Königsmann - 2014-07-20 19:21:58 ```-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Sounds like any try to do make the error messages in these cases more specific would also cause a significant slowdown, too. Don't like slowdowns. Kind regards, Gunter. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJTzBbJAAoJEFyGwOQhHVuO3q8P/0ejR6JHZEBVM+O+y0J/Bswc aiCI5gMBSrDDjEyWmEFcUP1817ywdQbVnBehYP+kpq3+fdt6rpEZhmX1dObO9Cox ISKBDOVFEtwc5DfzgpyJAPVWIaqkpY0Yh7cCxaxAlm37MpsbrW6AxYvcfaDAK1Hz bumteZPzFhevP9kGapeiuAuGwPhLSCD8T+4+S27N5N1ZuVUOY2LwTV+0Tiv1ZTjR R6X/pEHQ0g8trMR0aYITXhQol9CX7kC69antwOMV0gCm7yyPoK33HYxMpGAJKzOd 0ztc+oR49XqMXAC0M0uYR10vOcJRNe6f1jhr7ocoLCZKvIhMO4lBTaQPnJhHCOIA NNIuwrjdDKbtYWo2qB2/PzNgEdTIcAH7HDJQDE2nqQOIt8Yz8nGpql7uR8cx4atT XOHaMb7xGBg/mhBbzZ4ypGpjixvMUU6gw/Pi5C4ZUAO9vW0MPW9S+s1nYgOXt8T9 ywr9Ha6oa+4xTU9ucjrMt80+bRTUxkwp7bPWIG0+MApN0Lcpy9qT+fyRaoGi5bj5 EeCSO5cpQFbb1I32KDw/Mk+U1NnItqG8h4WTBf2mqizqoXsflrpdSW9IlefHeB1k BWtuMB0d8MM6GDLhZOtzvldXy56WOpu3nZWFw/fnl4rbOYxPemp6F3K09MDPhtIp u22DJTJa9gmpnbgIMSLm =qnsT -----END PGP SIGNATURE----- ```
 Re: [Maxima-discuss] fatal bug map From: Richard Fateman - 2014-07-20 16:48:51 Attachments: Message as HTML ```Any Lisp function can be called on any Lisp object from Maxima. Intercepting all possible illegal operations in Lisp would be a challenge. You can type, in Maxima, ?+(3,4) to get 7 ?+(3,x) to get a Lisp error. (although not "memory may be damaged"...) It would of course be nice to never get an error message from Lisp, but get a more appropriate error message from Maxima. But a challenge, since Maxima has almost nothing to do with the execution of a Lisp function xxx called as ?xxxx(.....) RJF On 7/20/2014 9:40 AM, Gunter Königsmann wrote: > > The same error message occurs if you apply the length() function to an > array. > Kind regards, > > Gunter. > > > > On 20. Juli 2014 17:40:24 MESZ, Raymond Toy > wrote: > > "Dimiter" == Dimiter Prodanov > writes: > > > Dimiter> Dear all, > > > > Dimiter> The following simple command kills Maxima very scucesfully > > > > Dimiter> map ("<", 3 , 4 ) > > > Dimiter> Maxima encountered a Lisp error: > > Dimiter> Error in PROGN [or a callee]: Caught fatal error [memory may be damaged] > > Dimiter> Automatically continuing. > > Dimiter> To enable the Lisp debugger set *debugger-hook* to nil. > > > Because 3 (and 4) is not a list. > > Yes, maxima should check for this instead of crashing. > > Ray > > > ------------------------------------------------------------------------ > > Want fast and easy access to all the code in your enterprise? Index and > search up to 200,000 lines of code with a free copy of Black Duck > Code Sight - the same software that powers the world's largest code > search on Ohloh, the Black Duck Open Hub! Try it now. > http://p.sf.net/sfu/bds > ------------------------------------------------------------------------ > > Maxima-discuss mailing list > Maxima-discuss@... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > > > -- > Diese Nachricht wurde von meinem Mobiltelefon mit Kaiten Mail gesendet. > > > ------------------------------------------------------------------------------ > Want fast and easy access to all the code in your enterprise? Index and > search up to 200,000 lines of code with a free copy of Black Duck > Code Sight - the same software that powers the world's largest code > search on Ohloh, the Black Duck Open Hub! Try it now. > http://p.sf.net/sfu/bds > > > _______________________________________________ > Maxima-discuss mailing list > Maxima-discuss@... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss ```
 Re: [Maxima-discuss] fatal bug map From: Gunter Königsmann - 2014-07-20 16:41:02 Attachments: Message as HTML ```The same error message occurs if you apply the length() function to an array. Kind regards, Gunter. On 20. Juli 2014 17:40:24 MESZ, Raymond Toy wrote: >>>>>> "Dimiter" == Dimiter Prodanov writes: > > Dimiter> Dear all, > > > > Dimiter> The following simple command kills Maxima very scucesfully > > > > Dimiter> map ("<", 3 , 4 ) > > > Dimiter> Maxima encountered a Lisp error: > >Dimiter>  Error in PROGN [or a callee]: Caught fatal error [memory may >be damaged] > > Dimiter> Automatically continuing. > > Dimiter> To enable the Lisp debugger set *debugger-hook* to nil. > > >Because 3 (and 4) is not a list. > >Yes, maxima should check for this instead of crashing. > >Ray > > >------------------------------------------------------------------------------ >Want fast and easy access to all the code in your enterprise? Index and >search up to 200,000 lines of code with a free copy of Black Duck >Code Sight - the same software that powers the world's largest code >search on Ohloh, the Black Duck Open Hub! Try it now. >http://p.sf.net/sfu/bds >_______________________________________________ >Maxima-discuss mailing list >Maxima-discuss@... >https://lists.sourceforge.net/lists/listinfo/maxima-discuss -- Diese Nachricht wurde von meinem Mobiltelefon mit Kaiten Mail gesendet.```
 Re: [Maxima-discuss] fatal bug map From: Raymond Toy - 2014-07-20 15:40:50 ```>>>>> "Dimiter" == Dimiter Prodanov writes: Dimiter> Dear all, Dimiter> The following simple command kills Maxima very scucesfully Dimiter> map ("<", 3 , 4 ) Dimiter> Maxima encountered a Lisp error: Dimiter>  Error in PROGN [or a callee]: Caught fatal error [memory may be damaged] Dimiter> Automatically continuing. Dimiter> To enable the Lisp debugger set *debugger-hook* to nil. Because 3 (and 4) is not a list. Yes, maxima should check for this instead of crashing. Ray ```
 [Maxima-discuss] fatal bug map From: Dimiter Prodanov - 2014-07-20 13:16:37 Attachments: Message as HTML ```Dear all, The following simple command kills Maxima very scucesfully map ("<", 3 , 4 ) Maxima encountered a Lisp error: Error in PROGN [or a callee]: Caught fatal error [memory may be damaged] Automatically continuing. To enable the Lisp debugger set *debugger-hook* to nil. and more generally map (f, 3 , 4 ) best regards, Dimiter ```
 Re: [Maxima-discuss] numerical issue division From: Dimiter Prodanov - 2014-07-20 12:37:11 Attachments: Message as HTML ```Thnanks for the suggestions. I don't quite understand your approachin p.2. Could you elaborate? best regards, Dimiter ```
 Re: [Maxima-discuss] numerical issue division From: Barton Willis - 2014-07-20 11:34:43 Attachments: Message as HTML ``` 1. You could change the while loop to count down instead of up and test for k >= 0. That would eliminate the local variable i. 2. You might consider giving the user a different way to choose the precision--try something like (%i15) g(x, [l]) := block([prec :assoc('prec,l,1.0e-8)], [x,prec])\$ (%i16) g(2); (%o16) [2,1.0*10^-8] (% 3. Why does your code extract the numerator and the denominator only to immediately reform the quotient? 4. i17) g(2, 'prec = 42); (%o17) [2,42] 5. I know it's popular (Python language maybe), but the leading underscore convention makes Maxima code difficult for me to read. The difference between _prec and prec is difficult for me to see, making the convention a source of bugs. 6. Initially, your code computes fix(x) three times--maybe the code could be rearranged somewhat making it simpler. 7. Maxima source code comments are surrounded by /* ... */ . Maybe instead of the strings in your code, you would like to make comments? --Barton ________________________________ cf1(x, k ):=block ( [ q:[ fix(x)], i:0, m: fix(x), _rem:0, _num, _den, _prec: sqrt(ratepsilon) ], _rem: (x- fix(x)), " fractional part", while i _prec do ( "print (_rem/_prec)", _num:num(_rem), _den:denom(_rem), m: fix(_den/_num), q:cons (m, q), _rem: (_den/_num - m), i:i+1 ), reverse(q) )\$ ```
 Re: [Maxima-discuss] numerical issue division From: Dimiter Prodanov - 2014-07-20 00:09:56 Attachments: Message as HTML ```The issues with the code are fixed. Here is the updated code. As expected the iterative version of the algorithm is more reliable. cf1(x, k ):=block ( [ q:[ fix(x)], i:0, m: fix(x), _rem:0, _num, _den, _prec: sqrt(ratepsilon) ], _rem: (x- fix(x)), " fractional part", while i _prec do ( "print (_rem/_prec)", _num:num(_rem), _den:denom(_rem), m: fix(_den/_num), q:cons (m, q), _rem: (_den/_num - m), i:i+1 ), reverse(q) )\$ cfr2(x, k):=block([ f:fix(x), _rem, _num, _den, _prec: sqrt(ratepsilon) ], _rem: (x-f), if k < fpprec and _rem > _prec then ( if _rem > 0 then ( _num: num(_rem), _den: denom(_rem), "print (_num, _den)", cons(f, cfr2(_den/_num, k+1 ) ) ) else [f] ) else [f] )\$ cf1(bfloat(%e), 604 ),fpprec:1000; >> [2,1,2,1,1,4,1,1,6,1,1,8,1,1,10,1,1,12,1,1,14,1,1,16,1,1 ,18,1,1,20,1,1,22,1,1,24,1,1,26,1,1,28,1,1,30,1,1,32,1,1,34,1,1 ,36,1,1,38,1,1,40,1,1,42,1,1,44,1,1,46,1,1,48,1,1,50,1,1,52,1,1 ,54,1,1,56,1,1,58,1,1,60,1,1,62,1,1,64,1,1,66,1,1,68,1,1,70,1,1 ,72,1,1,74,1,1,76,1,1,78,1,1,80,1,1,82,1,1,84,1,1,86,1,1,88,1,1 ,90,1,1,92,1,1,94,1,1,96,1,1,98,1,1,100,1,1,102,1,1,104,1,1,106, 1,1,108,1,1,110,1,1,112,1,1,114,1,1,116,1,1,118,1,1,120,1,1,122, 1,1,124,1,1,126,1,1,128,1,1,130,1,1,132,1,1,134,1,1,136,1,1,138, 1,1,140,1,1,142,1,1,144,1,1,146,1,1,148,1,1,150,1,1,152,1,1,154, 1,1,156,1,1,158,1,1,160,1,1,162,1,1,164,1,1,166,1,1,168,1,1,170, 1,1,172,1,1,174,1,1,176,1,1,178,1,1,180,1,1,182,1,1,184,1,1,186, 1,1,188,1,1,190,1,1,192,1,1,194,1,1,196,1,1,198,1,1,200,1,1,202, 1,1,204,1,1,206,1,1,208,1,1,210,1,1,212,1,1,214,1,1,216,1,1,218, 1,1,220,1,1,222,1,1,224,1,1,226,1,1,228,1,1,230,1,1,232,1,1,234, 1,1,236,1,1,238,1,1,240,1,1,242,1,1,244,1,1,246,1,1,248,1,1,250, 1,1,252,1,1,254,1,1,256,1,1,258,1,1,260,1,1,262,1,1,264,1,1,266, 1,1,268,1,1,270,1,1,272,1,1,274,1,1,276,1,1,278,1,1,280,1,1,282, 1,1,284,1,1,286,1,1,288,1,1,290,1,1,292,1,1,294,1,1,296,1,1,298, 1,1,300,1,1,302,1,1,304,1,1,306,1,1,308,1,1,310,1,1,312,1,1,314, 1,1,316,1,1,318,1,1,320,1,1,322,1,1,324,1,1,326,1,1,328,1,1,330, 1,1,332,1,1,334,1,1,336,1,1,338,1,1,340,1,1,342,1,1,344,1,1,346, 1,1,348,1,1,350,1,1,352,1,1,354,1,1,356,1,1,358,1,1,360,1,1,362, 1,1,364,1,1,366,1,1,368,1,1,370,1,1,372,1,1,374,1,1,376,1,1,378, 1,1,380,1,1,382,1,1,384,1,1,386,1,1,388,1,1,390,1,1,392,1,1,394, 1,1,396,1,1,398,1,1,400,1,1,402,1,1] The only advantage over the buit-in cf function is the ability to handle the bult-in constants %e, %pi, %gamma and %phi Dimiter ```
 Re: [Maxima-discuss] "stringout" to the console? From: Henry Baker - 2014-07-19 21:53:21 ```Yes, thanks! Both "grind()" and "string()" do variations on what I want. Is there any way to update the documentation on "grind" and "string" to mention considering "stringout" and vice versa ? This kind of documentation would be helpful for newbies (and some oldie newbies like me). At 02:38 PM 7/19/2014, Richard Fateman wrote: >maybe grind() will do what you want? > >remember grindef? > >RJF >On 7/19/2014 2:06 PM, Henry Baker wrote: >>I hope this is a trivial problem, but how do I do "stringout" to the console? >> >>Maxima 5.28.0-2 http://maxima.sourceforge.net >>using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (a.k.a. GCL) >>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) x+y; >>(%o1) y + x >>(%i2) stringout("d:\\foo.mac",%); >>(%o2) d:/foo.mac >>(%i3) >> >>I can go into the ascii file foo.mac to find the string "y+x;", but is there an easier way to simply display it on the console as a string like this: "y+x;" ? ```
 [Maxima-discuss] "stringout" to the console? From: Henry Baker - 2014-07-19 21:08:05 ```I hope this is a trivial problem, but how do I do "stringout" to the console? Maxima 5.28.0-2 http://maxima.sourceforge.net using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (a.k.a. GCL) 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) x+y; (%o1) y + x (%i2) stringout("d:\\foo.mac",%); (%o2) d:/foo.mac (%i3) I can go into the ascii file foo.mac to find the string "y+x;", but is there an easier way to simply display it on the console as a string like this: "y+x;" ? ```
 [Maxima-discuss] bug in dynamics package From: 本田康晃 - 2014-07-19 14:58:44 Attachments: Message as HTML     dynamic.patch
 Re: [Maxima-discuss] numerical issue division From: Barton Willis - 2014-07-19 12:19:10 Attachments: Message as HTML ```I'm not an expert on errset, but I think that the function numer (defined in compar.lisp) is missing a needed assignment to the special errcatch. Changing numer to (defun numer (x) (let ((\$numer t) ; currently, no effect on \$float, but proposed to (\$ratprint nil)) ;; Catch a Lisp error, if a floating point overflow occurs. (car (let ((errset nil) (errcatch (cons bindlist loclist))) (errset (\$float x) lisperrprint))))) gives (%i6) x : (207300647060*%e-563501581931)/(403978495031*%e-1098127402131)\$ (%i7) sign(x), signbfloat : false; expt: undefined: 0 to a negative exponent. (%o7) pnz (%i8) sign(x), signbfloat : true; expt: undefined: 0 to a negative exponent. (%o8) zero Some years ago, (I think) we changed the default of signbfloat to true :( The current definition of numer: (defun numer (x) (let ((\$numer t) ; currently, no effect on \$float, but proposed to (\$ratprint nil) result) ;; Catch a Lisp error, if a floating point overflow occurs. (setq result (let ((errset nil)) (errset (\$float x)))) (if result (car result) nil))) --Barton ```
 [Maxima-discuss] Polynomial enumeration problem From: VicTT - 2014-07-19 09:22:47 Attachments: Message as HTML ```Let P(x) be a polynomial of degree n with real distinct roots x_1,x_2,...,x_n. Let S denote the set of these roots, card(S)=n Let Q denote the set of coefficients of P(x), card(Q)=n+1 We are looking to enumerate all P(x) for arbitrary n such that the set S is included in Q. Could this be done in Maxima, and if so, how? Thank you in advance, Pirvu Paul Daniel```
 Re: [Maxima-discuss] numerical issue division From: Barton Willis - 2014-07-19 00:31:42 Attachments: Message as HTML ```Changing numer (defined in compar.lisp) to use bfloat instead float yields (%i17) makelist(block([fpprec : i], sign((207300647060*%e-563501581931)/(403978495031*%e-1098127402131))),i,24,25); (%o17) [zero,neg] ________________________________ From: Barton Willis Sent: Friday, July 18, 2014 17:18 To: Stavros Macrakis (Σταῦρος Μακράκης); Raymond Toy Cc: Subject: Re: [Maxima-discuss] numerical issue division I think it's a bug in sign: (%i5) sign((207300647060*%e-563501581931)/(403978495031*%e-1098127402131)); 1> (\$CSIGN -1.0) <1 (\$CSIGN \$NEG) expt: undefined: 0 to a negative exponent. The switch signbfloat : false doesn't provide a workaround for this sign bug. --Barton ________________________________ From: Stavros Macrakis (Σταῦρος Μακράκης) Sent: Friday, July 18, 2014 17:00 To: Raymond Toy Cc: Subject: Re: [Maxima-discuss] numerical issue division ​Hmm, I now get the same (Maxima 5.33.0 Lisp SBCL 1.0.55.0-abb03f9 MacOSX). Note that bfloat(denom) is 0.0b0 for fpprec <= 24. Overall result is correct for fpprec >= 26.​ On Fri, Jul 18, 2014 at 5:17 PM, Raymond Toy > wrote: ceiling((207300647060*%e-563501581931)/(403978495031*%e-1098127402131)) ```
 Re: [Maxima-discuss] numerical issue division From: Barton Willis - 2014-07-18 22:18:24 Attachments: Message as HTML ```I think it's a bug in sign: (%i5) sign((207300647060*%e-563501581931)/(403978495031*%e-1098127402131)); 1> (\$CSIGN -1.0) <1 (\$CSIGN \$NEG) expt: undefined: 0 to a negative exponent. The switch signbfloat : false doesn't provide a workaround for this sign bug. --Barton ________________________________ From: Stavros Macrakis (Σταῦρος Μακράκης) Sent: Friday, July 18, 2014 17:00 To: Raymond Toy Cc: Subject: Re: [Maxima-discuss] numerical issue division ​Hmm, I now get the same (Maxima 5.33.0 Lisp SBCL 1.0.55.0-abb03f9 MacOSX). Note that bfloat(denom) is 0.0b0 for fpprec <= 24. Overall result is correct for fpprec >= 26.​ On Fri, Jul 18, 2014 at 5:17 PM, Raymond Toy > wrote: ceiling((207300647060*%e-563501581931)/(403978495031*%e-1098127402131)) ```
 Re: [Maxima-discuss] numerical issue division From: Stavros Macrakis (Σταῦρος Μακράκης) - 2014-07-18 22:00:36 Attachments: Message as HTML ```​Hmm, I now get the same (Maxima 5.33.0 Lisp SBCL 1.0.55.0-abb03f9 MacOSX). Note that bfloat(denom) is 0.0b0 for fpprec <= 24. Overall result is correct for fpprec >= 26.​ On Fri, Jul 18, 2014 at 5:17 PM, Raymond Toy wrote: > ceiling((207300647060*%e-563501581931)/(403978495031*%e-1098127402131)) > ```
 Re: [Maxima-discuss] numerical issue division From: Raymond Toy - 2014-07-18 21:17:50 ```>>>>> "Stavros" == Stavros Macrakis <(Σταῦρος Μακράκης)" > writes: Stavros> In playing with Dimiter's code, I came across an unfortunate bug: Stavros> ceiling((207300647060*%e-563501581931)/(403978495031*%e-1098127402131)) Stavros>     => error (with no explanation) FWIW, I get expt: undefined: 0 to a negative exponent. -- an error. To debug this try: debugmode(true); Ray ```

Showing results of 1941

<< < 1 2 3 4 .. 78 > >> (Page 2 of 78)