• 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: "Dennis W. Manasco" <email@hidden>
  • Date: Sat, 10 May 2003 04:13:33 -0500

At 3:54 pm -0400 5/9/03, Michael Sullivan wrote:

It's ridiculous to have the minus have a higher precedence than the power operator, because it just gets lost if the power is even.


x^2 is defined mathematically as (x) * (x)
x^3 is defined mathematically as (x) * (x) * (x)
x^4 is defined mathematically as (x) * (x) * (x) * (x)
x^5 is defined mathematically as (x) * (x) * (x) * (x) * (x)

3^2 = (3) * (3) = 9
3^3 = (3) * (3) * (3) = 27
3^4 = (3) * (3) * (3) * (3) = 81
3^5 = (3) * (3) * (3) * (3) * (3) = 243

-3^2 = (-3) * (-3) = 9
-3^3 = (-3) * (-3) * (-3) = -27
-3^4 = (-3) * (-3) * (-3) * (-3) = 81
-3^5 = (-3) * (-3) * (-3) * (-3) * (-3) = -243

I see nothing _ridiculous_ about producing an algebraically and mathematically correct result. I would be very upset if the results I received from a power function deviated from what I would calculate with pencil and paper or a calculator.

It makes sense that unambiguously unary numbers, when raised to a power, should have their sign applied before they are multiplied. To do otherwise is to seriously deprecate the value of negative numbers; at this point we should probably throw away the concept of zero as well.

By the same token z = x - y^a had better evaluate to z = (x) - ((y)^(a)) or we are going to have some serious problems....


-=-Dennis
_______________________________________________
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:
    • My operator can beat up your operator.
      • From: Christopher Nebel <email@hidden>
    • Re: Order of operations (was: Eigenvalues &/or eigenvectors,
      • From: email@hidden (Michael Sullivan)
References: 
 >Re: Order of operations (was: Eigenvalues &/or eigenvectors, (From: email@hidden (Michael Sullivan))

  • Prev by Date: Re: Frontmost document??
  • Next by Date: Re: "idle" has different effect in X vs 9?
  • Previous by thread: Re: Order of operations (was: Eigenvalues &/or eigenvectors,
  • Next by thread: Re: Order of operations (was: Eigenvalues &/or eigenvectors,
  • Index(es):
    • Date
    • Thread