|
From: Gunter K. <gu...@pe...> - 2021-02-28 14:49:46
|
If it is different constants I would prefer it to have a different name. %k67 is therefore fine to me even though I know that this means my code has to be prepared that a change at the beginning of the file might make it a %k68. Am 27. Februar 2021 17:41:32 MEZ schrieb Robert Dodier <rob...@gm...>: >On Sun, Feb 21, 2021 at 11:34 AM Dimiter Prodanov <dim...@gm...> wrote: > >> ic1(z(x)=%c1-'integrate((z(u607)^2*(x-u607))/u607,u607,x,M),x=M,z(x)=0); >> crashes > >> however >> ic1(z(x)=%c-'integrate((z(u607)^2*(x-u607))/u607,u607,x,M),x=M,z(x)=0); >> >> returns >> z(x)=z(M)-integrate((z(u607)^2*x-u607*z(u607)^2)/u607,u607,x,M) >> >> So in my view, the symbol %c should not be hardcoded in ic1. > >Hi Dimiter, by the way, from where did %c1 appear? > >I've looked at this problem for a bit, and what I'm seeing is that the >ode2 code assumes throughout that constants are only named %c, %k1, or >%k2. It wouldn't be too hard to change that to numbered constants; >there is already a mechanism (integration_constant and >integration_constant_counter) to generate numbered constants in the >integration code. > >There are at least two problems introduced by that. The smaller one is >that the presence of numbered constants would probably make it harder >to check results automatically. OK, that can be fixed up without much >trouble. > >The larger one is that the results might seem messy to users. After a >while you'll get stuff like %k67*sin(x) + %k68*cos(x) and if you want >"nice" constants you'll have to reset integration_constant_counter. >That sounds painful. > >In some sense creating new constants is the right thing to do. Is it >sufficiently right to overcome the clumsiness of it? What does anyone >think about any of this stuff? > >best, > >Robert Dodier > > >_______________________________________________ >Maxima-discuss mailing list >Max...@li... >https://lists.sourceforge.net/lists/listinfo/maxima-discuss -- Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet. |