+ Reply to Thread
Results 1 to 9 of 9

Extra Pair of Brackets gives different result

  1. #1
    Forum Contributor
    Join Date
    02-23-2015
    Location
    united kingdom
    MS-Off Ver
    14.0.7143.5000 (32-bit)
    Posts
    124

    Extra Pair of Brackets gives different result

    I have a following formula:

    Please Login or Register  to view this content.
    =((R32/M32)^(P32-1))-((K32^(2*P32))*(R32/M32)^(-P32-1))
    Please Login or Register  to view this content.
    The result of this is '0' .

    Then when I use same formula but with extra brackets on the outside
    Please Login or Register  to view this content.
    =(((R32/M32)^(P32-1))-((K32^(2*P32))*((R32/M32)^(-P32-1))))
    Please Login or Register  to view this content.
    it gives me something other than 0 .

    Where I s a problem ?

    Thanks

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Re: Extra Pair of Brackets gives different result

    Good morning nosense

    It's not just an opening bracket at the start and a close at the end. Formula 1 starts and ends with two brackets. Formula 2 starts with three and ends with four brackets.

    After the first multiply (*) sign, you have a single opening bracket in formula 1 and a double in formula 2.

    HTH

    DominicB

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,195

    Re: Extra Pair of Brackets gives different result

    The error is nothing to do with the brackets:

    =(((R32/M32)^(P32-1))-((K32^(2*P32))*(R32/M32)^(-P32-1)))

    works fine for me.

    I copied/pasted your "error" formula and it worked OK also.


    Post a file showing the error condition.
    Last edited by JohnTopley; 06-13-2016 at 04:28 AM.

  4. #4
    Forum Contributor
    Join Date
    02-23-2015
    Location
    united kingdom
    MS-Off Ver
    14.0.7143.5000 (32-bit)
    Posts
    124

    Re: Extra Pair of Brackets gives different result

    Thanks for pointing this out, I have fixed it but still does same thing

    Please Login or Register  to view this content.
    =(((R32/M32)^(P32-1))-((K32^(2*P32))*((R32/M32)^(-P32-1))))
    Please Login or Register  to view this content.

    and

    Please Login or Register  to view this content.
    =(((R32/M32)^(P32-1))-((K32^(2*P32))*((R32/M32)^(-P32-1))))
    Please Login or Register  to view this content.

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Extra Pair of Brackets gives different result

    Those 2 formulas (in Post #4) are identicle.
    So I would certainly expect both to produce the same result.

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Extra Pair of Brackets gives different result

    Why are you trying to add () around the original formula?

    There is more that is different between the 2 formulas than just the outside (brackets)

    Here is your original formula, with brackets around it
    =(((R32/M32)^(P32-1))-((K32^(2*P32))*(R32/M32)^(-P32-1)))

  7. #7
    Forum Contributor
    Join Date
    02-23-2015
    Location
    united kingdom
    MS-Off Ver
    14.0.7143.5000 (32-bit)
    Posts
    124

    Re: Extra Pair of Brackets gives different result

    I agree,
    But they give me different result!
    Please see in the sheet attached the yellow highlighted cells have same formulae in but different results.
    Attached Files Attached Files

  8. #8
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Extra Pair of Brackets gives different result

    I see it now..

    Pretty sure it's related to the Floating Point Precision issue (google it)
    Basically not all decimal values can be stored precisely in a binary system
    The result you see in T41 is a miniscule value less than absolute 0, shown in Scientific notation.
    A further calculation of =T41+1 results in 1.

    I think the extra () creates an additional calculation step, revealling the FPP issue.
    Last edited by Jonmo1; 06-13-2016 at 10:08 AM.

  9. #9
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Extra Pair of Brackets gives different result

    Format both cells as Number with about 16 decimals, you'll see the difference.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Macro to set extra extra thick outer border for selected column and row:
    By Chad Bateman in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-02-2014, 01:43 PM
  2. [SOLVED] Automating Brackets, and Sum above Brackets in Excel Chart
    By cartica in forum Excel Charting & Pivots
    Replies: 10
    Last Post: 07-24-2014, 11:33 AM
  3. [SOLVED] SUM(COUNTIF.. with more than one pair of curly brackets ?
    By Gabor in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-30-2013, 03:46 PM
  4. [SOLVED] Having a problem with VLOOKUP and need an extra pair of eyes.
    By poisontoast in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-16-2012, 06:28 AM
  5. Replies: 8
    Last Post: 08-27-2012, 04:37 PM
  6. Replies: 3
    Last Post: 07-20-2012, 07:29 PM
  7. Replies: 5
    Last Post: 04-19-2012, 09:02 AM

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