[7680] in Athena Bugs
vax 7.2R: fmax
daemon@ATHENA.MIT.EDU (mosquito@ATHENA.MIT.EDU)
Sun Jun 23 15:17:41 1991
From: mosquito@ATHENA.MIT.EDU
To: bugs@ATHENA.MIT.EDU
Date: Sun, 23 Jun 91 15:17:35 EDT
System name: matt-wagner
Type and version: CVAXSTAR 7.2R
Display type: SM
What were you trying to do?
plot x^2
What's wrong:
It gave a fmax: Runtime error: Type Mismatch: real ^ integer; Expecting integers
error. (if you were reading the previous bug that's what it probably was;
it just waited a long time before giving me the message; the zoom problem's
still there)
Sure I can say plot x*x. But what if I wanted x^294? Or more realistically,
(3.523*x)^4+(-4.224*x)^3+(2.1523)*x^2-5.523*x+2.42
would have to be:
3.523*x*3.523*x*3.523*x*3.523*x+(-4.224)*x*(-4.224)*x*(-4.224)*x+2.1523*x*
2.1523*x-5.523*x+2.42
ARGHH!
Incidentally, x^2. says
Type Mismatch: real ^ real; Expecting integers
So it wants integers ONLY.
In other words, I can go 3^5 but not 2.5^5.
I'm just imagining somone needing ((1+exp(E/kT))/(1-cos(theta)))^(2/3).
Yuck.
What should have happened:
As far as exponentiation, it should handle reals as well as integers.
I'd settle for being able to say real^int, since it's not much more in the
algorithm for exponentiation iteratively. For real powers, it should
default to exp(a*log(b)) except when the exponent is a rational of the
form p/q where p and q are odd integers, and when the base is negative,
in which case it should factor out the - sign first.