WONKY calculation bug in Numbers 3.0.1

Hi,
This is wonky. It's a bit hard to explain in words, so best see the attachment to understand. You can download the attachment here: https://app.sugarsync.com/iris/wf/D162135_83773729_7822834
Basically, I have a number in each of A1, B1, and C1. The numbers have up to 2 decimals.
D1 contains the following formula: A1 - SUM( B1:C1 ), giving the result 19782.10.
E1 contains the number 19782.10.
F1 contains the formula D1 - E1.
The answer should be 0.00. Instead, it reads 0.00000000000363797881....
There is no inputted number anywhere with more than 2 decimal places. Clearly there is some kind of bug. The funny thing is if I change the formula in D1 to A1 - B1 - C1, then I get 0.00.
I've also tried changing the numbers in A1, B1, and C1 and then adjusting E1 accordingly. With very few exceptions, I get the correct 0.00. There is something about those particular numbers running through the SUM formula that produces the ghost decimals.
Of course, errors to the 12th decimal aren't going to throw off my spreadsheet too badly. But I have to wonder if these bugs are coming up in such simple math, what else is wonky in Numbers 3.0?
When I get weird results in my math, I like to be able to assume it is because of my error. Knowing that Numbers is wonky is going to add a lot of uncertainty to complex troubleshooting in my formulas.
What's the deal? Any ideas?
A

Hello
Here's a brief anatomy of 1.1 - 1.0 - 0.1 = 8.32667268468867E-17 and 1.1 - 0.1 - 1.0 = 0.0.
legend
    s = sign (0 => +, 1 => -)
    e = exponent (bias = 0x3ff = 1023)
    m = mantissa (hidden bit is explicitly represented; integer bit (1/0) in mantissa is hidden bit)
1.1 = 3ff199999999999a := {s = 0; e = 3ff; m = 1.199999999999a}
1.0 = 3ff0000000000000 := {s = 0; e = 3ff; m = 1.0000000000000}
0.1 = 3fb999999999999a := {s = 0; e = 3fb; m = 1.999999999999a}
1.1 - 1.0 = 3fb99999999999a0 := {s = 0; e = 3fb; m = 1.99999999999a0}
    3ff199999999999a - 3ff0000000000000
    = {s = 0; e = 3ff; m = 1.199999999999a} - {s = 0; e = 3ff; m = 1.0000000000000}
    = {s = 0; e = 3ff; m = 0.199999999999a}    [1]
    = {s = 0; e = 3fb; m = 1.99999999999a0}    [2]    # e -= 4; m << 4
    = 3fb99999999999a0
    = 2 ^ (0x3fb - 0x3ff) * 0x1.99999999999a0
    = 2 ^ (1019 - 1023) * 1.600000000000001421085471520...
    = 2 ^ -4 * 1.600000000000001421085471520...
    = 0.100000000000000088817841970...
1.1 - 1.0 - 0.1 = 3c98000000000000 := {s = 0; e = 3c9; m = 1.000000000000}
    3fb99999999999a0 - 3fb999999999999a
    = {s = 0; e = 3fb; m = 1.99999999999a0} - {s = 0; e = 3fb; m = 1.999999999999a}
    = {s = 0; e = 3fb; m = 0.0000000000006}    [1]
    = {s = 0; e = 3c9; m = 1.8000000000000}    [2]    # e -= 50; m << 50
    = 3c98000000000000
    = 2 ^ (0x3c9 - 0x3ff) * 0x1.8
    = 2 ^ (969 - 1023) * 1.5
    = 2 ^ -54 * 1.5
    = 8.32667268468867E-17
1.1 - 0.1 = 3ff0000000000000 := {s = 0; e = 3ff; m = 1.0000000000000}
    3ff199999999999a - 3fb999999999999a
    = {s = 0; e = 3ff; m = 1.199999999999a} - {s = 0; e = 3fb; m = 1.999999999999a}
    = {s = 0; e = 3ff; m = 1.199999999999a} - {s = 0; e = 3ff; m = 0.199999999999a}    [3]
    = {s = 0; e = 3ff; m = 1.0000000000000}
    = 3ff0000000000000
    = 1.0
