float(%e^%e)



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