• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Order of operations (was: Eigenvalues &/or eigenvectors,
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
  • Follow-Ups:
    • Re: Order of operations (was: Eigenvalues &/or eigenvectors,
      • From: email@hidden (Michael Sullivan)
  • Prev by Date: Re: Order of operations (was: Eigenvalues &/or eigenvectors, anyone?)
  • Next by Date: How create Suite Definition for an AppleScript handler?
  • Previous by thread: Anyone using Apple's new iPod scripts?
  • Next by thread: Re: Order of operations (was: Eigenvalues &/or eigenvectors,
  • Index(es):
    • Date
    • Thread