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
(399) |
Sep
(364) |
Oct
(269) |
Nov
(357) |
Dec
(468) |
| 2016 |
Jan
(618) |
Feb
(592) |
Mar
(625) |
Apr
(516) |
May
(375) |
Jun
(155) |
Jul
(346) |
Aug
(262) |
Sep
(346) |
Oct
(291) |
Nov
(333) |
Dec
(335) |
| 2017 |
Jan
(436) |
Feb
(460) |
Mar
(370) |
Apr
(189) |
May
(252) |
Jun
(272) |
Jul
(286) |
Aug
(293) |
Sep
(303) |
Oct
(331) |
Nov
(346) |
Dec
(273) |
| 2018 |
Jan
(295) |
Feb
(343) |
Mar
(265) |
Apr
(290) |
May
(233) |
Jun
(201) |
Jul
(234) |
Aug
(125) |
Sep
(287) |
Oct
(322) |
Nov
(274) |
Dec
(293) |
| 2019 |
Jan
(406) |
Feb
(255) |
Mar
(418) |
Apr
(187) |
May
(247) |
Jun
(282) |
Jul
(84) |
Aug
(108) |
Sep
(175) |
Oct
(161) |
Nov
(215) |
Dec
(184) |
| 2020 |
Jan
(205) |
Feb
(287) |
Mar
(180) |
Apr
(285) |
May
(272) |
Jun
(266) |
Jul
(133) |
Aug
(253) |
Sep
(281) |
Oct
(346) |
Nov
(293) |
Dec
(253) |
| 2021 |
Jan
(218) |
Feb
(194) |
Mar
(399) |
Apr
(312) |
May
(425) |
Jun
(358) |
Jul
(160) |
Aug
(251) |
Sep
(110) |
Oct
(113) |
Nov
(257) |
Dec
(99) |
| 2022 |
Jan
(233) |
Feb
(184) |
Mar
(284) |
Apr
(221) |
May
(178) |
Jun
(231) |
Jul
(337) |
Aug
(264) |
Sep
(181) |
Oct
(183) |
Nov
(281) |
Dec
(406) |
| 2023 |
Jan
(479) |
Feb
(263) |
Mar
(278) |
Apr
(149) |
May
(186) |
Jun
(215) |
Jul
(353) |
Aug
(195) |
Sep
(232) |
Oct
(140) |
Nov
(211) |
Dec
(197) |
| 2024 |
Jan
(348) |
Feb
(167) |
Mar
(131) |
Apr
(222) |
May
(113) |
Jun
(136) |
Jul
(242) |
Aug
(105) |
Sep
(94) |
Oct
(237) |
Nov
(110) |
Dec
(155) |
| 2025 |
Jan
(372) |
Feb
(234) |
Mar
(332) |
Apr
(310) |
May
(203) |
Jun
(63) |
Jul
(254) |
Aug
(151) |
Sep
(145) |
Oct
(126) |
Nov
(151) |
Dec
(51) |
|
From: Raymond T. <toy...@gm...> - 2025-12-01 01:34:24
|
On 11/30/25 12:46 PM, Stavros Macrakis wrote: > Agreed that discussion of numeric.lisp/bigfloat should be a new > thread. So here it is. > > You say: > > So in your example of |(bigfloat::expt (bigfloat:to 4) > (bigfloat:to '((rat) 1 2)))|, the args are a CL fixnum and a CL > ratio. By the rules of CL, the result is a single-precision result. > > OK, but those aren't the rules of Maxima...! Yes, that was a conscious decision. The reason for bigfloat was to extend the CL arithmetic/special functions to support bigfloats (real and complex) while also still handling CL numbers according to CL rules. It was not intended to have Maxima semantics. By doing it this way, you would be able to take any numeric code using double-floats, and it would work with bigfloats automatically, mostly. You just had to take care of infinities (which don't exist in bfloats), and also any calculations with an epsilon value. Anything else was beyond the scope of bigfloat. Plus, I mostly got tired of writing bfloat arithmetic with fpadd, fpdifference, etc., because I could never remember the names themselves and whether the args included the bigfloat marker or not. Hence, there are |to| functions to convert maxima numbers into CL numbers or bigfloat numbers. And a corresponding |to| function to convert them to Maxima numbers. > (I don't remember exactly where the |to| name came from, but there > was a Maxima function |to| that did something similar.) > > I'd think "to" means "convert-to", no? > > You've probably forgotten that 1e0 and 1f0 are the same precision. > > The Maxima reader treats them as the same, but in this case, > single-precision was the /return value/, and they're not the same Lisp > type and don't print the same in Maxima: > > (type-of 1.0f0) => SINGLE-FLOAT > (/ 1.0f0 3) => 0.33333334f0 > ($print 1.0f0) => 1.0f0 > > > (type-of 1.0e0) => DOUBLE-FLOAT > > (/ 1.0e0 3) => 0.3333333333333333 > > ($print 1.0e0) => 1.0 > That's because maxima sets |*read-default-float-format*| to |double-float|. I'm assuming you're running this in maxima. 1e0 is a single-float in CL with default settings. > > > On Sun, Nov 30, 2025 at 11:15 PM Raymond Toy via Maxima-bugs > <max...@li...> wrote: > > This should probably be a new issue or a discussion on the mailing > list. Like the rest of Maxima, I didn't write any design docs. :-( > The only documentation is the code and comments in > src/numeric.lisp. However the general idea with the functions in > the bigfloat package is to mimic what CL does, except when one (or > more) operands are bfloats, in which case the result is a bfloat. > Also |bigfloat:to| returns a numeric type. If the arg is a CL > type, that's what you get. If it's a bfloat, you get a bigfloat > object. > > By doing it this way, you could write one function that would > handle CL numeric types or bfloats without changing the function. > Of course, if speed mattered, you'd write a special double-float > version. But the bfloat version could very possibly be identical, > if some care is taken to compute an epsilon value appropriately. > > So in your example of |(bigfloat::expt (bigfloat:to 4) > (bigfloat:to '((rat) 1 2)))|, the args are a CL fixnum and a CL > ratio. By the rules of CL, the result is a single-precision result. > > (I don't remember exactly where the |to| name came from, but there > was a Maxima function |to| that did something similar.) > > You've probably forgotten that 1e0 and 1f0 are the same precision. > > I should probably convert some of the comments in to docstrings so > you can easily look up what they do via |cl:describe|. > > ------------------------------------------------------------------------ > > *[bugs:#4636] <https://sourceforge.net/p/maxima/bugs/4636/> > signum(ind) is an error* > > *Status:* open > *Group:* None > *Labels:* extended real signum limit > *Created:* Thu Nov 27, 2025 12:41 PM UTC by Barton Willis > *Last Updated:* Sun Nov 30, 2025 02:27 PM UTC > *Owner:* nobody > > Either a |signum| nounform or |ind| is a better result than an error: > > |(%i4) signum(ind); sign: sign of ind is undefined. | > > Should the general simplifier, or the one‑argument limit function, > handle|F(extended-real)|? We’ve discussed this—do we have a consensus? > > ------------------------------------------------------------------------ > > Sent from sourceforge.net <http://sourceforge.net> because > max...@li... is subscribed to > https://sourceforge.net/p/maxima/bugs/ > > To unsubscribe from further messages, a project admin can change > settings at https://sourceforge.net/p/maxima/admin/bugs/options. > Or, if this is a mailing list, you can unsubscribe from the > mailing list. > > _______________________________________________ > Maxima-bugs mailing list > Max...@li... > https://lists.sourceforge.net/lists/listinfo/maxima-bugs > > > > _______________________________________________ > Maxima-discuss mailing list > Max...@li... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss ​ |
|
From: Stavros M. <mac...@gm...> - 2025-11-30 20:47:08
|
Agreed that discussion of numeric.lisp/bigfloat should be a new thread. So here it is. You say: So in your example of (bigfloat::expt (bigfloat:to 4) (bigfloat:to '((rat) 1 2))), the args are a CL fixnum and a CL ratio. By the rules of CL, the result is a single-precision result. OK, but those aren't the rules of Maxima...! (I don't remember exactly where the to name came from, but there was a Maxima function to that did something similar.) I'd think "to" means "convert-to", no? You've probably forgotten that 1e0 and 1f0 are the same precision. The Maxima reader treats them as the same, but in this case, single-precision was the *return value*, and they're not the same Lisp type and don't print the same in Maxima: (type-of 1.0f0) => SINGLE-FLOAT (/ 1.0f0 3) => 0.33333334f0 ($print 1.0f0) => 1.0f0 (type-of 1.0e0) => DOUBLE-FLOAT (/ 1.0e0 3) => 0.3333333333333333 ($print 1.0e0) => 1.0 On Sun, Nov 30, 2025 at 11:15 PM Raymond Toy via Maxima-bugs < max...@li...> wrote: > This should probably be a new issue or a discussion on the mailing list. > Like the rest of Maxima, I didn't write any design docs. :-( The only > documentation is the code and comments in src/numeric.lisp. However the > general idea with the functions in the bigfloat package is to mimic what CL > does, except when one (or more) operands are bfloats, in which case the > result is a bfloat. Also bigfloat:to returns a numeric type. If the arg > is a CL type, that's what you get. If it's a bfloat, you get a bigfloat > object. > > By doing it this way, you could write one function that would handle CL > numeric types or bfloats without changing the function. Of course, if speed > mattered, you'd write a special double-float version. But the bfloat > version could very possibly be identical, if some care is taken to compute > an epsilon value appropriately. > > So in your example of (bigfloat::expt (bigfloat:to 4) (bigfloat:to > '((rat) 1 2))), the args are a CL fixnum and a CL ratio. By the rules of > CL, the result is a single-precision result. > > (I don't remember exactly where the to name came from, but there was a > Maxima function to that did something similar.) > > You've probably forgotten that 1e0 and 1f0 are the same precision. > > I should probably convert some of the comments in to docstrings so you can > easily look up what they do via cl:describe. > ------------------------------ > > *[bugs:#4636] <https://sourceforge.net/p/maxima/bugs/4636/> signum(ind) is > an error* > > *Status:* open > *Group:* None > *Labels:* extended real signum limit > *Created:* Thu Nov 27, 2025 12:41 PM UTC by Barton Willis > *Last Updated:* Sun Nov 30, 2025 02:27 PM UTC > *Owner:* nobody > > Either a signum nounform or ind is a better result than an error: > > (%i4) signum(ind); > sign: sign of ind is undefined. > > Should the general simplifier, or the one‑argument limit function, handle > F(extended-real)? We’ve discussed this—do we have a consensus? > ------------------------------ > > Sent from sourceforge.net because max...@li... is > subscribed to https://sourceforge.net/p/maxima/bugs/ > > To unsubscribe from further messages, a project admin can change settings > at https://sourceforge.net/p/maxima/admin/bugs/options. Or, if this is a > mailing list, you can unsubscribe from the mailing list. > _______________________________________________ > Maxima-bugs mailing list > Max...@li... > https://lists.sourceforge.net/lists/listinfo/maxima-bugs > |
|
From: Richard F. <fa...@gm...> - 2025-11-30 17:48:48
|
loading decfloat via load(decfp): the following commands work bfloat(%i) bfloat(3) but bfloat(3*%i) fails. bfloat(3*x) fails bfloat(3+x) fails The bug occurs inside a call to dectimesbigfloat, decaddbigfloat... There's a test to see if any of the parts of the product or sum are not convertible to decimal, in which case the usual (binary) bigfloat is used. but it then fails since it apparently cannot be converted to a bigfloat. If you really want a binary bigfloat, you could add, say, sin(bfloat(0)) to any decimal expression and you'll get a binary bigfloat, somaybe you don't need to "turn off" decimals. I will look at this some more, but I suspect this used to work, and a change somewhere else (such as improved type checking) causes this error. RJF On Sun, Nov 30, 2025 at 8:52 AM Barton Willis via Maxima-discuss < max...@li...> wrote: > *Reminder: * After running the share testsuite, don't expect floating > point calculations to work. The culprit is the decimal float package. > There is a source code comment in testsuite.lisp saying that this test > needs to be the last. > > This morning, I consumed a third cup of coffee puzzling over why Maxima > was giving an error for bfloat(%i/sqrt(3)). > > Maybe somebody can figure out a way to allow Maxima to "unload" this > package and restore Maxima to as it was before loading. > > Don't get me wrong: the decimal float package is worthy, but using it > could confuse users (like me). > > Example > > %i1) bfloat(%i/sqrt(3)); > > Maxima encountered a Lisp error: > > The value NIL is not of the expected type NUMBER. > _______________________________________________ > Maxima-discuss mailing list > Max...@li... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > |
|
From: Barton W. <wi...@un...> - 2025-11-30 16:51:48
|
Reminder: After running the share testsuite, don't expect floating point calculations to work. The culprit is the decimal float package. There is a source code comment in testsuite.lisp saying that this test needs to be the last. This morning, I consumed a third cup of coffee puzzling over why Maxima was giving an error for bfloat(%i/sqrt(3)). Maybe somebody can figure out a way to allow Maxima to "unload" this package and restore Maxima to as it was before loading. Don't get me wrong: the decimal float package is worthy, but using it could confuse users (like me). Example %i1) bfloat(%i/sqrt(3)); Maxima encountered a Lisp error: The value NIL is not of the expected type NUMBER. |
|
From: Eduardo O. <edu...@gm...> - 2025-11-30 01:54:09
|
Done: https://sourceforge.net/p/maxima/bugs/4639/ Thanks for the encouragement! Eduardo =) On Sat, 29 Nov 2025 at 21:54, Robert Dodier <rob...@gm...> wrote: > Hi Eduardo, thanks for your continued interest in Maxima, and thanks > for looking into the display stuff. > > I've taken the liberty of forwarding your message to the mailing list. > I think every non-personal message should be sent to the mailing list, > on the theory that none of us own the code but we are all jointly > responsible in some way for it. > > I have some other stuff that I am working on at the moment, although I > think I will have some time in December to look into various issues. > Can you please open a ticket on the SF bug tracker and attach your > notes and images so that we can keep track of the problem and the > state of its resolution. > > If you have a proposed bugfix, please attach it as a diff to the bug > report. > > Thanks for your help, I appreciate it a lot. > > All the best, > > Robert > > On Sat, Nov 29, 2025 at 4:28 PM Eduardo Ochs <edu...@gm...> > wrote: > > > > Hi Robert, > > > > many months ago you sent this "defun dim-%antideriv" to the mailing > > list... > > > > https://sourceforge.net/p/maxima/mailman/message/59178281/ > > > > Look at the two screenshots below. The screenshot in > > "without-setq-width.png" uses your original code - and by defining > > this > > > > mybox(o) := [box(o)]; > > > > and then displaying "antideriv"s inside "mybox"es we can see clearly > > that there is something wrong with the widths... and the screenshot in > > "with-setq-width.png" uses your "dim-%antideriv" with a setq that I > > added - this one: > > > > ;; Edrx: > > (setq width (+ expr-w 1 (max upper-w lower-w))) > > > > Apparently that line fixes the bug in some cases... note that o1, o2 > > and o4 look fine, but there is a one-off error in the display of o3. > > > > If you think that you won't have time to play with that in the next > > months AND you have suggestions on which of the less-obvious special > > variables could be the culprits, please say, and I will try to > > understand them when I have time. Besides that, many thanks - your > > "dim-%antideriv" is much more readable than the old-style dim-* > > functions in displa.lisp! - and sorry for taking months to debug it, > > etc... =) > > > > Cheers! > > Eduardo Ochs > > https://anggtwu.net/eev-maxima.html > > > > > > P.S.: my version of the code is here: > > <https://anggtwu.net/MAXIMA/dim-antideriv.lisp.html> > > > |
|
From: Robert D. <rob...@gm...> - 2025-11-30 00:54:37
|
Hi Eduardo, thanks for your continued interest in Maxima, and thanks for looking into the display stuff. I've taken the liberty of forwarding your message to the mailing list. I think every non-personal message should be sent to the mailing list, on the theory that none of us own the code but we are all jointly responsible in some way for it. I have some other stuff that I am working on at the moment, although I think I will have some time in December to look into various issues. Can you please open a ticket on the SF bug tracker and attach your notes and images so that we can keep track of the problem and the state of its resolution. If you have a proposed bugfix, please attach it as a diff to the bug report. Thanks for your help, I appreciate it a lot. All the best, Robert On Sat, Nov 29, 2025 at 4:28 PM Eduardo Ochs <edu...@gm...> wrote: > > Hi Robert, > > many months ago you sent this "defun dim-%antideriv" to the mailing > list... > > https://sourceforge.net/p/maxima/mailman/message/59178281/ > > Look at the two screenshots below. The screenshot in > "without-setq-width.png" uses your original code - and by defining > this > > mybox(o) := [box(o)]; > > and then displaying "antideriv"s inside "mybox"es we can see clearly > that there is something wrong with the widths... and the screenshot in > "with-setq-width.png" uses your "dim-%antideriv" with a setq that I > added - this one: > > ;; Edrx: > (setq width (+ expr-w 1 (max upper-w lower-w))) > > Apparently that line fixes the bug in some cases... note that o1, o2 > and o4 look fine, but there is a one-off error in the display of o3. > > If you think that you won't have time to play with that in the next > months AND you have suggestions on which of the less-obvious special > variables could be the culprits, please say, and I will try to > understand them when I have time. Besides that, many thanks - your > "dim-%antideriv" is much more readable than the old-style dim-* > functions in displa.lisp! - and sorry for taking months to debug it, > etc... =) > > Cheers! > Eduardo Ochs > https://anggtwu.net/eev-maxima.html > > > P.S.: my version of the code is here: > <https://anggtwu.net/MAXIMA/dim-antideriv.lisp.html> > |
|
From: Robert D. <rob...@gm...> - 2025-11-29 04:45:18
|
I'm going to bump the Texinfo version requirement from 5.1 to 6.0 in configure.ac. The @sub command (subscript) is used in one of the Texinfo files (format.texi) and although it's possible to work around the lack of @sub by using some other command, I think it is preferable in this case to just use a somewhat more recent Texinfo installation. Texinfo 6.0 was released in 2015 so I think this is not a burdensome requirement. For the record, Texinfo 5.1 dates to 2013. FWIW and all the best. Robert |
|
From: Leo B. <Leo...@um...> - 2025-11-28 16:00:35
|
On Thu, Nov 27 2025, Robert Dodier <rob...@gm...> wrote: > On Thu, Nov 27, 2025 at 10:37 AM Leo Butler <Leo...@um...> wrote: > >> my git repo and then failed to push it. I started using the tikz >> terminal after many years of using cairlatex pdf and I just forgot about >> the stashed patch. Thanks for resurrecting it. > > What are the relative strengths and weaknesses of cairolatex vis a vis > tikz? I don't really know much about it, I'm just curious. Cairolatex is fast, especially when plotting with a non-trivial amount of data. But, it generates two files, which can be a pain if these are being put in an images directory or something like (one needs to make sure the graphics search path is set correctly). In addition, since the file ending of the graphics file is not included, changing the exported file type (e.g. png to pdf) will cause hiccups. Tikz generates a single, self-contained latex (.tikz) file. I find the graphics it creates are crisper. On the other hand, because a lot of the work is done by tex, the compiler matters--it is slow with pdflatex and very slow with lualatex. Those are my ¢2. Leo |
|
From: Stavros M. <mac...@gm...> - 2025-11-28 13:00:24
|
I hope it's clearer now how to use *integer_partitions*. As for your original syntax, partition_set(...,length(list)=*2)*, Maxima doesn't set *list* (or any other variable) to the candidate partition -- you'd need to write an explicit lambda-expression. Here is a little introduction to the magic variables in Maxima written by Gemini: Maxima has several "magical" system variables which are implicitly set by > Maxima as side effects of functions or to track interaction history. > > Here are the most notable ones, categorized by their behavior: > > 1. The "Context" Variables (Like piece) > > These are variables that are bound temporarily during the execution of a > specific function or rule. > > - > > *piece*: > - > > *Context:* Used inside substpart and substinpart. > - > > *Magic:* It refers to the specific sub-expression currently being > replaced. > - > > *Example:* substpart(piece^2, x+y+z, 2) replaces y with y^2. > > piece is unique because it captures a *context-dependent value during execution* (specifically inside substpart), > - > > *Pattern Matching Variables*: > - > > *Context:* Used in defmatch, defrule, tellsimp, and let. > - > > *Magic:* When you define a pattern with matchdeclare(x, predicate), > the variable x is automatically bound to the matching part of the > expression when the rule executes. > - > > *Example:* If you define matchdeclare(a, true) and a rule for a^2, > when the rule matches (x+1)^2, the variable a is momentarily bound > to x+1 inside the rule's body. > > 2. The "Side-Effect" Variables (Set by specific functions) > > Unlike piece, these variables persist *after* a command is finished. They > are often used to inspect "how" a problem was solved or to get details that > didn't fit in the main return value. > > - > > *multiplicities*: > - > > *Context:* Set by solve and allroots. > - > > *Magic:* It becomes a list of integers corresponding to the > multiplicity of each solution returned. > - > > *Example:* > Maxima > > solve((x-1)^2 * (x-2) = 0, x);/* Returns [x=1, x=2] */multiplicities;/* Returns [2, 1] */ > > - > > *method* (and friends in ode2): > - > > *Context:* Set by ode2 (the ordinary differential equation solver). > - > > *Magic:* After solving an ODE, method is set to the name of the > method Maxima used (e.g., linear, separable, exact). > - > > *Related Variables:* > - > > intfactor: Set to the integrating factor used (if any). > > - > > odeindex: Set to the index for Bernoulli or Euler equations. > - > > yp: Set to the particular solution found when using variation of > parameters. > > 3. The "Generated Symbol" Variables > > Maxima automatically creates and increments these counters to ensure > uniqueness in solutions. > > - > > *%c, %k1, %k2*: > - > > *Context:* Integration constants generated by ode2 and contrib_ode. > - > > *Magic:* %c is for 1st order, %k for 2nd order. They are > system-managed constants but appear in your output. > > - > > *%r variables* (e.g., %r1, %r2): > - > > *Context:* Set by solve or algsys. > - > > *Magic:* These represent arbitrary parameters in the solution of an > under-determined system (like a line of solutions). They are > tracked in the list %rnum_list. > > > 4. The "History" Variables > > - > > *%*: The result of the *last* command (output). > > - > > *_*: The *input* of the last command. > - > > *%%*: The result of the *previous statement* inside a block (e.g., block(a:2, > a+2, %% * 10) returns 40). > - > > *%th(k)*: The *k-th* previous output (e.g., %th(2) is the one before % > ). > - > > *%i / %o / %t labels*: > - > > %i5: Input #5. > - > > %o5: Output #5. > - > > %t5: *Intermediate* expressions. These often appear when solving > large systems or generating code; Maxima labels a sub-expression %t5 > and prints it separately to keep the main output readable. > > 5. Loop Variables (Not Magical) > > It is worth noting that unlike some languages (like Perl's $_ or awk's NR), > Maxima *does not* have an implicit variable for the current element in a > map or apply. You must always explicitly name your iterator (e.g., map(lambda([u], > u^2), [1,2,3])). > |
|
From: Atri B. <bad...@op...> - 2025-11-28 08:39:47
|
On Thu, 2025-11-27 at 20:44 +0000, Leo Butler wrote: > As an aside, while I was reading your patch, it occurred to me that > we > are hard-coding terminal options in the format strings, when we > should > do this in some kind of alist or hashtable. That way, we could extend > the current semantics of > > terminal=... > > to include something like: > > terminal=[cairolatex,[pdf,text=black,crop]] > > This would extend the existing syntax for wxt & related terminals: > > terminal=[wxt,4] > > This would require some significant re-factoring/re-organizing of > gnuplot.lisp, but it would not be terribly complicated, imo. > This would be a big, much welcome improvement indeed. I could try taking a stab at implementing this, but with my (very!) limited knowledge of lisp it might take me a bit. > I am certainly available to test any patches and provide feedback in any case. Cheers, -- Atri |
|
From: Atri B. <bad...@op...> - 2025-11-28 08:26:32
|
On Thu, 2025-11-27 at 14:07 -0800, Robert Dodier wrote: > On Thu, Nov 27, 2025 at 10:37 AM Leo Butler <Leo...@um...> > wrote: > > > my git repo and then failed to push it. I started using the tikz > > terminal after many years of using cairlatex pdf and I just forgot > > about > > the stashed patch. Thanks for resurrecting it. > > What are the relative strengths and weaknesses of cairolatex vis a > vis > tikz? I don't really know much about it, I'm just curious. > `cairolatex` pushes the text bits (e.g. labels for axes and tics) of a plot off to a LaTeX file, whilst producing a standalone pdf/png/eps file for the graphics (plot curves, surfaces and the like) to use with, say, `\includegraphics`. Very much like how one would use the `epslatex` terminal but with cairo backend for the graphics, and with outputs possible to pdf and png as well. This is especially useful for plots involving complex 2D graphics and surfaces which may be somewhat slow to render using tikz. In addition, I also find that the cairo backed rendering in these cases is a tad smoother and better looking than tikz's, but this is obviously subjective. My patch only implements a `cairolatex_pdf` output using `set terminal cairolatex pdf`, but we could have something similar for `cairolatex_png` as well. However, Leo's suggestion for improving how maxima sends gnuplot the terminal options would be a big improvement over implementing separate copies of `cairolatex_pdf`, `cairolatex_png`, `cairolatex_eps` and their stand-alone versions. Thanks and best wishes, -- Atri |
|
From: Robert D. <rob...@gm...> - 2025-11-27 22:10:19
|
On Thu, Nov 27, 2025 at 12:46 PM Leo Butler <Leo...@um...> wrote: > As an aside, while I was reading your patch, it occurred to me that we > are hard-coding terminal options in the format strings, when we should > do this in some kind of alist or hashtable. That way, we could extend > the current semantics of > > terminal=... > > to include something like: > > terminal=[cairolatex,[pdf,text=black,crop]] Hmm, sounds like a good idea, I'm on board. best Robert |
|
From: Robert D. <rob...@gm...> - 2025-11-27 22:08:01
|
On Thu, Nov 27, 2025 at 10:37 AM Leo Butler <Leo...@um...> wrote: > my git repo and then failed to push it. I started using the tikz > terminal after many years of using cairlatex pdf and I just forgot about > the stashed patch. Thanks for resurrecting it. What are the relative strengths and weaknesses of cairolatex vis a vis tikz? I don't really know much about it, I'm just curious. best Robert |
|
From: Leo B. <Leo...@um...> - 2025-11-27 20:45:08
|
As an aside, while I was reading your patch, it occurred to me that we
are hard-coding terminal options in the format strings, when we should
do this in some kind of alist or hashtable. That way, we could extend
the current semantics of
terminal=...
to include something like:
terminal=[cairolatex,[pdf,text=black,crop]]
This would extend the existing syntax for wxt & related terminals:
terminal=[wxt,4]
This would require some significant re-factoring/re-organizing of
gnuplot.lisp, but it would not be terribly complicated, imo.
Best regards,
Leo
On Fri, Nov 28 2025, Atri Bhattacharya <bad...@op...> wrote:
> On Thu, 2025-11-27 at 18:34 +0000, Leo Butler wrote:
>> Thank you for the patch. I have applied it as is. We should add some
>> tests to exercise the new options.
>>
>
> Many thanks, Leo, for pushing my patches through.
>
>> As you found from the mailing list, I had stashed an identical patch
>> in
>> my git repo and then failed to push it. I started using the tikz
>> terminal after many years of using cairlatex pdf and I just forgot
>> about
>> the stashed patch. Thanks for resurrecting it.
>>
>>
>
> No problem; I am glad that this will be in maxima with a future
> release.
>
> Best wishes,
> --
> Atri
>
>> On Thu, Nov 27 2025, Atri Bhattacharya <bad...@op...>
>> wrote:
>>
>> > Only support cairolatex_pdf for now.
>> > ---
>> > share/draw/gnuplot.lisp | 14 ++++++++++++--
>> > share/draw/grcommon.lisp | 3 ++-
>> > 2 files changed, 14 insertions(+), 3 deletions(-)
>> >
>> > diff --git a/share/draw/gnuplot.lisp b/share/draw/gnuplot.lisp
>> > index de004eb6e..cbb172485 100644
>> > --- a/share/draw/gnuplot.lisp
>> > +++ b/share/draw/gnuplot.lisp
>> > @@ -2857,7 +2857,7 @@
>> > (setf plotcmd
>> > (concatenate 'string
>> > (unless (or *multiplot-is-active*
>> > - (member (get-option '$terminal) '($eps
>> > $epslatex $epslatex_standalone)))
>> > + (member (get-option '$terminal) '($eps
>> > $epslatex $epslatex_standalone $cairolatex_pdf)))
>> > (format nil "set obj 1 fc rgb '~a' fs solid 1.0
>> > noborder ~%"
>> > (get-option '$background_color)) )
>> > (if (equal (get-option '$proportional_axes) '$none)
>> > @@ -3339,6 +3339,11 @@
>> > (/ (first (get-option '$dimensions))
>> > 100.0)
>> > (/ (second (get-option '$dimensions))
>> > 100.0)
>> > (get-option '$file_name)))
>> > + ($cairolatex_pdf (format cmdstorage "set terminal
>> > cairolatex pdf ~a color size ~acm, ~acm~%set out '~a.tex'"
>> > + (write-font-type)
>> > + (/ (first (get-option '$dimensions))
>> > 100.0)
>> > + (/ (second (get-option '$dimensions))
>> > 100.0)
>> > + (get-option '$file_name)))
>> > (($pdf $multipage_pdf) (format cmdstorage "set terminal
>> > pdf dashed enhanced ~a color size ~acm, ~acm~%set out '~a.pdf'"
>> > (write-font-type)
>> > (/ (first (get-option '$dimensions))
>> > 100.0)
>> > @@ -3483,7 +3488,7 @@
>> > (format cmdstorage "~%set size ~a, ~a~%" size1
>> > size2)
>> > (format cmdstorage "set origin ~a, ~a~%" origin1
>> > origin2)
>> > (unless (or *multiplot-is-active*
>> > - (member (get-option '$terminal)
>> > '($epslatex $epslatex_standalone)))
>> > + (member (get-option '$terminal)
>> > '($epslatex $epslatex_standalone $cairolatex_pdf)))
>> > (format cmdstorage "set obj 1 rectangle behind
>> > from screen ~a,~a to screen ~a,~a~%"
>> > origin1 origin2 (+ origin1
>> > size1 ) (+ origin2 size2))) ))
>> > (setf is1stobj t
>> > @@ -3681,6 +3686,11 @@
>> > (/ (first (get-option '$dimensions))
>> > 100.0)
>> > (/ (second (get-option '$dimensions))
>> > 100.0)
>> > (get-option '$file_name))))
>> > + ($cairolatex_pdf (format str "set terminal cairolatex pdf ~a
>> > color colortext size ~acm, ~acm~%set out '~a.tex'"
>> > + (write-font-type)
>> > + (/ (first (get-option '$dimensions))
>> > 100.0)
>> > + (/ (second (get-option '$dimensions))
>> > 100.0)
>> > + (get-option '$file_name)))
>> > ($pdf (setf str (format nil "set terminal pdf dashed
>> > enhanced ~a color size ~acm, ~acm~%set out '~a.pdf'"
>> > (write-font-type)
>> > (/ (first (get-option '$dimensions))
>> > 100.0)
>> > diff --git a/share/draw/grcommon.lisp b/share/draw/grcommon.lisp
>> > index 513a06074..85f6f7d43 100644
>> > --- a/share/draw/grcommon.lisp
>> > +++ b/share/draw/grcommon.lisp
>> > @@ -983,7 +983,8 @@
>> > $epslatex $epslatex_standalone $svg $tikz
>> > $tikz_standalone $x11 $qt
>> > $dumb $dumb_file $pdf $pdfcairo $wxt
>> > $animated_gif $windows
>> > $multipage_pdfcairo $multipage_pdf $multipage_eps
>> > - $multipage_eps_color $aquaterm $tiff $vrml $obj
>> > $stl $pnm $ply)))
>> > + $multipage_eps_color $aquaterm $tiff $vrml $obj
>> > $stl $pnm $ply
>> > + $cairolatex_pdf)))
>> > (cond
>> > ((member val terms)
>> > (when (and (eq val '$png) $draw_use_pngcairo)
>> > --
>> > 2.52.0
>> >
>> >
>> > From 9f8f512bcdf6119a1af2a2edc03534d8cf438280 Mon Sep 17 00:00:00
>> > 2001
>> > From: Atri Bhattacharya <A.B...@ul...>
>> > Date: Thu, 27 Nov 2025 14:35:03 +0530
>> > Subject: [PATCH 2/3] feat: add cairolatex_pdf_standalone terminal
>> >
>> > ---
>> > share/draw/gnuplot.lisp | 16 +++++++++++++---
>> > share/draw/grcommon.lisp | 2 +-
>> > 2 files changed, 14 insertions(+), 4 deletions(-)
>> >
>> > diff --git a/share/draw/gnuplot.lisp b/share/draw/gnuplot.lisp
>> > index cbb172485..4866dadb8 100644
>> > --- a/share/draw/gnuplot.lisp
>> > +++ b/share/draw/gnuplot.lisp
>> > @@ -2857,7 +2857,7 @@
>> > (setf plotcmd
>> > (concatenate 'string
>> > (unless (or *multiplot-is-active*
>> > - (member (get-option '$terminal) '($eps
>> > $epslatex $epslatex_standalone $cairolatex_pdf)))
>> > + (member (get-option '$terminal) '($eps
>> > $epslatex $epslatex_standalone $cairolatex_pdf
>> > $cairolatex_pdf_standalone)))
>> > (format nil "set obj 1 fc rgb '~a' fs solid 1.0
>> > noborder ~%"
>> > (get-option '$background_color)) )
>> > (if (equal (get-option '$proportional_axes) '$none)
>> > @@ -3344,6 +3344,11 @@
>> > (/ (first (get-option '$dimensions))
>> > 100.0)
>> > (/ (second (get-option '$dimensions))
>> > 100.0)
>> > (get-option '$file_name)))
>> > + ($cairolatex_pdf_standalone (format cmdstorage "set
>> > terminal cairolatex pdf standalone ~a color size ~acm, ~acm~%set
>> > out '~a.tex'"
>> > + (write-font-type)
>> > + (/ (first (get-option '$dimensions))
>> > 100.0)
>> > + (/ (second (get-option '$dimensions))
>> > 100.0)
>> > + (get-option '$file_name)))
>> > (($pdf $multipage_pdf) (format cmdstorage "set terminal
>> > pdf dashed enhanced ~a color size ~acm, ~acm~%set out '~a.pdf'"
>> > (write-font-type)
>> > (/ (first (get-option '$dimensions))
>> > 100.0)
>> > @@ -3488,7 +3493,7 @@
>> > (format cmdstorage "~%set size ~a, ~a~%" size1
>> > size2)
>> > (format cmdstorage "set origin ~a, ~a~%" origin1
>> > origin2)
>> > (unless (or *multiplot-is-active*
>> > - (member (get-option '$terminal)
>> > '($epslatex $epslatex_standalone $cairolatex_pdf)))
>> > + (member (get-option '$terminal)
>> > '($epslatex $epslatex_standalone $cairolatex_pdf
>> > $cairolatex_pdf_standalone)))
>> > (format cmdstorage "set obj 1 rectangle behind
>> > from screen ~a,~a to screen ~a,~a~%"
>> > origin1 origin2 (+ origin1
>> > size1 ) (+ origin2 size2))) ))
>> > (setf is1stobj t
>> > @@ -3686,7 +3691,12 @@
>> > (/ (first (get-option '$dimensions))
>> > 100.0)
>> > (/ (second (get-option '$dimensions))
>> > 100.0)
>> > (get-option '$file_name))))
>> > - ($cairolatex_pdf (format str "set terminal cairolatex pdf ~a
>> > color colortext size ~acm, ~acm~%set out '~a.tex'"
>> > + ($cairolatex_pdf (format str "set terminal cairolatex pdf ~a
>> > color size ~acm, ~acm~%set out '~a.tex'"
>> > + (write-font-type)
>> > + (/ (first (get-option '$dimensions))
>> > 100.0)
>> > + (/ (second (get-option '$dimensions))
>> > 100.0)
>> > + (get-option '$file_name)))
>> > + ($cairolatex_pdf_standalone (format str "set terminal
>> > cairolatex pdf standalone ~a color size ~acm, ~acm~%set out
>> > '~a.tex'"
>> > (write-font-type)
>> > (/ (first (get-option '$dimensions))
>> > 100.0)
>> > (/ (second (get-option '$dimensions))
>> > 100.0)
>> > diff --git a/share/draw/grcommon.lisp b/share/draw/grcommon.lisp
>> > index 85f6f7d43..934d4c6d6 100644
>> > --- a/share/draw/grcommon.lisp
>> > +++ b/share/draw/grcommon.lisp
>> > @@ -984,7 +984,7 @@
>> > $dumb $dumb_file $pdf $pdfcairo $wxt
>> > $animated_gif $windows
>> > $multipage_pdfcairo $multipage_pdf $multipage_eps
>> > $multipage_eps_color $aquaterm $tiff $vrml $obj
>> > $stl $pnm $ply
>> > - $cairolatex_pdf)))
>> > + $cairolatex_pdf $cairolatex_pdf_standalone)))
>> > (cond
>> > ((member val terms)
>> > (when (and (eq val '$png) $draw_use_pngcairo)
>> > --
>> > 2.52.0
>> >
>> >
>> > From 06f62b9c3efa186e7ebe27fea4a5b8b4f482261d Mon Sep 17 00:00:00
>> > 2001
>> > From: Atri Bhattacharya <A.B...@ul...>
>> > Date: Thu, 27 Nov 2025 15:36:57 +0530
>> > Subject: [PATCH 3/3] docs: add info for cairolatex_pdf* terminals
>> >
>> > ---
>> > doc/info/draw.texi | 2 ++
>> > 1 file changed, 2 insertions(+)
>> >
>> > diff --git a/doc/info/draw.texi b/doc/info/draw.texi
>> > index bdd888d17..0929c79dd 100644
>> > --- a/doc/info/draw.texi
>> > +++ b/doc/info/draw.texi
>> > @@ -1129,6 +1129,7 @@ points in each direction. If they are not
>> > integers, they are rounded.
>> >
>> > With terminals @code{eps}, @code{epslatex},
>> > @code{epslatex_standalone},
>> > @code{eps_color}, @code{multipage_eps},
>> > @code{multipage_eps_color},
>> > +@code{cairolatex_pdf}, @code{cairolatex_pdf_standalone},
>> > @code{pdf}, @code{multipage_pdf}, @code{pdfcairo},
>> > @code{multipage_pdfcairo}, @code{tikz}, and
>> > @code{tikz_standalone}, both
>> > numbers represent hundredths of cm, which means that, by default,
>> > @@ -2726,6 +2727,7 @@ Default value: @code{screen}
>> >
>> > Selects the terminal to be used by Gnuplot; possible values are:
>> > @code{screen} (default), @code{png}, @code{pngcairo}, @code{jpg},
>> > @code{gif},
>> > +@code{cairolatex_pdf}, @code{cairolatex_pdf_standalone},
>> > @code{eps}, @code{eps_color}, @code{epslatex},
>> > @code{epslatex_standalone},
>> > @code{svg}, @code{canvas}, @code{dumb}, @code{dumb_file},
>> > @code{pdf}, @code{pdfcairo},
>> > @code{wxt}, @code{animated_gif}, @code{multipage_pdfcairo},
>> > @code{multipage_pdf},
>> > --
>> > 2.52.0
>> >
>> >
>> > Hi,
>> > I have written a (pretty straightforward) patch to support the
>> > `cairolatex_pdf` and `cairolatex_pdf_standalone` gnuplot terminals
>> > for
>> > the draw package and attach it here. The patch has undergone
>> > limited
>> > testing on my own Linux system and it works; but I am not much of a
>> > lisp programmer, so, more testing and any suggestions/corrections
>> > would
>> > be most welcome. Gnuplot has had the `cairolatex` terminal with
>> > outputs
>> > to pdf, png, and eps supported since version 4.6 (circa 2012), so
>> > this
>> > should work with any 'modern' gnuplot installations.
>> >
>> > However, going through archives of this mailing list — arguably, I
>> > should have done that before modifying code myself — I saw there
>> > were
>> > already plans to include something similar here:
>> > https://sourceforge.net/p/maxima/mailman/message/37332366/
>> > and I wonder if I am duplicating any past effort.
>> >
>> > Been a long time user of (wx)maxima and want to thank all the
>> > developers for these amazing applications.
>> >
>> > Best wishes,
>>
>> --
>> ---
>> Best regards,
>> Dr Butler
>> _______________________________________________
>> Maxima-discuss mailing list
>> Max...@li...
>> https://lists.sourceforge.net/lists/listinfo/maxima-discuss
>
> _______________________________________________
> Maxima-discuss mailing list
> Max...@li...
> https://lists.sourceforge.net/lists/listinfo/maxima-discuss
--
---
Best regards,
Dr Butler |
|
From: Atri B. <bad...@op...> - 2025-11-27 19:45:58
|
On Thu, 2025-11-27 at 18:34 +0000, Leo Butler wrote:
> Thank you for the patch. I have applied it as is. We should add some
> tests to exercise the new options.
>
Many thanks, Leo, for pushing my patches through.
> As you found from the mailing list, I had stashed an identical patch
> in
> my git repo and then failed to push it. I started using the tikz
> terminal after many years of using cairlatex pdf and I just forgot
> about
> the stashed patch. Thanks for resurrecting it.
>
>
No problem; I am glad that this will be in maxima with a future
release.
Best wishes,
--
Atri
> On Thu, Nov 27 2025, Atri Bhattacharya <bad...@op...>
> wrote:
>
> > Only support cairolatex_pdf for now.
> > ---
> > share/draw/gnuplot.lisp | 14 ++++++++++++--
> > share/draw/grcommon.lisp | 3 ++-
> > 2 files changed, 14 insertions(+), 3 deletions(-)
> >
> > diff --git a/share/draw/gnuplot.lisp b/share/draw/gnuplot.lisp
> > index de004eb6e..cbb172485 100644
> > --- a/share/draw/gnuplot.lisp
> > +++ b/share/draw/gnuplot.lisp
> > @@ -2857,7 +2857,7 @@
> > (setf plotcmd
> > (concatenate 'string
> > (unless (or *multiplot-is-active*
> > - (member (get-option '$terminal) '($eps
> > $epslatex $epslatex_standalone)))
> > + (member (get-option '$terminal) '($eps
> > $epslatex $epslatex_standalone $cairolatex_pdf)))
> > (format nil "set obj 1 fc rgb '~a' fs solid 1.0
> > noborder ~%"
> > (get-option '$background_color)) )
> > (if (equal (get-option '$proportional_axes) '$none)
> > @@ -3339,6 +3339,11 @@
> > (/ (first (get-option '$dimensions))
> > 100.0)
> > (/ (second (get-option '$dimensions))
> > 100.0)
> > (get-option '$file_name)))
> > + ($cairolatex_pdf (format cmdstorage "set terminal
> > cairolatex pdf ~a color size ~acm, ~acm~%set out '~a.tex'"
> > + (write-font-type)
> > + (/ (first (get-option '$dimensions))
> > 100.0)
> > + (/ (second (get-option '$dimensions))
> > 100.0)
> > + (get-option '$file_name)))
> > (($pdf $multipage_pdf) (format cmdstorage "set terminal
> > pdf dashed enhanced ~a color size ~acm, ~acm~%set out '~a.pdf'"
> > (write-font-type)
> > (/ (first (get-option '$dimensions))
> > 100.0)
> > @@ -3483,7 +3488,7 @@
> > (format cmdstorage "~%set size ~a, ~a~%" size1
> > size2)
> > (format cmdstorage "set origin ~a, ~a~%" origin1
> > origin2)
> > (unless (or *multiplot-is-active*
> > - (member (get-option '$terminal)
> > '($epslatex $epslatex_standalone)))
> > + (member (get-option '$terminal)
> > '($epslatex $epslatex_standalone $cairolatex_pdf)))
> > (format cmdstorage "set obj 1 rectangle behind
> > from screen ~a,~a to screen ~a,~a~%"
> > origin1 origin2 (+ origin1
> > size1 ) (+ origin2 size2))) ))
> > (setf is1stobj t
> > @@ -3681,6 +3686,11 @@
> > (/ (first (get-option '$dimensions))
> > 100.0)
> > (/ (second (get-option '$dimensions))
> > 100.0)
> > (get-option '$file_name))))
> > + ($cairolatex_pdf (format str "set terminal cairolatex pdf ~a
> > color colortext size ~acm, ~acm~%set out '~a.tex'"
> > + (write-font-type)
> > + (/ (first (get-option '$dimensions))
> > 100.0)
> > + (/ (second (get-option '$dimensions))
> > 100.0)
> > + (get-option '$file_name)))
> > ($pdf (setf str (format nil "set terminal pdf dashed
> > enhanced ~a color size ~acm, ~acm~%set out '~a.pdf'"
> > (write-font-type)
> > (/ (first (get-option '$dimensions))
> > 100.0)
> > diff --git a/share/draw/grcommon.lisp b/share/draw/grcommon.lisp
> > index 513a06074..85f6f7d43 100644
> > --- a/share/draw/grcommon.lisp
> > +++ b/share/draw/grcommon.lisp
> > @@ -983,7 +983,8 @@
> > $epslatex $epslatex_standalone $svg $tikz
> > $tikz_standalone $x11 $qt
> > $dumb $dumb_file $pdf $pdfcairo $wxt
> > $animated_gif $windows
> > $multipage_pdfcairo $multipage_pdf $multipage_eps
> > - $multipage_eps_color $aquaterm $tiff $vrml $obj
> > $stl $pnm $ply)))
> > + $multipage_eps_color $aquaterm $tiff $vrml $obj
> > $stl $pnm $ply
> > + $cairolatex_pdf)))
> > (cond
> > ((member val terms)
> > (when (and (eq val '$png) $draw_use_pngcairo)
> > --
> > 2.52.0
> >
> >
> > From 9f8f512bcdf6119a1af2a2edc03534d8cf438280 Mon Sep 17 00:00:00
> > 2001
> > From: Atri Bhattacharya <A.B...@ul...>
> > Date: Thu, 27 Nov 2025 14:35:03 +0530
> > Subject: [PATCH 2/3] feat: add cairolatex_pdf_standalone terminal
> >
> > ---
> > share/draw/gnuplot.lisp | 16 +++++++++++++---
> > share/draw/grcommon.lisp | 2 +-
> > 2 files changed, 14 insertions(+), 4 deletions(-)
> >
> > diff --git a/share/draw/gnuplot.lisp b/share/draw/gnuplot.lisp
> > index cbb172485..4866dadb8 100644
> > --- a/share/draw/gnuplot.lisp
> > +++ b/share/draw/gnuplot.lisp
> > @@ -2857,7 +2857,7 @@
> > (setf plotcmd
> > (concatenate 'string
> > (unless (or *multiplot-is-active*
> > - (member (get-option '$terminal) '($eps
> > $epslatex $epslatex_standalone $cairolatex_pdf)))
> > + (member (get-option '$terminal) '($eps
> > $epslatex $epslatex_standalone $cairolatex_pdf
> > $cairolatex_pdf_standalone)))
> > (format nil "set obj 1 fc rgb '~a' fs solid 1.0
> > noborder ~%"
> > (get-option '$background_color)) )
> > (if (equal (get-option '$proportional_axes) '$none)
> > @@ -3344,6 +3344,11 @@
> > (/ (first (get-option '$dimensions))
> > 100.0)
> > (/ (second (get-option '$dimensions))
> > 100.0)
> > (get-option '$file_name)))
> > + ($cairolatex_pdf_standalone (format cmdstorage "set
> > terminal cairolatex pdf standalone ~a color size ~acm, ~acm~%set
> > out '~a.tex'"
> > + (write-font-type)
> > + (/ (first (get-option '$dimensions))
> > 100.0)
> > + (/ (second (get-option '$dimensions))
> > 100.0)
> > + (get-option '$file_name)))
> > (($pdf $multipage_pdf) (format cmdstorage "set terminal
> > pdf dashed enhanced ~a color size ~acm, ~acm~%set out '~a.pdf'"
> > (write-font-type)
> > (/ (first (get-option '$dimensions))
> > 100.0)
> > @@ -3488,7 +3493,7 @@
> > (format cmdstorage "~%set size ~a, ~a~%" size1
> > size2)
> > (format cmdstorage "set origin ~a, ~a~%" origin1
> > origin2)
> > (unless (or *multiplot-is-active*
> > - (member (get-option '$terminal)
> > '($epslatex $epslatex_standalone $cairolatex_pdf)))
> > + (member (get-option '$terminal)
> > '($epslatex $epslatex_standalone $cairolatex_pdf
> > $cairolatex_pdf_standalone)))
> > (format cmdstorage "set obj 1 rectangle behind
> > from screen ~a,~a to screen ~a,~a~%"
> > origin1 origin2 (+ origin1
> > size1 ) (+ origin2 size2))) ))
> > (setf is1stobj t
> > @@ -3686,7 +3691,12 @@
> > (/ (first (get-option '$dimensions))
> > 100.0)
> > (/ (second (get-option '$dimensions))
> > 100.0)
> > (get-option '$file_name))))
> > - ($cairolatex_pdf (format str "set terminal cairolatex pdf ~a
> > color colortext size ~acm, ~acm~%set out '~a.tex'"
> > + ($cairolatex_pdf (format str "set terminal cairolatex pdf ~a
> > color size ~acm, ~acm~%set out '~a.tex'"
> > + (write-font-type)
> > + (/ (first (get-option '$dimensions))
> > 100.0)
> > + (/ (second (get-option '$dimensions))
> > 100.0)
> > + (get-option '$file_name)))
> > + ($cairolatex_pdf_standalone (format str "set terminal
> > cairolatex pdf standalone ~a color size ~acm, ~acm~%set out
> > '~a.tex'"
> > (write-font-type)
> > (/ (first (get-option '$dimensions))
> > 100.0)
> > (/ (second (get-option '$dimensions))
> > 100.0)
> > diff --git a/share/draw/grcommon.lisp b/share/draw/grcommon.lisp
> > index 85f6f7d43..934d4c6d6 100644
> > --- a/share/draw/grcommon.lisp
> > +++ b/share/draw/grcommon.lisp
> > @@ -984,7 +984,7 @@
> > $dumb $dumb_file $pdf $pdfcairo $wxt
> > $animated_gif $windows
> > $multipage_pdfcairo $multipage_pdf $multipage_eps
> > $multipage_eps_color $aquaterm $tiff $vrml $obj
> > $stl $pnm $ply
> > - $cairolatex_pdf)))
> > + $cairolatex_pdf $cairolatex_pdf_standalone)))
> > (cond
> > ((member val terms)
> > (when (and (eq val '$png) $draw_use_pngcairo)
> > --
> > 2.52.0
> >
> >
> > From 06f62b9c3efa186e7ebe27fea4a5b8b4f482261d Mon Sep 17 00:00:00
> > 2001
> > From: Atri Bhattacharya <A.B...@ul...>
> > Date: Thu, 27 Nov 2025 15:36:57 +0530
> > Subject: [PATCH 3/3] docs: add info for cairolatex_pdf* terminals
> >
> > ---
> > doc/info/draw.texi | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/doc/info/draw.texi b/doc/info/draw.texi
> > index bdd888d17..0929c79dd 100644
> > --- a/doc/info/draw.texi
> > +++ b/doc/info/draw.texi
> > @@ -1129,6 +1129,7 @@ points in each direction. If they are not
> > integers, they are rounded.
> >
> > With terminals @code{eps}, @code{epslatex},
> > @code{epslatex_standalone},
> > @code{eps_color}, @code{multipage_eps},
> > @code{multipage_eps_color},
> > +@code{cairolatex_pdf}, @code{cairolatex_pdf_standalone},
> > @code{pdf}, @code{multipage_pdf}, @code{pdfcairo},
> > @code{multipage_pdfcairo}, @code{tikz}, and
> > @code{tikz_standalone}, both
> > numbers represent hundredths of cm, which means that, by default,
> > @@ -2726,6 +2727,7 @@ Default value: @code{screen}
> >
> > Selects the terminal to be used by Gnuplot; possible values are:
> > @code{screen} (default), @code{png}, @code{pngcairo}, @code{jpg},
> > @code{gif},
> > +@code{cairolatex_pdf}, @code{cairolatex_pdf_standalone},
> > @code{eps}, @code{eps_color}, @code{epslatex},
> > @code{epslatex_standalone},
> > @code{svg}, @code{canvas}, @code{dumb}, @code{dumb_file},
> > @code{pdf}, @code{pdfcairo},
> > @code{wxt}, @code{animated_gif}, @code{multipage_pdfcairo},
> > @code{multipage_pdf},
> > --
> > 2.52.0
> >
> >
> > Hi,
> > I have written a (pretty straightforward) patch to support the
> > `cairolatex_pdf` and `cairolatex_pdf_standalone` gnuplot terminals
> > for
> > the draw package and attach it here. The patch has undergone
> > limited
> > testing on my own Linux system and it works; but I am not much of a
> > lisp programmer, so, more testing and any suggestions/corrections
> > would
> > be most welcome. Gnuplot has had the `cairolatex` terminal with
> > outputs
> > to pdf, png, and eps supported since version 4.6 (circa 2012), so
> > this
> > should work with any 'modern' gnuplot installations.
> >
> > However, going through archives of this mailing list — arguably, I
> > should have done that before modifying code myself — I saw there
> > were
> > already plans to include something similar here:
> > https://sourceforge.net/p/maxima/mailman/message/37332366/
> > and I wonder if I am duplicating any past effort.
> >
> > Been a long time user of (wx)maxima and want to thank all the
> > developers for these amazing applications.
> >
> > Best wishes,
>
> --
> ---
> Best regards,
> Dr Butler
> _______________________________________________
> Maxima-discuss mailing list
> Max...@li...
> https://lists.sourceforge.net/lists/listinfo/maxima-discuss
|
|
From: Leo B. <Leo...@um...> - 2025-11-27 18:34:49
|
Thank you for the patch. I have applied it as is. We should add some
tests to exercise the new options.
As you found from the mailing list, I had stashed an identical patch in
my git repo and then failed to push it. I started using the tikz
terminal after many years of using cairlatex pdf and I just forgot about
the stashed patch. Thanks for resurrecting it.
Best regards,
Leo
On Thu, Nov 27 2025, Atri Bhattacharya <bad...@op...> wrote:
> Only support cairolatex_pdf for now.
> ---
> share/draw/gnuplot.lisp | 14 ++++++++++++--
> share/draw/grcommon.lisp | 3 ++-
> 2 files changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/share/draw/gnuplot.lisp b/share/draw/gnuplot.lisp
> index de004eb6e..cbb172485 100644
> --- a/share/draw/gnuplot.lisp
> +++ b/share/draw/gnuplot.lisp
> @@ -2857,7 +2857,7 @@
> (setf plotcmd
> (concatenate 'string
> (unless (or *multiplot-is-active*
> - (member (get-option '$terminal) '($eps $epslatex $epslatex_standalone)))
> + (member (get-option '$terminal) '($eps $epslatex $epslatex_standalone $cairolatex_pdf)))
> (format nil "set obj 1 fc rgb '~a' fs solid 1.0 noborder ~%"
> (get-option '$background_color)) )
> (if (equal (get-option '$proportional_axes) '$none)
> @@ -3339,6 +3339,11 @@
> (/ (first (get-option '$dimensions)) 100.0)
> (/ (second (get-option '$dimensions)) 100.0)
> (get-option '$file_name)))
> + ($cairolatex_pdf (format cmdstorage "set terminal cairolatex pdf ~a color size ~acm, ~acm~%set out '~a.tex'"
> + (write-font-type)
> + (/ (first (get-option '$dimensions)) 100.0)
> + (/ (second (get-option '$dimensions)) 100.0)
> + (get-option '$file_name)))
> (($pdf $multipage_pdf) (format cmdstorage "set terminal pdf dashed enhanced ~a color size ~acm, ~acm~%set out '~a.pdf'"
> (write-font-type)
> (/ (first (get-option '$dimensions)) 100.0)
> @@ -3483,7 +3488,7 @@
> (format cmdstorage "~%set size ~a, ~a~%" size1 size2)
> (format cmdstorage "set origin ~a, ~a~%" origin1 origin2)
> (unless (or *multiplot-is-active*
> - (member (get-option '$terminal) '($epslatex $epslatex_standalone)))
> + (member (get-option '$terminal) '($epslatex $epslatex_standalone $cairolatex_pdf)))
> (format cmdstorage "set obj 1 rectangle behind from screen ~a,~a to screen ~a,~a~%"
> origin1 origin2 (+ origin1 size1 ) (+ origin2 size2))) ))
> (setf is1stobj t
> @@ -3681,6 +3686,11 @@
> (/ (first (get-option '$dimensions)) 100.0)
> (/ (second (get-option '$dimensions)) 100.0)
> (get-option '$file_name))))
> + ($cairolatex_pdf (format str "set terminal cairolatex pdf ~a color colortext size ~acm, ~acm~%set out '~a.tex'"
> + (write-font-type)
> + (/ (first (get-option '$dimensions)) 100.0)
> + (/ (second (get-option '$dimensions)) 100.0)
> + (get-option '$file_name)))
> ($pdf (setf str (format nil "set terminal pdf dashed enhanced ~a color size ~acm, ~acm~%set out '~a.pdf'"
> (write-font-type)
> (/ (first (get-option '$dimensions)) 100.0)
> diff --git a/share/draw/grcommon.lisp b/share/draw/grcommon.lisp
> index 513a06074..85f6f7d43 100644
> --- a/share/draw/grcommon.lisp
> +++ b/share/draw/grcommon.lisp
> @@ -983,7 +983,8 @@
> $epslatex $epslatex_standalone $svg $tikz $tikz_standalone $x11 $qt
> $dumb $dumb_file $pdf $pdfcairo $wxt $animated_gif $windows
> $multipage_pdfcairo $multipage_pdf $multipage_eps
> - $multipage_eps_color $aquaterm $tiff $vrml $obj $stl $pnm $ply)))
> + $multipage_eps_color $aquaterm $tiff $vrml $obj $stl $pnm $ply
> + $cairolatex_pdf)))
> (cond
> ((member val terms)
> (when (and (eq val '$png) $draw_use_pngcairo)
> --
> 2.52.0
>
>
> From 9f8f512bcdf6119a1af2a2edc03534d8cf438280 Mon Sep 17 00:00:00 2001
> From: Atri Bhattacharya <A.B...@ul...>
> Date: Thu, 27 Nov 2025 14:35:03 +0530
> Subject: [PATCH 2/3] feat: add cairolatex_pdf_standalone terminal
>
> ---
> share/draw/gnuplot.lisp | 16 +++++++++++++---
> share/draw/grcommon.lisp | 2 +-
> 2 files changed, 14 insertions(+), 4 deletions(-)
>
> diff --git a/share/draw/gnuplot.lisp b/share/draw/gnuplot.lisp
> index cbb172485..4866dadb8 100644
> --- a/share/draw/gnuplot.lisp
> +++ b/share/draw/gnuplot.lisp
> @@ -2857,7 +2857,7 @@
> (setf plotcmd
> (concatenate 'string
> (unless (or *multiplot-is-active*
> - (member (get-option '$terminal) '($eps $epslatex $epslatex_standalone $cairolatex_pdf)))
> + (member (get-option '$terminal) '($eps $epslatex $epslatex_standalone $cairolatex_pdf $cairolatex_pdf_standalone)))
> (format nil "set obj 1 fc rgb '~a' fs solid 1.0 noborder ~%"
> (get-option '$background_color)) )
> (if (equal (get-option '$proportional_axes) '$none)
> @@ -3344,6 +3344,11 @@
> (/ (first (get-option '$dimensions)) 100.0)
> (/ (second (get-option '$dimensions)) 100.0)
> (get-option '$file_name)))
> + ($cairolatex_pdf_standalone (format cmdstorage "set terminal cairolatex pdf standalone ~a color size ~acm, ~acm~%set out '~a.tex'"
> + (write-font-type)
> + (/ (first (get-option '$dimensions)) 100.0)
> + (/ (second (get-option '$dimensions)) 100.0)
> + (get-option '$file_name)))
> (($pdf $multipage_pdf) (format cmdstorage "set terminal pdf dashed enhanced ~a color size ~acm, ~acm~%set out '~a.pdf'"
> (write-font-type)
> (/ (first (get-option '$dimensions)) 100.0)
> @@ -3488,7 +3493,7 @@
> (format cmdstorage "~%set size ~a, ~a~%" size1 size2)
> (format cmdstorage "set origin ~a, ~a~%" origin1 origin2)
> (unless (or *multiplot-is-active*
> - (member (get-option '$terminal) '($epslatex $epslatex_standalone $cairolatex_pdf)))
> + (member (get-option '$terminal) '($epslatex $epslatex_standalone $cairolatex_pdf $cairolatex_pdf_standalone)))
> (format cmdstorage "set obj 1 rectangle behind from screen ~a,~a to screen ~a,~a~%"
> origin1 origin2 (+ origin1 size1 ) (+ origin2 size2))) ))
> (setf is1stobj t
> @@ -3686,7 +3691,12 @@
> (/ (first (get-option '$dimensions)) 100.0)
> (/ (second (get-option '$dimensions)) 100.0)
> (get-option '$file_name))))
> - ($cairolatex_pdf (format str "set terminal cairolatex pdf ~a color colortext size ~acm, ~acm~%set out '~a.tex'"
> + ($cairolatex_pdf (format str "set terminal cairolatex pdf ~a color size ~acm, ~acm~%set out '~a.tex'"
> + (write-font-type)
> + (/ (first (get-option '$dimensions)) 100.0)
> + (/ (second (get-option '$dimensions)) 100.0)
> + (get-option '$file_name)))
> + ($cairolatex_pdf_standalone (format str "set terminal cairolatex pdf standalone ~a color size ~acm, ~acm~%set out '~a.tex'"
> (write-font-type)
> (/ (first (get-option '$dimensions)) 100.0)
> (/ (second (get-option '$dimensions)) 100.0)
> diff --git a/share/draw/grcommon.lisp b/share/draw/grcommon.lisp
> index 85f6f7d43..934d4c6d6 100644
> --- a/share/draw/grcommon.lisp
> +++ b/share/draw/grcommon.lisp
> @@ -984,7 +984,7 @@
> $dumb $dumb_file $pdf $pdfcairo $wxt $animated_gif $windows
> $multipage_pdfcairo $multipage_pdf $multipage_eps
> $multipage_eps_color $aquaterm $tiff $vrml $obj $stl $pnm $ply
> - $cairolatex_pdf)))
> + $cairolatex_pdf $cairolatex_pdf_standalone)))
> (cond
> ((member val terms)
> (when (and (eq val '$png) $draw_use_pngcairo)
> --
> 2.52.0
>
>
> From 06f62b9c3efa186e7ebe27fea4a5b8b4f482261d Mon Sep 17 00:00:00 2001
> From: Atri Bhattacharya <A.B...@ul...>
> Date: Thu, 27 Nov 2025 15:36:57 +0530
> Subject: [PATCH 3/3] docs: add info for cairolatex_pdf* terminals
>
> ---
> doc/info/draw.texi | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/doc/info/draw.texi b/doc/info/draw.texi
> index bdd888d17..0929c79dd 100644
> --- a/doc/info/draw.texi
> +++ b/doc/info/draw.texi
> @@ -1129,6 +1129,7 @@ points in each direction. If they are not integers, they are rounded.
>
> With terminals @code{eps}, @code{epslatex}, @code{epslatex_standalone},
> @code{eps_color}, @code{multipage_eps}, @code{multipage_eps_color},
> +@code{cairolatex_pdf}, @code{cairolatex_pdf_standalone},
> @code{pdf}, @code{multipage_pdf}, @code{pdfcairo},
> @code{multipage_pdfcairo}, @code{tikz}, and @code{tikz_standalone}, both
> numbers represent hundredths of cm, which means that, by default,
> @@ -2726,6 +2727,7 @@ Default value: @code{screen}
>
> Selects the terminal to be used by Gnuplot; possible values are:
> @code{screen} (default), @code{png}, @code{pngcairo}, @code{jpg}, @code{gif},
> +@code{cairolatex_pdf}, @code{cairolatex_pdf_standalone},
> @code{eps}, @code{eps_color}, @code{epslatex}, @code{epslatex_standalone},
> @code{svg}, @code{canvas}, @code{dumb}, @code{dumb_file}, @code{pdf}, @code{pdfcairo},
> @code{wxt}, @code{animated_gif}, @code{multipage_pdfcairo}, @code{multipage_pdf},
> --
> 2.52.0
>
>
> Hi,
> I have written a (pretty straightforward) patch to support the
> `cairolatex_pdf` and `cairolatex_pdf_standalone` gnuplot terminals for
> the draw package and attach it here. The patch has undergone limited
> testing on my own Linux system and it works; but I am not much of a
> lisp programmer, so, more testing and any suggestions/corrections would
> be most welcome. Gnuplot has had the `cairolatex` terminal with outputs
> to pdf, png, and eps supported since version 4.6 (circa 2012), so this
> should work with any 'modern' gnuplot installations.
>
> However, going through archives of this mailing list — arguably, I
> should have done that before modifying code myself — I saw there were
> already plans to include something similar here:
> https://sourceforge.net/p/maxima/mailman/message/37332366/
> and I wonder if I am duplicating any past effort.
>
> Been a long time user of (wx)maxima and want to thank all the
> developers for these amazing applications.
>
> Best wishes,
--
---
Best regards,
Dr Butler |
|
From: Atri B. <bad...@op...> - 2025-11-27 10:39:59
|
Hi, I have written a (pretty straightforward) patch to support the `cairolatex_pdf` and `cairolatex_pdf_standalone` gnuplot terminals for the draw package and attach it here. The patch has undergone limited testing on my own Linux system and it works; but I am not much of a lisp programmer, so, more testing and any suggestions/corrections would be most welcome. Gnuplot has had the `cairolatex` terminal with outputs to pdf, png, and eps supported since version 4.6 (circa 2012), so this should work with any 'modern' gnuplot installations. However, going through archives of this mailing list — arguably, I should have done that before modifying code myself — I saw there were already plans to include something similar here: https://sourceforge.net/p/maxima/mailman/message/37332366/ and I wonder if I am duplicating any past effort. Been a long time user of (wx)maxima and want to thank all the developers for these amazing applications. Best wishes, -- Atri Bhattacharya Sent from openSUSE Tumbleweed 20251121 on my laptop. |
|
From: Raymond T. <toy...@gm...> - 2025-11-24 21:34:41
|
I'm in the process of trying to clean up the CSS for the manual by using variables to make it easier to set colors for light and dark mode. This is fairly straightforward, but I noticed that there is CSS for |div.textbox|, |div.titlebox|, and |div.synposisbox|. A quick grep of the HTML files shows that there is no occurrence of "textbox", "titlebox", or "synposisbox" anywhere. Does anyone know what these are for? Is it safe to delete these? ​ |
|
From: Michel T. <ta...@lp...> - 2025-11-24 20:12:32
|
As a matter of fact the program bugs because at line 342 one has a
division by zero due to the fact that product(%a, %l, lo, %n-1) vanishes
since it is
the product of %l^2/(%l^2+2*l) starting from l=0. The way to get out of
this problem is to impose a condition such as f(1)=1, then the product
starts at
%l=1. This can be checked by inserting some prints.
solve_rec((n+1)*f[n]-(n-1)*f[n-1]=(n+1)/(n-1),f[n],f(1)=1);
yields after applying factor to the result:
f[n] = ('sum(((%j+1)*(%j+2))/%j,%j,1,n-1)+2)/(n*(n+1))$
Package Zeilberger doesn't seem to allow to compute the sum.
(%i16) GosperSum((%j+1)*(%j+2)/%j,%j,1,n-1);
(%o16) NON_GOSPER_SUMMABLE
Le 24/11/2025 à 17:06, Barton Willis via Maxima-discuss a
écrit :product(%a, %l, lo, %n-1)
> The share package solve_rec is also unable to handle your recursion:
--
Michel Talon
|
|
From: Barton W. <wi...@un...> - 2025-11-24 16:23:21
|
The share package solve_rec is also unable to handle your recursion: (%i1) load(solve_rec)$ (%i2) display2d : false$ (%i3) solve_rec(a[n]=n/(n+1)*a[n-1], a[n]); (%o3) a[n] = %k[1]/(n+1) (%i4) solve_rec((n+1)*f[n]-(n-1)*f[n-1]=(n+1)/(n-1),f[n]); expt: undefined: 0 to a negative exponent. #0: solve_rec_lin_1(%a=n^2/(n^2+2*n),%b=n/(n^2+2*n)+2/(n^2+2*n),%f=f,%n=n,cond=[]) (solve_rec.mac line 341) #1: solve_rec_order_1(std_form=shift_op(f,n,1)*n^2-shift_op(f,n,0)*n^2+2*shift_op(f,n,1)*n-n-2,%f=f,%n=n,cond=[]) (solve_rec.mac line 199) #2: solve_rec(eq=(n+1)*f[n]-f[n-1]*(n-1) = (n+1)/(n-1),fn=f[n],cond=[]) (solve_rec.mac line 180) -- an error. To debug this try: debugmode(true) ________________________________ From: Barton Willis via Maxima-discuss <max...@li...> Sent: Sunday, November 23, 2025 12:31 PM To: max...@li... <max...@li...>; Daniel Volinski <dan...@ya...> Subject: Re: [Maxima-discuss] Fail to understand result of funcsolve Caution: Non-NU Email Guess: funcsolve doesn't properly check that solve returned an empty solution, making all the unknowns, including %0 undetermined. My evidence: (%i2) trace(solve); (%o2) [solve] Here solve returns the empty list, but it goes ahead and returns a bogus solution: %i3) funcsolve((n+1)*f(n)-(n-1)*f(n-1)=(n+1)/(n-1),f(n)); 1" Enter "solve" "[[%1-%0-1,2*%2-2*%1+4*%0-1,-%2+3*%1-5*%0,4*%0-%1,-%0],[%2,%1,%0]] 1" Exit "solve" "[] (%o3) f(n)=(%0*n^2+%1*n+%2)/((n-1)*(n+1)) Here solve finds a solution and returns a correct solution: (%i4) funcsolve(f(n+1) - f(n) = (n^2+5*n+1)/((n+2)*(n+3)),f(n)); 1" Enter "solve" "[%+1,%] 1" Exit "solve" "[%=-1] 1" Enter "solve" "[%-1,%] 1" Exit "solve" "[%=1] 1" Enter "solve" "[[-%2+2*%1+2*%0-1,5*%0-5,%0-1],[%2,%1,%0]] solve: dependent equations eliminated: (3) 1" Exit "solve" "[[%2=%r1,%1=(%r1-1)/2,%0=1]] (%o4) f(n)=(2*n^2+%r1*n-n+2*%r1)/(2*(n+2)) Maybe you could file a bug report—even better, maybe you could fix the bug too. ________________________________ From: Daniel Volinski via Maxima-discuss <max...@li...> Sent: Sunday, November 23, 2025 10:02 AM To: max...@li... <max...@li...> Subject: [Maxima-discuss] Fail to understand result of funcsolve Caution: Non-NU Email Hi All, I have the following lines: eq:(n+1)*f(n)-(n-1)*f(n-1)=(n+1)/(n-1); funcsolve(eq,f(n)); I get the following result: (n+1)*f(n)-f(n-1)*(n-1) = (n+1)/(n-1) f(n) = (%0*n^2+%1*n+%2)/((n-1)*(n+1)) What is the meaning of %0, %1, %2 in this result? Thanks, Daniel Volinski |
|
From: Barton W. <wi...@un...> - 2025-11-23 18:32:19
|
Guess: funcsolve doesn't properly check that solve returned an empty solution, making all the unknowns, including %0 undetermined. My evidence: (%i2) trace(solve); (%o2) [solve] Here solve returns the empty list, but it goes ahead and returns a bogus solution: %i3) funcsolve((n+1)*f(n)-(n-1)*f(n-1)=(n+1)/(n-1),f(n)); 1" Enter "solve" "[[%1-%0-1,2*%2-2*%1+4*%0-1,-%2+3*%1-5*%0,4*%0-%1,-%0],[%2,%1,%0]] 1" Exit "solve" "[] (%o3) f(n)=(%0*n^2+%1*n+%2)/((n-1)*(n+1)) Here solve finds a solution and returns a correct solution: (%i4) funcsolve(f(n+1) - f(n) = (n^2+5*n+1)/((n+2)*(n+3)),f(n)); 1" Enter "solve" "[%+1,%] 1" Exit "solve" "[%=-1] 1" Enter "solve" "[%-1,%] 1" Exit "solve" "[%=1] 1" Enter "solve" "[[-%2+2*%1+2*%0-1,5*%0-5,%0-1],[%2,%1,%0]] solve: dependent equations eliminated: (3) 1" Exit "solve" "[[%2=%r1,%1=(%r1-1)/2,%0=1]] (%o4) f(n)=(2*n^2+%r1*n-n+2*%r1)/(2*(n+2)) Maybe you could file a bug report—even better, maybe you could fix the bug too. ________________________________ From: Daniel Volinski via Maxima-discuss <max...@li...> Sent: Sunday, November 23, 2025 10:02 AM To: max...@li... <max...@li...> Subject: [Maxima-discuss] Fail to understand result of funcsolve Caution: Non-NU Email Hi All, I have the following lines: eq:(n+1)*f(n)-(n-1)*f(n-1)=(n+1)/(n-1); funcsolve(eq,f(n)); I get the following result: (n+1)*f(n)-f(n-1)*(n-1) = (n+1)/(n-1) f(n) = (%0*n^2+%1*n+%2)/((n-1)*(n+1)) What is the meaning of %0, %1, %2 in this result? Thanks, Daniel Volinski |
|
From: Daniel V. <dan...@ya...> - 2025-11-23 16:33:52
|
Hi All, I have the following lines: eq:(n+1)*f(n)-(n-1)*f(n-1)=(n+1)/(n-1);funcsolve(eq,f(n)); I get the following result: (n+1)*f(n)-f(n-1)*(n-1) = (n+1)/(n-1) f(n) = (%0*n^2+%1*n+%2)/((n-1)*(n+1)) What is the meaning of %0, %1, %2 in this result? Thanks, Daniel Volinski |
|
From: Michel T. <ta...@lp...> - 2025-11-23 14:22:30
|
Le 23/11/2025 à 13:37, David Scherfgen via Maxima-discuss a écrit : > Rubey, Martin <mar...@tu...> schrieb am So., 23. Nov. > 2025, 03:03: > > is(equal(a, b)) returns true (or false) if and only if a and b are > equal (or not equal) for all possible values of their variables, > as determined by evaluating ratsimp(a - b); > > Does this mean that is(equal(a, b)) is false if and only if the > function (a, b) \mapsto a-b does not have any zeros? > > > Yes. > > As far as I know, this is how it works: > - If ratsimp(a-b) gives 0, then is(equal(a,b)) is true. > - If ratsimp(a-b) gives a non-zero constant (no variables), then > is(equal(a,b)) is false. > - Otherwise, is(equal(a,b)) is unknown. > > Of course, this is quite limited, because it only works reliably with > rational expressions due to relying on ratsimp. > > To get better results, first convert trigonometric/hyperbolic > functions to exponential form using "exponentialize" and inverse > trigonometric/hyperbolic functions to logarithmic form using "logarc". > You may also want to denest roots using "sqrtdenest". > If you are curious, these things are defined in compar.lisp, notably the function "is" is defmspec $is, which calls mevalp1 which calls alike1. Looking at alike1 one sees a lot of cases in which things are supposed equal or not. If you trace mevalp1 and alike1 you may be surprised by the number of calls generated by the command is(equal(x,y)) 0: (MAXIMA::MEVALP1 ((MAXIMA::$EQUAL) MAXIMA::$X MAXIMA::$Y)) 1: (MAXIMA::ALIKE1 MAXIMA::$X MAXIMA::$Y) 1: ALIKE1 returned NIL 1: (MAXIMA::ALIKE1 MAXIMA::$Y MAXIMA::$X) 1: ALIKE1 returned NIL .............. A lot of ratsimps in between. 1: (MAXIMA::ALIKE1 MAXIMA::$X MAXIMA::$MINF) 1: ALIKE1 returned NIL 0: MEVALP1 returned ((($EQUAL) $X $Y) (($EQUAL SIMP) $X $Y)) (%o5) unknown -- Michel Talon |
|
From: Stavros M. <mac...@gm...> - 2025-11-23 13:34:01
|
equal tries to do the "right thing" , but for "interesting" cases, you may need to think a bit about what you intend. For example, is(equal(float(%pi),%pi)) => true But is(equal(bfloat(%pi),%pi)) => false for all values of fpprec. And is(equal(bfloat(%pi),float(%pi)))) is true for fpprec = 3-7,11,12,14,15, and false otherwise. On Sun, Nov 23, 2025, 16:38 David Scherfgen via Maxima-discuss < max...@li...> wrote: > Rubey, Martin <mar...@tu...> schrieb am So., 23. Nov. 2025, > 03:03: > >> is(equal(a, b)) returns true (or false) if and only if a and b are equal >> (or not equal) for all possible values of their variables, as determined by >> evaluating ratsimp(a - b); >> >> Does this mean that is(equal(a, b)) is false if and only if the function >> (a, b) \mapsto a-b does not have any zeros? >> > > Yes. > > As far as I know, this is how it works: > - If ratsimp(a-b) gives 0, then is(equal(a,b)) is true. > - If ratsimp(a-b) gives a non-zero constant (no variables), then > is(equal(a,b)) is false. > - Otherwise, is(equal(a,b)) is unknown. > > Of course, this is quite limited, because it only works reliably with > rational expressions due to relying on ratsimp. > > To get better results, first convert trigonometric/hyperbolic functions to > exponential form using "exponentialize" and inverse > trigonometric/hyperbolic functions to logarithmic form using "logarc". You > may also want to denest roots using "sqrtdenest". > > Best regards > David > _______________________________________________ > Maxima-discuss mailing list > Max...@li... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > |
|
From: David S. <d.s...@go...> - 2025-11-23 12:38:02
|
Rubey, Martin <mar...@tu...> schrieb am So., 23. Nov. 2025, 03:03: > is(equal(a, b)) returns true (or false) if and only if a and b are equal > (or not equal) for all possible values of their variables, as determined by > evaluating ratsimp(a - b); > > Does this mean that is(equal(a, b)) is false if and only if the function > (a, b) \mapsto a-b does not have any zeros? > Yes. As far as I know, this is how it works: - If ratsimp(a-b) gives 0, then is(equal(a,b)) is true. - If ratsimp(a-b) gives a non-zero constant (no variables), then is(equal(a,b)) is false. - Otherwise, is(equal(a,b)) is unknown. Of course, this is quite limited, because it only works reliably with rational expressions due to relying on ratsimp. To get better results, first convert trigonometric/hyperbolic functions to exponential form using "exponentialize" and inverse trigonometric/hyperbolic functions to logarithmic form using "logarc". You may also want to denest roots using "sqrtdenest". Best regards David |