+ Reply to Thread
Results 1 to 3 of 3

= -2^2 is not same as -(2)^2

  1. #1
    Registered User
    Join Date
    03-02-2011
    Location
    NY, NY
    MS-Off Ver
    Excel 2010
    Posts
    2

    = -2^2 is not same as -(2)^2

    I just noticed that Excel treats negatives next to other operators as belonging to the number next to it. For instance,

    = -2^2

    is the same as

    = (-2)^2

    rather than

    = -(2^2).

    Is there a way to alter this?

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: = -2^2 is not same as -(2)^2

    Welcome to the forum.

    Is there a way to alter this?
    No.

    The minus sign in Excel is used as both the (binary) subtraction operator and the (unary) negation operator. As the negation operator, it has the highest precedence of all operators. That's the way it has always been.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    03-02-2011
    Location
    NY, NY
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: = -2^2 is not same as -(2)^2

    I had never noticed this before. Thank you for your help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1