+ Reply to Thread
Results 1 to 8 of 8

Operator precedence (order of operate) =A1/A2*A3^5-(A1+A2)

  1. #1
    Masood Shahab
    Guest

    Operator precedence (order of operate) =A1/A2*A3^5-(A1+A2)


    Hi,
    what is the order of operating and calculating in this formula?
    =A1/A2*A3^5-(A1+A2)

    1- A1+A2

    2- A1/A2

    3- A3^5

    4- A2*A3



    Regards.




  2. #2
    Barb Reinhardt
    Guest

    Re: Operator precedence (order of operate) =A1/A2*A3^5-(A1+A2)

    If it were me, I'd put parens in to ensure I get the calculation I want.

    "Masood Shahab" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hi,
    > what is the order of operating and calculating in this formula?
    > =A1/A2*A3^5-(A1+A2)
    >
    > 1- A1+A2
    >
    > 2- A1/A2
    >
    > 3- A3^5
    >
    > 4- A2*A3
    >
    >
    >
    > Regards.
    >
    >
    >




  3. #3
    Harlan Grove
    Guest

    Re: Operator precedence (order of operate) =A1/A2*A3^5-(A1+A2)

    Masood Shahab wrote...
    >what is the order of operating and calculating in this formula?
    >=A1/A2*A3^5-(A1+A2)


    Same as

    =((A1/A2)*(A3^5))-(A1+A2)

    There are 3 different precedence levels in your formula

    ^
    * and /
    + and -

    in declining order of precedence. For operators of equal precedence,
    Excel evaluates STRICTLY left to right.


  4. #4
    Masood Shahab
    Guest

    Re: Operator precedence (order of operate) =A1/A2*A3^5-(A1+A2)

    Dear Harlan Grove

    I think parenthesis first calculate.
    with your idea
    =A1/A2*A3^5-(A1+A2) Same as =((A1/A2)*(A3^5))-(A1+A2)

    therefore, A1/A2 (option 2 of the test) is true
    is it true?
    which option is true?
    1- A1+A2
    2- A1/A2
    3- A3^5
    4- A2*A3

    Thanks


    "Harlan Grove" <[email protected]> wrote in message
    news:[email protected]...
    > Masood Shahab wrote...
    > >what is the order of operating and calculating in this formula?
    > >=A1/A2*A3^5-(A1+A2)

    >
    > Same as
    >
    > =((A1/A2)*(A3^5))-(A1+A2)
    >
    > There are 3 different precedence levels in your formula
    >
    > ^
    > * and /
    > + and -
    >
    > in declining order of precedence. For operators of equal precedence,
    > Excel evaluates STRICTLY left to right.
    >




  5. #5
    Masood Shahab
    Guest

    which is first calculated? Operator precedence (order of operate) =A1/A2*A3^5-(A1+A2)

    In the following formula, which is first calculated?

    =A1/A2*A3^5-(A1+A2)

    1- A1+A2
    2- A1/A2
    3- A3^5
    4- A2*A3



  6. #6
    Harlan Grove
    Guest

    Re: Operator precedence (order of operate) =A1/A2*A3^5-(A1+A2)

    "Masood Shahab" wrote...
    >I think parenthesis first calculate.
    >with your idea
    >=A1/A2*A3^5-(A1+A2) Same as =((A1/A2)*(A3^5))-(A1+A2)
    >
    >therefore, A1/A2 (option 2 of the test) is true
    >is it true?
    >which option is true?
    >1- A1+A2
    >2- A1/A2
    >3- A3^5
    >4- A2*A3


    At this point I don't believe I understand what you mean by 'which option is
    true?' None are true. All evaluate to numbers. The only question is what the
    order of evaluation would be. Strictly speaking, it doesn't matter for
    operations of different precedence. A3^5 will be evaluated separately from
    A1/A2 and A1+A2. It doesn't matter which of these simple arithmetic
    expressions is evaluated first. All that matters is how they're grouped.



  7. #7
    JE McGimpsey
    Guest

    Re: which is first calculated? Operator precedence (order of operate) =A1/A2*A3^5-(A1+A2)

    Strictly in terms of operator precedence:

    1) B = A1 + A2
    2) C = A3^5
    3) D = A1/A2
    4) E = D * C
    5 ) F = E - B

    Whether within the calculation engine (1) happens before (2), I don't
    know. It doesn't matter as long as (1) happens before (5). LIkewise, (2)
    may happen before (3) or (3) before (2), but both happen before (4).

    In article <[email protected]>,
    "Masood Shahab" <[email protected]> wrote:

    > In the following formula, which is first calculated?
    >
    > =A1/A2*A3^5-(A1+A2)
    >
    > 1- A1+A2
    > 2- A1/A2
    > 3- A3^5
    > 4- A2*A3


  8. #8
    Tushar Mehta
    Guest

    Re: Operator precedence (order of operate) =A1/A2*A3^5-(A1+A2)

    If you check XL help for 'operator precedence' (w/o the quote), the
    firt suggested topic will be 'About calculation operators.' It
    includes a section on 'The order in which Excel performs operations in
    formulas'

    To see what XL actually does, enter the formula in a cell, display the
    Formula Auditing toolbar, click the 'Evaluate Formula' button.

    --
    Regards,

    Tushar Mehta
    www.tushar-mehta.com
    Excel, PowerPoint, and VBA add-ins, tutorials
    Custom MS Office productivity solutions

    In article <[email protected]>,
    [email protected] says...
    >
    > Hi,
    > what is the order of operating and calculating in this formula?
    > =A1/A2*A3^5-(A1+A2)
    >
    > 1- A1+A2
    >
    > 2- A1/A2
    >
    > 3- A3^5
    >
    > 4- A2*A3
    >
    >
    >
    > Regards.
    >
    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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