I don't know if this explains the behavior,
but there is a question as to how
to numerically evaluate %e^x if you change
the %e to a number first.
If %e^(1/2) is created, there is only one
value, by convention for the exponential function,
associated with the taylor series 1+x+...
But if you have 2.71828^(1/2) then that
is sqrt(2.71828) which is TWO values.
Anyway, I have always found the behavior
of %,numer annoying when it leaves symbolic
constants around.
RJF
willisb@unk.edu wrote:
> Stavros Macrakis (bug 609464) reported that
>
> (C2) %e ^ %e, numer;
> (D2) %E^%E
>
> I think the source of this bug is in $ev or friends.
> [My version of commercial Macsyma also gives %e ^ %e as
> the value of (c2).]
>
> The float function also has a similar deficiency
>
> (C3) float(%e^%e);
> (D3) 2.718281828459045^%E
>
> I don't know why, but $float (defined in comm.lisp) applies
> $float only to the base of the exponenation and not to the exponent.
> Commenting out two lines of $FLOAT
>
> (DEFMFUN $FLOAT (E)
> (COND ((NUMBERP E) (FLOAT E))
> ((and (symbolp e) (mget e '$numer)))
> ((OR (ATOM E) (MEMQ 'array (CDAR E))) E)
> ((EQ (CAAR E) 'RAT) (FPCOFRAT E))
> ((EQ (CAAR E) 'BIGFLOAT) (FP2FLO E))
> ;; ((MEMQ (CAAR E) '(MEXPT MNCEXPT)) ;; huh? why?
> ;; (LIST (NCONS (CAAR E)) ($FLOAT (CADR E)) (CADDR E)))
> (T (RECUR-APPLY #'$FLOAT E))))
>
> fixes the float(%e^%e) problem. Have I overlooked something?
> (I suppose one might try doing something more intelligent when the
> exponent is a an integer.)
>
>
> Fixing $FLOAT doesn't fix the %e ^ %e, numer bug.
>
> Barton
>
>
>
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>