taylor series, bfloat, zerop enhancements, something to think about, vs. Macsyma
Subject: taylor series, bfloat, zerop enhancements, something to think about, vs. Macsyma
From: Stavros Macrakis
Date: Thu, 5 Jan 2012 10:46:48 -0500
On Thu, Jan 5, 2012 at 10:14, John Lapeyre <lapeyre.math122a at gmail.com>wrote:
>
> On 01/04/2012 05:57 PM, Richard Fateman wrote:
> > On 1/4/2012 8:42 AM, John Lapeyre wrote:
> >> btw. I don't know if maxima has something like Head() or lisp's
> >> type-of. It's useful to have a what_is_this() function.
> >
> > what_is_this(x):=if ?atom(x) then ?type\-of(x) else ?caar(x)
>
Not sure what exactly the goal is here.
This will return internal objects like RAT (prints as /) and BIGFLOAT
(prints as bfloat) which are confusing:
(%i16) what_is_this(1/2);
(%o16) /
(%i17) is(what_is_this(1/2)="/");
(%o17) false
(%i18) is(what_is_this(1/2)='rat);
(%o18) false
(%i19) is(what_is_this(1/2)='?rat);
(%o19) true
Also need to think about cases like:
what_is_this(f[3](x)) => mqapply (prints as subvar)
what_is_this('(lambda([x],x)(3))) => => mqapply (prints as subvar)
> (defmfun $complexp (x) ($numberp ($substitute 1 '$%i x)))
>
Poor definition:
complexp(log(-%i)) => false OK
complexp(log(%i)) => true ???
complexp(f(2)-f(1)) => false OK
complexp(f(%i)-f(1)) => true ???
complexp(%i/(%i+1)) => true well, it does simplify to a complex, but
is not in canonical form
-s