1.1 - 0.1 - 1.0 = 0000000000000000
    3ff0000000000000 - 3ff0000000000000
    = {s = 0; e = 3ff; m = 1.0000000000000} - {s = 0; e = 3ff; m = 1.0000000000000}
    = {s = 0; e = 0; m = 0.0000000000000}    [4]
    = 00000000000000
    = 0.0
[1] This is not normalised form with hidden bit = 0
[2] This is normalised form with hidden bit = 1
[3] the 2nd term is not normalised form; LSB of mantissa of the 2nd term is result of rounding.
[4] +0
Cheers,
H

Similar Messages

  • Calculator bugs

    The standard Mac Calculator v4.2 (the lastest version as of writing) has some basic bugs it seems...
    Try typing each of these. I'm using 15 decimal places in scientific mode, in Degrees, not in Reverse Polish (RPN) mode:
    1E1, x^2, x^2 Produces "Error" but 10, x^2, x^2 succeeds
    1,1/x,x!,x! Produces "Error". Fails on other initial numbers too.
    2,1/x,cos,cos Produces "Error".
    2,1/x,=,cos,cos is OK though.
    Similarly x!,1/x,x!,x! produces "Error"
    2,M+ causes all functions on the left (trig, power, exp etc) to stop (presumably this is as designed). But you can still press 1/x, if you press it before any other buttons.
    Any number,y^x,PI,= gives the result as PI
    Any number,y^1/x,PI,= gives the result as PI
    Any number 'q',y^x,RN,= gives the result as RN + 10q for q < 1E16
    Any number 'q',y^1/x,RN,= gives the result as RN + 10q for q < 1E16
    1E16,=,y^x,RN,= gives the random number, but 1E16,-,M+,C,MR,y^x,RN,= gives "1e+17"
    1E16,=,y^x,RN,= gives the random number, but 1E16,-,M+,C,MR,y^x,RN,= gives "1e+17"
    9.99999999999999E127, =, =, = Produces odd results: "1E+128","Not a Number","Error"
    And finally a harder one to get right:
    1E22,sin (in radians) gives 0 but the correct answer is -0.8522008497671888017...
    All the above work fine on the standard calculator for another OS I could mention. The command line 'bc' tool would work fine too I imagine.

    typewriter wrote:
    I'll add one more MAJOR calculator bug to the list.
    The trig functions are completely wrong.
    Examples :
    COS(135) --> .707 (in degrees - should be negative)
    I get - 0.707
    COS(3) --> .989 (in radians - should be negative)
    I get -0.99
    SIN(-45) --> .8509 (degrees - should be negative)
    I get -0.7091 - you are still in radians mode and even there the answer I get is -0.8509
    Wrong wrong wrong. I can't even conceive HOW these could go wrong. Wouldn't the COS button on the calc just use the cos() function in the code?
    You are correct about being wrong, but I cannot duplicate it on my calculator. The error is on your system. I believe you have a corrupt file somewhere.
    And after pressing the Cos button:
    Message was edited by: nerowolfe
    Message was edited by: nerowolfe

  • Is this a bug in Numbers?

    Hi,
    I have recently finished my spreadsheet for personal finance tracking, and have just encountered what may be a bug in numbers.
    I have a few sheets in which i collect the relevant data to be used by the appropriate functions.
    This is what I have noticed.
    In one sheet I have spending categories in column 1, and the relevant months in the top row. I have used the SUMIFS function to total transactions by category and month. I wrote the first row of functions and when I was done I merely copied and pasted the functions into the adjacent rows since they are exactly the same, the only variable being the spending category, which I allowed for.
    I have about 10 categories and they all work perfect except for two rows. I find this very unusual since I have copied and pasted the functions, so no room for error, and not only that, all the other rows work perfect - just these two rows don't do the job. Also, it does not give the error sign (the red triangle with the exclamation mark), but the cells simply return the value $0.00. I even re-wrote the functions to try a different method other than and copied version of the function, but I can't get the values to display correctly in the cells.
    Anyways, I just thought that if there is someone else that is encountering the same problem it would be nice to know.
    Thanks
    ST

    Hello
    At last I have responded to the 50 mails received and finished what I had to do in the garden.
    I wish to add that when something doesn't behave as we wish, 99.99% of times, it's because we made a typo.
    Here is a list of common ones :
    (1) Extraneous spaces
    (2) Unwanted duplicated chars
    (3) unwanted or missing parenthesis (or double quotes)
    (4) Error with the parameters separator (semi-colon versus comma)
    (5) add you own common ones
    Case 3 is quite easy to identify because most of the times, it generates a syntax error.
    Case 4 is easier to identify because, as far as I know, it always generates a syntax error.
    I apologizes but I can't describe Case 5's behaviour
    Case 1 and 2 are the more annoying because they may give a formula returning a wrong value without any kind of error message.
    It may be a good idea to keep this list near your machine.
    Yvan KOENIG (VALLAURIS, France) vendredi 26 mars 2010 18:09:36

  • How to paste calculated values from Numbers?

    When I copy calculated values from Numbers and paste into a table in Pages, I get an image like the one below.  Non calculated values paste fine.
    To get around this issue, I paste the calculated values into TextWrangler, then copy from there and paste into Pages.  Is there a way to go directly from Numbers to Pages with calculated values?

    Hi 4th Space,
    I you are pasting into a table in Pages, follow Jeffs instructions.
    I you are not pasting into a table, this works. Copy the cells in Numbers. Go to your Pages document and under the Edit Menu > Paste and Match Style. It works like Paste Values.
    Ian.

  • Autofill bug using Numbers in Leopard when assigned to a Space

    Has anyone else seen this bug?
    I found a weird bug in Numbers. I have set Numbers to automatically load in Space #3. I wanted to cut and paste some information from a window in Space#2 so I moved the Numbers window to Space #2.
    When I tab between cells and start typing, based on what the autofill options are it switches out the Numbers window, moving me to Space #3, leaving only the just the drop down menu with the autofill choices. For instance, if I type a 1 and the autofill choices are 150, 120, etc then it flips me to Spaces #3. It does the same thing regardless if I am entering a letter or digit.
    If I move the Numbers window back to Space #3 it will display the autofill menu correctly.
    Here are two images of the bug.
    Image 1 shows the numbers window correctly. http://web.mac.com/bloetel/image1.png
    Image 2 shows how the autofill window is the only thing showing when it switches to Space #3. http://web.mac.com/bloetel/image2.png

    I encountered this problem too. As a 'solution', I turned auto-fill off, but that can't be the great idea of Apple. Also, the preferences window is in another spaces than the document I'm working in. That isn't a big problem, you can move the preferences window to a different space. I found that via the spaces overview (standard shortcut is F8, I think) you can move the autofill popup, just by dragging it. It disappears in the overview, but it's there when you go back to your original window.

  • HP 39gII BUG: complex numbers and powers

    Thr following: (0.02+0.01*i)^3  results in: 1.14486680448E−11+6.29676742464E−11*i the correct answer is: .000002+.000011*i the correct answer can be obtained by entering (0.02+0.01*i)*(0.02+0.01*i)*(0.02+0.01*i). Firmware version: 30/Oct/2013 Rev: 19148  I found this while using the calculator at work. I had put it aside due to previous frustrations, but this past week I decided to use it again - and very soon I run into a problem. This calculator has been for sale for almost two years. The last update was more than 6 months ago. It still has serious bugs. Is this becoming the forgotten brother of the Prime? Whenever I complain about the 39gii, I get reminded that other HP calulators e.g. 48GX also had bugs, but these have never affected me in daily work! Unfortunately I am losing my faith in the current development team. 

    Mmmm-- wrote:
    It looks to me to be the case that as long as one of |a| or |b| is greater than 1 (not equal) in a+bi you'll get the correct answer when raising it to a power.The closer to zero the maximum of a and b is, the bigger the error!.
    Unfortunately the numbers I use are not limited to the "good" range.

  • HP Prime calculating bug

    Hi, I'll get right to the issue i'm having with my HP Prime calculator.  Recently during an exam where i was calculating the moments of inertia of certain bodies i encountered what i can only describe as a bug in the software because I can't figure any other reason why it would kick out the answer it did for such a seemingly simple function.  After I had done all the laboreous work of simplifying the differential equations I just needed to add some simple fractions.  As i have been operating this calculator for several weeks now, the only way i can get it to show a fraction in exact form is to type (number) / (number) and it shows it in exact form.  In my case and for this particular calcuation I input (3/20) - (1/7) "enter".  the answer Prime gave me was noticably unsimplified given that i needed it in simplified form.  although the numerical, non-exact value was almost correct (.00714285714309 instead of the correct value of .00714285714286), generally Prime kicks out a simplified value.  What it gave me was 214500215/30030030099 instead of 1/140.  i'm just curious if i need to do something different to get a simplified/correct answer on the first go rather than having to do a work-around.
    Thanks in advance

    If you want an exact and simplified answer on the first go, do your calculation in CAS view rather than Home view. Try this experiment.
    1. Go to CAS view, and enter your calculation (3/20)-(1/7). The Prime will respond with 1/140, the exact answer. Now press the a b/c key. The Prime will respond with 0.00714285714286, the approximate decimal equivalent. Keep pressing the a b/c key, and the Prime will toggle between the two answers.
    2. Now try the same steps in Home view. The Prime will toggle between 0.007142857143 and 214500215/30030030099.
    Remember, the true decimal value for 1/140 is an infinite repeating number. Since every calculator can store only a finite number of digits, it must truncate the value after a set number of digits, and this introduces a small error. The big fraction you got in Home view is not wrong, and it's certainly not a bug. It's just that Home view is not designed to handle exact values. The CAS, on the other hand, is designed to handle exact values, so when you tell it to show an approximate answer, its decimal form will be closer to the exact value, namely, 1/140.
    The moral of the story is, use CAS view when you want exact values and Home view when you want approximate values. I tell my students to use fractions whenever possible (since those are usually exact) rather than converting them to decimal values. It's far easier to use 1/3 than 0.33333....[infinite number of 3s go here].

  • Calculating percentages using numbers

    Hi there, 
    I hope someone out there can help me but how do I calculate the percentage of two numbers using Numbers. For example £4000 incoming and £1650 outgoings - How do  I get the spreadsheet to work out the percentage and input this number into the fields?  This is really painful trying to work it out. Thanks

    Hi Adrian,
    You wrote: "I need to do this with 2 column actually A and B, both column need to be added by that 5%, I think this only possible"
    If I'm reading the description of your table correctly, column A shows the number of units, column B the price of each unit, and column C the price of that quantity of units.
    If you increase the unit price by 5%, that will also increase the total price of n units by 5%, provided you multiply the quantity by the new unit price instead of the old unit price.
    Here's a step by step:
    Original table:
    Formula in C2, and filled down column C: =A*B
    Add a new column (D) to hold the formula for the increased price.
    D2, and filled down: =B*(1+5%)
    With the cells shown still selected, Copy (command-C)
    Now select cell B2, and go Edit > Paste Values (Numbers '09) or Edit > Paste Formula Results (Numbers 3)
    Results should be as shown below:
    (Note that column C has been recalculated to show the results of a 5% increase in unit prices. Column D (labelled "temp") has also been recalculated to show what the unit prices would be after a second 5% increase. the last step is to delete this column, leaving us with the original table, but with unit prices increased by 5%:
    In practice, you would probably NOT do this on the actual invoice. Item names (or numbers) and the unit prices of those items would be kept on a price list, separate from the invoice, and the price would be looked up by the Invoice table when the item name or number was entered. The table would be used as an invoice generator, and the completed invoices either printed or 'printed' as pdf files as each was generated.
    Price changes would be made on the price list, either individually, or geerally as done here. Note that the new prices would affect new invoices AND any existing invoices still connected to the price list (which is why each is 'printed' to separate it from the calculating document). Here's a simple example using a price list as a lookup table. Item Number and Quantity are entered on the invoice. The rest is added by formulas.
    Formulas:
    Price List has no formulas.
    Invoice:
    C2 and filled right to column D and down to row 6:
    =IFERROR(VLOOKUP($B,Price List :: $A:$C,COLUMN()-1),"")
    In row 6, the empty cell in column A will cause a "could not find" error. IFERROR catches this and places a null string in C6 (and in D6).
    E2 and filled down to E6: =IF(LEN(D)<1,"",A*D)
    LEN(D) returns the length (in number of characters) of the contents of the cell on the same row of column D. If the cell is empty, or contains a null string (as in row 6), the length is zero, and IF will place a null string in column E.
    SUM, in row seven, interprets text (including a null string) as zero, so this does not affect the sums in coumns A and E.
    Row 7 is a Footer Row. Formulas referencing a whole column ignore values in Header and Footer rows, making it possible to place the formulas below where they are.
    A7: =SUM(A)
    E7: =SUM(E)
    Regards,
    Barry

  • IOS 7 introduced bugs to Numbers Forms

    The Forms feature of Numbers stopped working after I installed iOS 7. Some of the data entry boxes in Numbers Forms are not visible until I move to the next entry. Numbers itself crashes about 25% of the times I try to return to the spreadsheet. have created a new spreadsheet under iOS 7 and the Forms exhibit the same behavior. Is there a workaround for this bug?

    Apple does not monitor these forums for this type of feedback.  You need to submit your sugestions at:
    http://www.apple.com/feedback/

  • Calculations with Rounded Numbers

    I've created a form in Adobe X that has a few calculated fields.  For ease of conversation, we'll call them Field A, Field B and Field C (see below).  I need Fields A and B to be rounded to the nearest whole number so that Field C is also a whole number.  I've tried formatting Fields A and B to show no decimals but the calculaton is still being performed on the non-rounded numbers.  Can anyone help with this?  Thanks.
    Field A - Field B = Field C

    George I must be missing something.  I added the math.round functions as shown in your example but now it doesn't calculate at all.  Can you look at the coding shown below and let me know where I went wrong?  Thanks.
    Updated Coding:
    (function(){
    var totalMiles = math.round(+this.getField("Total Miles DrivenRow1").value);
    var homeMiles = math.round(+this.getField("Home Base MilesRow1").value);
    var diff = totalMiles - homeMiles;
    if (diff<0) diff = 0;
    event.value = diff;})();
    Original Coding:
    var totalMiles = +this.getField("Total Miles DrivenRow1").value;
    var homeMiles = +this.getField("Home Base MilesRow1").value;
    var diff = totalMiles - homeMiles;
    if (diff<0) diff = 0;
    event.value = diff;

  • Prime calculator - Bugs

    I have discovered several bugs in the latest firmware. They are:
    If you chose "Digit Grouping" containing spaces or other signs, the solver stops working for larger numbers than 999...
    It is no longer possible to plot more than one function. If I check two or more, the plot funtion reply "no function checked"...
    /Hans

    Hi,
    These problems have been reported here:
    http://www.hpmuseum.org/forum/thread-1443.html
    http://www.hpmuseum.org/forum/thread-1705.html
    http://www.hpmuseum.org/forum/thread-1565.html
    Regards.
    Note: I do not work for HP, I just like playing with calculators :-)

  • Pie chart bug in Numbers 3.0 on OS X?

    When I select a range and try to make a pie chart, the pie chart always shows 100% full for the first item, and completely ignores the other items to be included in the chart.
    I tried to do a 95% / 5% pie chart and no matter what I do, the pie chart only comes out as 100% full.

    Hi Rafagon,
    Try clicking the chart, then the blue 'Edit Data References' box, then in the lower left of your screen, change Plot Rows as Series to Plot Columns as Series, or vice versa.
    SG
    (That's a trick Ian taught me in the old Numbers, where the rows/columns switcher was in a different position.)

  • Use iCal to alert on dates calculated in iWork Numbers

    As a followup to this https://discussions.apple.com/thread/2635173?threadID=2635173 archived discussion, I'd like to know if it is possible to have Numbers calculate dates (e.g. A workout schedule for runners) and have iCal do reminders (entries on the calendar for those days that an exercise is scheduled).
    Example entry in Numbers column:
    2013/05/03 18:00 0:20 5x(2 low, 2 rest)
    Where the time is depending on the day of week (i've got all that working) and the string "5x(2 low, 2 rest)" should go in the appointment text of ical on may 3 at 6 at night for an appointment of 20 minutes.

    As a followup to this https://discussions.apple.com/thread/2635173?threadID=2635173 archived discussion, I'd like to know if it is possible to have Numbers calculate dates (e.g. A workout schedule for runners) and have iCal do reminders (entries on the calendar for those days that an exercise is scheduled).
    Example entry in Numbers column:
    2013/05/03 18:00 0:20 5x(2 low, 2 rest)
    Where the time is depending on the day of week (i've got all that working) and the string "5x(2 low, 2 rest)" should go in the appointment text of ical on may 3 at 6 at night for an appointment of 20 minutes.

  • E72 - Arabic Calculator Bug Info

    For ARABIC USERS who cant use their calculators on E72:
    Menu>Ctl. Panel>Settings>General>Personalisation>Language:
    Phone Language: Arabic
    Writing Language: English
    Number Format: Arabic or English
    *Notes:
    - The Number format option will only be visible if the phone language is set to ARABIC.
    - The calculator will work in ARABIC if the 'Writing Language' will be set to ENGLISH, and the number format set to ARABIC
    Hope this helps the arabic users. And I hope that this thing gets fixed on the next firmware release.
    E71-1 (40) || RM-346 || 400.21.013

    /t5/Software-Updates/Language-changed-or-missing-after-software-update-sticky/td-p/265903
    And its not a good idea to post IMEI number on a public forum.
    Previous Phones: 6600, 7610, 6230, 6230i, 1100, 1112, N70, N73, N95, N95 8GB, 5800XM, 5230, C5, iPhone 3GS, SE Xperia X10, N900, N8, SE Xperia Arc
    Current Phones: Nokia N9, iPhone 4

  • Multiple Condition Calculation - New to Numbers

    I am new to numbers and/or excel but what Im trying to do ended up being a lot harder than I thought it should be.
    Im trying to create a summary of items based on multiple conditions
    _ID TYPE # DATE_
    a000001 1 5 Jan 1, 2008
    b000002 7 2 Jan 2, 2008
    a000001 7 1 Jan 3, 2008
    a000001 1 6 Jan 4, 2008
    b000002 1 32 Jan 5, 2008
    c000003 7 6 Jan 6, 2008
    c000003 1 6 Jan 7, 2008
    If ((ID == a000001) AND (TYPE == 1)) then add the # column to the current total.
    OR
    If ((ID == a000001) AND (TYPE == 1) AND (DATE == Jan 1, 2008)) then add the # column to the current total.
    Does that make sense? Ive found may versions of conditional on this forum but I cant find any with running totals.
    Thanks all!
    null

    Bo,
    I'm going to give you a method that you can massage to your liking.
    The E-column may be hidden, and will contain your condition logic. Now E2 contains:
    =AND(A2="a000001", B2=1)
    Column A2 of the Formula Table contains:
    =SUMIF(DataTable :: E, TRUE, DataTable :: C)
    The first argument is the test range, your logic, the second argument is the valid condition for the test range, and the third argument is the range to be summed.
    Jerry

Maybe you are looking for

  • Routing Issue with 3550

    I am having a routing issue with a 3550 switch. I have 5 vlans and I need one of the vlans to access a different router based on destination IP rather than our edge router. I have entered a static route on the 3550 that points to the secondary router

  • HP Deskjet 3050 All-in-One Printer series - J610 not connecting to wifi

    we had comcast internet and used the negear router to connect wifi. We just switched over to verizon fios and the wireless is not working. 

  • Problem with Adobe Extension Manager CC. Does not show installed extensions.

    Adobe Extension Manager CC does not show installed extensions for Photoshop CC 2014 or Photoshop CC so that I am unable to uninstall extensions.  This means that I cannot install updates to extensions.

  • Ovi can't find a bluetooth device in my laptop!

    hai, i bought a new laptop a couple of days ago .. (HP Pavilion dv6-3177ee) it comes with bluetooth version 3. i installed ovi suite and pc suite .. but when i try to connect my phone via bluetooth , it gives me the next massege : "Bluetooth is turne

  • My scenario is IDOC to FILE

    I have 3 clients(700,800 & 900) in R/3. Idoc(orders05) is comming from any one of the client. I am sending this idoc to non-sap system as it is. Please tell me the scenario, How to configure my Busyness Systems and flow?