On 10/25/06, Robert Dodier <robert.dodier at gmail.com> wrote:
> On 10/24/06, Raymond Toy <raymond.toy at ericsson.com> wrote:
> > Isn't exp(-x)*y the correct parsing of %e^-x*y?
> Opinions differ. Fortran 77 gives unary negation the same precedence
> as subtraction, and gives both the same precedence as addition.
> That is the policy implemented by :lisp (put '$- 100 'rbp) in Maxima.
> In that case, %e^-x*y parses as %e^(-(x*y)).
Are you sure about the consequences of the Fortran 77 rules? Doesn't
exponentiation have higher precedence than both addition and
multiplication? Is negation really the issue? What are the values of
the following expressions in Fortran 77?
2.0^2*3
2.0^-2*3
2.0^(-2*3)
2.0^(-2)*3
2.0^-(2)*3
2.0^2-3