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: Gary Lists <email@hidden>
- Date: Tue, 13 May 2003 15:23:46 -0400
On or about 5/12/03 4:25 PM, Paul Berkowitz wrote:
>
On 5/12/03 12:28 PM, "Michael Sullivan" <email@hidden> wrote:
>
>
> With explicit numbers, I will concede that your interpretation is at
>
> least as reasonable as mine (which would be that -3^2 is to be read as:
>
> - (3)^2).
...(clipped)
>
> If I write -x^2, I expect the result to be a *negative* number.
WHY would you ever _expect_ that?
Having taught high school math and algebra, I can tell you that you no one
should expect a square to be negative. (Contrary to popular culture and
individual personality, where I will concede that this is generally true. ;)
Even if __ for some odd reason__ you believed that you were squaring
"negative X" then the result is positive.
If, almost as odd but more reasonably erred, you thought that you were
"negativing" the positive result of a square then you have just learned the
order of operations a bit improperly (Paul B. has corrected you, I believe,
with regard to AS particularly).
The leading "-" is a unary (sign) changer of the only thing it could
possibly reasonably be attached to: the X.
There is no addend to the left, so we know, by the grapheme "-x" itself what
to do. So does AS.
The only way to communicate to other humans and to compiled or interpreted
computer languages that what you would like to have is the product of your
squaring and negative one is to write -(x ^ 2).
(The space issue, BTW, is only for humans. I don't believe it matters --
except for convenience -- how the script editor or other editor represents
the order....it's still the order no matter the spacing.)
...(clipped)
>
> Sorry, but that's just wrong.
>
>
No it isn't. It makes perfect sense to me.
...(clipped)
Ditto. In fact, its the only sense it can make.
8th grade math: If you want the result of a squaring to be negative,
multiply it by -1. The easiest graphemes that represent that on a
computer screen are: - (a * a) or - (a ^ 2)
Hence they are also the graphemes that represent that to compilers and
interpreters. (These graphemes do not persist in all human languages,
granted. The Maya represent squares vastly differently, for example. But
for human-computer languages and almost all known modern written
mathematical language I don't think you will find any variance from the
Latin/Greek descendant representations.)
That is also true in "hand written" graphical representation (which isn't
easily achieved here.) The commonality is the ( ) parentheses, which
ALWAYS graphically (and interpretatively) group and change the order of
operations.
>
If you don't like AppleScript's method, just use parentheses and stop
>
complaining about it.
After a bit of list-absence, it's good to read the familiar, to-the-point
and humorous tone of PB. :)
--
Gary
Incoming replies are auto-deleted.
Please post directly to the list or newsgroup.
_______________________________________________
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.