taylor series, bfloat, zerop enhancements, something to think about, vs. Macsyma
Subject: taylor series, bfloat, zerop enhancements, something to think about, vs. Macsyma
From: John Lapeyre
Date: Thu, 05 Jan 2012 16:14:43 +0100
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)
Mathematica would use this as well.
(defmfun $complexp (x)
($numberp ($substitute 1 '$%i x)))
what_is_this(x):= if complexp(x)
then 'complex elseif ?atom(x)
then ?type\-of(x) else ?caar(x)$
But it's not clear that would be useful for maxima. Eg, if maxima used
native lisp complex numbers it would be natural.
> print_one_number_prec(x,p):=block([fpprintprec:p], print(x))$
mixima Np() does this.
But the return value, unless suppressed,
is also displayed normally.
-- John Lapeyre