>>>>> "willisb" == willisb <willisb@unk.edu> writes:
willisb> fixes the float(%e^%e) problem. Have I overlooked something?
willisb> (I suppose one might try doing something more intelligent when the
willisb> exponent is a an integer.)
willisb> Fixing $FLOAT doesn't fix the %e ^ %e, numer bug.
I think I've found a solution. In simpexpt in simp.lisp, the
following form fixes the issue:
((EQ GR '$%E)
(COND (($BFLOATP POT) (RETURN ($BFLOAT (LIST '(MEXPT) '$%E POT))))
((OR (FLOATP POT) (AND $NUMER (INTEGERP POT)))
(RETURN (EXP (float POT))))
((AND $LOGSIMP (AMONG '%LOG POT)) (RETURN (%ETOLOG POT)))
((AND $DEMOIVRE (SETQ Z (DEMOIVRE POT))) (RETURN Z))
((AND $%EMODE (SETQ Z (%ESPECIAL POT))) (RETURN Z))
($numer
(return ($float (list '(mexpt) '$%e pot))))))
(Look for the lower-case stuff). At this point POT is the exponent.
For the case where POT is an integer, we weren't converting that to a
double-float so exp was returning a single-float answer instead of
double.
The added cond case just says to numerically evaluate the expression.
Of course, we need your $float fix for this to work. Alternatively,
without your $float fix, we can do something like
($numer
(return ($float (list '(mexpt) '$%e ($float pot)))))
instead. Perhaps this was the intent of the original $float that
simpexpt handle the given case?
Does this make sense? I think this change is relatively safe for
inclusion for this release.
Ray