willisb@unk.edu wrote:
>
> Hi,
>
> I'm looking for a maxima (version 5.4) powers function and
> a working version of stopex. If anyone can point me to
> these files, I'd appreciate it.
the powers function is written in lisp in Macsyma (c), and
seems to be in share/ not share2/ directory. I don't
if it dates back to Maxima days. I don't
know why you would want to use it, because it seems to
have as a feature, the bug that it requires expressions
to be expanded out. You can do rat(expression,x)
and then pick off the leading degree and subtract that term
off, repeatedly, using ratcoeff, or bothcoeff instead.
something like the (untested) program below.
mypowers(r,x):=
block([ h:hipow(r,x)],
if h=0 then [] else cons (h, mypowers(second(bothcoeff(r,x^h)),x)
)))
>
> I'm working on porting three Macsyma 422 programs to maxima;
> a macsyma-to-mathml translator, a second order linear DE
> solver, and a clone of Macsyma's specfun library (about
> a dozen orthogonal polynomials). Once I get them working,
> I'll make them freely available.
>
> Porting "back in time" twenty years is interesting; mostly
> I've only had to add simple utility functions such as second,
> op, and floor. For string functions ($stringp, $getchar, etc), I've
> added a few one line lisp programs. Once I spent days porting
> a C++ program from gcc 2.7x to gcc 2.9x; compared to that
> experience, porting Macsyma 422 to maxima 5.4 has so far been
> a breeze.
>
> Specifically:
>
> 1) I'm looking for the maxima (version 5.4) powers function;
> my share2 directory has a usage file for powers, but no source file.
> I can't find the file on maxima's cvs at the University of Texas either.
> If anyone can point me to the source code for powers, I'd appreciate it.
>
> 2) Maxima's stopex code seems to be broken; stopex.mc
> won't even load. It halts when executing
>
> EVAL_WHEN([BATCH,LOADFILE],
> IF GET('GNAUTO,'DIAGEVAL_VERSION)=FALSE
> THEN LOAD('[GNAUTO,FASL,DSK,DGVAL]))$
>
> Commenting out this line, allows maxima to load stopex.mc.
> But then maxima complains that it can't find the freeofl function.
> Rolling my own as
>
> freeofl(x,e) := block([ ],
> not member(false, apply(append, [outermap(freeof, x, e)]))
> );
>
freeofl takes a list as first argument and ask if, for each element r
of the list L, is e free of r.
I would write it like this..
freeofl(L,e):= if L=[] then true else freeof(first(L),e) and
freeofl(rest(L),e)
I'm not sure what else is needed from the gnauto file though.
> allows expandwrt to run, but it generates rubbish:
>
> (c1) expandwrt(x*(x+1),x);
>
> (d1) [5x^2+4x(x+1)]
>
> Again, if anyone has a correctly working stopex.mc file, I'd
> appreciate it.
>
> Thanks,
>
> Barton Willis
> University of Nebraska at Kearney