Re: Order of operations (was: Eigenvalues &/or eigenvectors,
Re: Order of operations (was: Eigenvalues &/or eigenvectors,
- Subject: Re: Order of operations (was: Eigenvalues &/or eigenvectors,
- From: Dave Stewart <email@hidden>
- Date: Thu, 8 May 2003 14:23:59 -0700
On Thursday, May 8, 2003, at 01:17 PM, Michelle Steiner
<email@hidden> stated:
On Thursday, May 8, 2003, at 09:57 AM, Michael Kelly wrote:
This is interesting. It makes sense now that I think about it, but
-2^2
= 4 is still completely unintuitive, and is just asking for problems.
It is intuitive to me. I read it as "minus-two to the second," not
"minus two-to-the-second."
--Michelle
Personally, I originally read this the same way as Michelle. I wondered
what the fuss was all about when I first encountered this diversion
(let's face it ... we've diverged from the original topic!).
On the other hand, whenever I'm just not sure if the compiler will obey
or not, I use parenthesis. It's anal I know, but ...
(-2)^2 will always produce 4 in any language [1]
-(2^2) will always produce -4 in any language [1]
When that doesn't work, then I scream BUG! ;-)
[1] - I bet someone can find exceptions to these "rules" if they try
hard enough, but it's always worked for me! Also note I've assumed "any
language" supports the exponential operator, someone already noted that
C does not.
Dave Stewart
Aqua-flo Supply (Goleta)
email@hidden
A computer lets you make more mistakes faster than any invention in
human history with the possible exceptions of handguns and tequila.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.