[ maxima-Bugs-609464 ] 1+%e,numer and %e^%e,numer



Am Mittwoch, den 13.05.2009, 23:12 -0400 schrieb Stavros Macrakis:

> If %e^x,numer became 2.718^x, then substituting x->log(y) would result
> in 2.718^log(y), which Maxima can't simplify in any useful way (though
> it arguably should simplify it to %e^(1.0*log(y)).
> 
> My original bug note did *not* question this behavior.  It only
> pointed out that in some cases where a non-trivial subexpression could
> be evaluated numerically, it was not.

Thank you for the comment. I had a further look at the problem.

When I am right, all of the following expressions should simplify to a
number with numer:TRUE (The second column shows the actual result.):

%e           2,17...
2*%e         5,43...
%e^2         7,38...
%e^%e        %e^%e              
%e^(2*%e)    229.65...
%e+1         %e+1        
%e*(%e+1)^2  2,17...*(%e+1)^2
             
sin(%e)      sin(%e)
sin(%e+1)    sin(%e+1)

But NOT %e^x.

1. My first attempt was to cut out %enumer. With this method expressions
   like sin(%e), sin(%e+1), ... will give a numerical result too,
   but %e^x would simplify to 2,17...^x.

2. In a second attempt I added code to the routine simpexpt, 
   plusin and simplifya to get the desired numerical results.
   With this method %e^x will not simplify. All other expressions above
   with the exception of sin(%e) will simplify to a numerical result.
   I think the simplification of expression like sin(%e) has to be added
   to the simplifier of the function.
   
The second method now works for me too. I do some further tests before I
am posting these changes. 

Dieter Kaiser