Float() and numer



On 5/23/07, Stavros Macrakis <macrakis at alum.mit.edu> wrote:

> Currently, float(2^%pi) returns 2.0^%pi, and there is no way to persuade it
> to return 8.82 -- except something ridiculous like scanmap(float,2^%pi).  On
> the other hand, ev(2^%pi,numer) returns 8.82.
>
> This is because FLOAT has an explicit special case for ^ and ^^, where it
> does not evaluate the exponent as a float.  This is to avoid things like
> float(x^2-x+1) => x^ 2.0-x+1.

Doesn't the special case for ^ have something to do with the exp(x)
--> %e^x simplification?
The goal being, iirc, to avoid stuff like exp(x), numer => 2.72^x.

FWIW
Robert