Re: Can someone explain this?
Re: Can someone explain this?
- Subject: Re: Can someone explain this?
- From: Doug McNutt <email@hidden>
- Date: Sat, 14 Mar 2009 21:14:03 -0600
At 16:48 -0400 3/14/09, Mark J. Reed wrote:
As I said, if you use pow(), there's no ambiguity. -pow(3,2) is
distinct from pow(-3,2). With the operator form, it just depends on
how the language ranks the precedence of the exponentiation operator
with respect to unary minus.
Sorry about that extraneous minus sign in my last. My blood pressure
gets to my typing fingers when this problem is mentioned by someone
else.
pow(x,2) explicitly identifies the square of x as a function of x and
has no problems with modern computer "science".
The problem for us physicists is that we look at x^2 as a function of
x. Isn't it? It plots as a nice parabola that's single valued,
continuous, with continuous derivative. Negate the function and it
points down rather than up. What is the derivative of (-x^2)? +2x
or -2x?
f(x,y) = x^2 - y^2
is surely a function of x and y. Why in the world should its value
depend on the order in which the two parts are evaluated?
And how come, for extra credit, is -2^2 = -4 in good old K&R C run in
a 2's complement machine?
--
-> Stocks are getting pilloreid <-
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden