#### Bug in excel fundamantal add-function

```Hi

Where can I report a bug in excel? OK I try this group.

Try this

A1 = -621,2
A2 = 2
A3 = 1
A4 = -540,2
A5 = 175
A6 = 986,4
A7 = SUM(A1:A6)

A7 must be 3 - but try to have 13 decimals...!!! is this a BUG? I think
so

Using Danish XP and danish 2002 SP3

```
 0
kze (2)
3/19/2006 10:58:57 PM
excel 39879 articles. 2 followers.

7 Replies
463 Views

Similar Articles

[PageSpeed] 37

```No, it's not a bug. It's a "feature" of XL using IEEE double precision
floating point math. Most numbers can't be exactly represented in a
finite number of binary digits, just as 1/3 can't be exactly represented
by a finite number of decimal digits.

You can use ROUND() to round to zero if it's necessary.

See

http://cpearson.com/excel/rounding.htm

"snooze" <kze@firkant.net> wrote:

> A7 must be 3 - but try to have 13 decimals...!!! is this a BUG? I think
> so
```
 0
jemcgimpsey (6723)
3/19/2006 11:18:09 PM
```It's how binary sytems deal with number approximations:

http://www.mcgimpsey.com/excel/pennyoff.html

(From J.E. McGimpsey's site)

snooze wrote:
>
> Hi
>
> Where can I report a bug in excel? OK I try this group.
>
> Try this
>
> A1 = -621,2
> A2 = 2
> A3 = 1
> A4 = -540,2
> A5 = 175
> A6 = 986,4
> A7 = SUM(A1:A6)
>
> A7 must be 3 - but try to have 13 decimals...!!! is this a BUG? I think
> so
>
> Using Danish XP and danish 2002 SP3

--

Dave Peterson
```
 0
petersod (12005)
3/19/2006 11:19:21 PM
```thanks for hints!!

```
 0
kze (2)
3/19/2006 11:40:35 PM
```As previously noted, most decimal fractions cannot be represented exactly in
binary, although all integers (through 15 digits) can be represented exactly.

An easy way to predict the magnitude of binary approximations is to note
Excel's documented limit of 15 digits.  Thus you can think of your problem as
-621,200000000000???
2
1
-540,200000000000???
175
986,400000000000???
--------------------
3,000000000000???
consistent with Excel's reported result of
2,99999999999989

For more precise information, see the D2D function at
which shows that the binary approximations to 621,2 and 540,2 are larger
than their nominal values and the binary approximation to 986,4 is smaller
than its nominal value, hence the reason that magnitude of the accumulated
approximations is as large as it is.

Jerry

"snooze" wrote:

> Hi
>
> Where can I report a bug in excel? OK I try this group.
>
> Try this
>
> A1 = -621,2
> A2 = 2
> A3 = 1
> A4 = -540,2
> A5 = 175
> A6 = 986,4
> A7 = SUM(A1:A6)
>
> A7 must be 3 - but try to have 13 decimals...!!! is this a BUG? I think
> so
>
> Using Danish XP and danish 2002 SP3
>
>
```
 0
3/20/2006 2:51:09 PM
```can you explain to me why the sum() of 2 decimal numbers can have 13 decimal

like

(A1)      5384754,23
(A2)      1294830,46
(A3)      1583569,98
(A4)      2506349,21
(A5)                3,45
(A8)      =A1-A2-A3-A4-A5

(A8=)    1,130000001

all this number are finite number.

thank,s

"JE McGimpsey" a écrit :

> No, it's not a bug. It's a "feature" of XL using IEEE double precision
> floating point math. Most numbers can't be exactly represented in a
> finite number of binary digits, just as 1/3 can't be exactly represented
> by a finite number of decimal digits.
>
> You can use ROUND() to round to zero if it's necessary.
>
> See
>
>     http://cpearson.com/excel/rounding.htm
>
> In article <1142809137.754056.127350@v46g2000cwv.googlegroups.com>,
>  "snooze" <kze@firkant.net> wrote:
>
> > A7 must be 3 - but try to have 13 decimals...!!! is this a BUG? I think
> > so
>
```
 0
5/17/2006 2:06:02 PM
```Briefly, it is because Excel does not add using decimal arithmetic.

On Wed, 17 May 2006 07:06:02 -0700, Boy_alone_18
<Boy_alone_18@discussions.microsoft.com> wrote:

>can you explain to me why the sum() of 2 decimal numbers can have 13 decimal
>
>like
>
>(A1)      5384754,23
>(A2)      1294830,46
>(A3)      1583569,98
>(A4)      2506349,21
>(A5)                3,45
>(A8)      =A1-A2-A3-A4-A5
>
>(A8=)    1,130000001
>
>all this number are finite number.
>
>thank,s
>
>"JE McGimpsey" a �crit :
>
>> No, it's not a bug. It's a "feature" of XL using IEEE double precision
>> floating point math. Most numbers can't be exactly represented in a
>> finite number of binary digits, just as 1/3 can't be exactly represented
>> by a finite number of decimal digits.
>>
>> You can use ROUND() to round to zero if it's necessary.
>>
>> See
>>
>>     http://cpearson.com/excel/rounding.htm
>>
>> In article <1142809137.754056.127350@v46g2000cwv.googlegroups.com>,
>>  "snooze" <kze@firkant.net> wrote:
>>
>> > A7 must be 3 - but try to have 13 decimals...!!! is this a BUG? I think
>> > so
>>

--ron
```
 0
ronrosenfeld (3122)
5/17/2006 6:14:39 PM
```Less briefly, all of the numbers in A1:A5 have non-terminating binary
representations (just as 1/3 has a non-terminating decimal representation),
and hence must be approximated.  The addition is exactly correct, given the
unavoidable approximations to your inputs.

Given the source of the information in the 13th decimal place, rounding it
away does no violence to this calculation.  MS cannot do that for you,
because it would not be appropriate for all calculations.  Excel (and almost
all other software) follows the IEEE standard for binary representation of
numbers.  This is the general nature of almost all sofware, and not unique to
Excel.

If you want to see the actual values of the approximations employed, use the
D2D function at

Jerry

"Boy_alone_18" wrote:

> can you explain to me why the sum() of 2 decimal numbers can have 13 decimal
>
> like
>
> (A1)      5384754,23
> (A2)      1294830,46
> (A3)      1583569,98
> (A4)      2506349,21
> (A5)                3,45
> (A8)      =A1-A2-A3-A4-A5
>
> (A8=)    1,130000001
>
> all this number are finite number.
>
> thank,s
>
> "JE McGimpsey" a écrit :
>
> > No, it's not a bug. It's a "feature" of XL using IEEE double precision
> > floating point math. Most numbers can't be exactly represented in a
> > finite number of binary digits, just as 1/3 can't be exactly represented
> > by a finite number of decimal digits.
> >
> > You can use ROUND() to round to zero if it's necessary.
> >
> > See
> >
> >     http://cpearson.com/excel/rounding.htm
> >
> > In article <1142809137.754056.127350@v46g2000cwv.googlegroups.com>,
> >  "snooze" <kze@firkant.net> wrote:
> >
> > > A7 must be 3 - but try to have 13 decimals...!!! is this a BUG? I think
> > > so
> >
```
 0
5/17/2006 6:35:01 PM

Similar Artilces:

number rounding in MS Excel
Hi, This may have been answered many times. In MS EXCEL is there a way that it calculates all numbers to 2 decimal digit accuracy instead of the 15 digit default? Thanks in advance for the answer. Hi You can set your decimal places in your cells as 2 and then check Precision As Displayed on the Tools / Options / Calculation page. Be careful though, it means what it says!! -- Andy. "mahusain" <abidh@bdnet.net> wrote in message news:ab59c6f6.0404200315.5196e8aa@posting.google.com... > Hi, > > This may have been answered many times. > > In MS EXCEL is ther...

What's happened to the findfirst function in Access 2010?
I have a working Access 2007 Application which is now failing miserably in 2010. It hinges on location the first available working document in a table runing the following VBA code: With Me.Recordset .FindFirst "([fld1] + [fld2]) = 0" If .NoMatch Then .FindLast "([fdl1] + [fld2]) <> 0" Exit Sub End If .... FURTHER PROCESSING ... What must I do to correct this? Go through a record by record search? End With In 2007, this works correctly, stopping at the appropriate record (approc. rec 1385 in the recordset...

Add an Active Directory Object to Organizational Unit !!!!
Hi everyBody , I want to add an Active Directory Object (User Acount , Group , Compturer...) to an OU by using PowerShell , and i don't know How , any help will be apreciate . thanks . use the redirusr or redircmp from microsoft. It will always go to that OU. "mamhil" <mohamedtawfik@hotmail.com> wrote in message news:BAC9EB20-A4B6-466B-96A9-587B645A18F5@microsoft.com... > Hi everyBody , I want to add an Active Directory Object (User Acount , > Group , Compturer...) to an OU by using PowerShell , and i don't know How > , any help will be ...

SpreadSheetML (XML for Excel)
Hello All, A client of mine has Office X for Mac. I am wondering if this edition of Excel supports SpreadSheetML. I have heard that it also support the new Open XML formats (same as Office 11). Does anyone know if either of these statements is accurate? Thanks in advance, -KJ Hi KJ: I believe that both statements are wrong. The XML converter for Office Next on the Mac has not yet been developed. It's not likely to come until after the PC Office team ships their product to retail -- until they stop CHANGING the thing :-) My guess is that the converter won't appear until sometime...

Public Folder link to Excel File
Hi - I have a user that claims that he had a shortcut to a spreadsheet "in his public folders" at his old job. Obviously, he's an end user that may or may not know what he's talking about.... I'm trying to figure out the best way to accomodate him. He basically wants an Excel file stored on a shared folder to be available to all user as either a shortcut, or a link in the public folders (can't post to a folder as he will be updating the sheet regularly). When a user clicks on the shortcut/link, it would just launch Excel and display the file. Anybody have any ideas...

Filters in Excel 2003
I am using Filters in Excel 2003. Every cell in sheet B is linked to every cell in sheet A. That way I can alter data in B without corrupting the original data in A. I then highlight the cells in B that I want to assign a filter to and select Advanced Filter. I have no criteria so I do not set that. I click OK. I then select Filter again and this time select Auto Filter. Drop down arrows appear at the top of my columns. Great, no problems so far, I then select from the drop down list the criteria that I want to filter. Again no problems, my list filters correctly. But once I have do...

Excel Opens Without Displaying Workbook
I am having issues with opening an Excel file. The file opens, but the workbook is not displayed. I tried the resolution in the article XL97: Excel Opens Without Displaying Workbook (http://support.microsoft.com/default.aspx?scid=kb;en-us;158996&Product=xlw97), but neither of the resolutions fixed the problem. Any suggestions?? Are you using Excel 97? -John Baughman Fort Collins, CO >-----Original Message----- >I am having issues with opening an Excel file. The file opens, but the workbook is not displayed. I tried the resolution in the article XL97: Excel Opens Without Di...

Qrp Date functions
Where do I find the various functions to modify the Reports like cast(DatePart(Dd,[Transaction].Time) as nvarchar) and others and what they mean???? Barry Found the information at MSDN Transact-SQL Reference Barry "Barry L" <barryl@eryanjewelers.com> wrote in message news:usd3uP1CIHA.1188@TK2MSFTNGP04.phx.gbl... > Where do I find the various functions to modify the Reports > like cast(DatePart(Dd,[Transaction].Time) as nvarchar) and others > and what they mean???? > > Barry > ...

Add PowerPoint 2007 to Office Basic
I have Office Basic installed on my laptop and need to add PowerPoint. What is the most recommended, easiest and least expensive way to do this? ...

i want to use outlook send 2000 thousands emails to 2000 peoples at the same time. can i put them all in the recivers and send them at one time? thank you for you help ...

View original Excel after saving over it
In error, i hit save instead of save as. I'd like to view the original documents contents. is this at all possible. i use windows xp. excel 2003 Not very likely. Try a Google search action if you haven't already, but I think it's impossible. This underscores the importance of backups. -- Wigi http://www.wimgielis.be = Excel/VBA, soccer and music "houb" wrote: > In error, i hit save instead of save as. I'd like to view the original > documents contents. is this at all possible. i use windows xp. excel 2003 In article <C2A3F0E7-24E0-43A5-809A-ECA719...

printing imported gif files in Excel
When printing gif file with transparent background on the grey(25%) background of Excel non-transparent part of the picture has white border around it. Is there any way to prevent it? Thank you in advance... Tim ...

ExCel programming
I am working on a spreadsheet for work where it will calculate commissions to be earned based on my sales. There is a table that I have to use to determine what the percentage would be, how would I write an equation for that. For example, the equation would have to say: if say D3 was = or < than %, use cell# whatever and then have a sum in there. The table is on another sheet in the document so that would have to be there too. Basically, the way that my commissions are calculated is that we have to take what I sold in any given month and find out what percentage of my yearly plan i...

Some Excel formatting functions taking a long time to work #2
Excel 2000 SP3 When I use some formatting functions for the first time in a session, such as bold, increasing font size etc, it takes up to 30 seconds to work. Meantime Excel is locked up until it completes that formatting call. I suspect faulty DLL? Has anyone experienced this? How to fix (other than a complete re- install) ? Any advice appreciated. Piri On Nov 5, 8:39=A0am, Piri <wiremu.pare...@hotmail.com> wrote: > Excel 2000 SP3 > When I use some formatting functions for the first time in a > session, such as bold, increasing font size etc, it takes =A0up to 30 > secon...

I want to add a mail account without setting a SMTP server. Is it possible?
I want to add a second mail account that is outside my company. Since the company firewall does not allow us to connect to SMTP-servers I want to add this account without setting the SMTP propertiy. I cannot specify the company server as it is an Exchange server and the outside one an IMAP one. Currently I have specified the outside SMTP server since outook does not allow me to add an account wihtout setting this. I keep getting annoying error messages as my computer can't connect to the outside SMTP. Any one know a way around this? cheers, mortb The company server has SMTP enabled, u...

How to add a button to restore all altered cells original values?
I want to add a reset button to an excel spreadsheet that will restore the values of all changed cells to the original saved ones. Any help would be appreciated. Thanks Dawn Hi this would require quite some VBA code as you somehow have to store the original values for example on a separate hidden sheet -- Regards Frank Kabel Frankfurt, Germany "Dawnybros" <Dawnybros@discussions.microsoft.com> schrieb im Newsbeitrag news:3340601E-16EE-4296-8F50-B0BAC18EA387@microsoft.com... > I want to add a reset button to an excel spreadsheet that will restore the > values of all ...

How to save Japanese characters in CSV format of Excel ?
Hi, I would like to know, how to save the Doubly-Byte characters.For example, Japanese in CSV of Excel.Here are the steps, I tried. 1. Open Excel 2. Copy pasted the Japanese charactesrs in a cell.It is displaying the characters correctly. 3. Save as CSV(Comma seperated file) It is saving as ??????. Thanks in advance for the info. ...

Need to add to current formula
I have this formula that will cause values to change based on the mont that is referenced in the formula (\$L\$1). Currently the formul is:=VLOOKUP(\$A\$1,\$AD\$7:\$AG\$44,IF(\$L\$1="January",2,IF(\$L\$1="February",2,IF(\$L\$1="March",2,IF(\$L\$1="April",2,IF(\$L\$1="MAY",4,IF(\$L\$1="June",3,IF(\$L\$1="July",3,0))))))),0) I need to add August, September, October, November, & December to thi formula but excel is not allowing me. Does anyone know how I can get around this? Oh by the way November thru April =2, May and October=4 and June thr...

Adding a Macro to a VLookup Function
In Excel 2000 -- I would like to create a summary spreadsheet (sheet2). For each time that "Name" appears in sheet 1, row *, take information from the same row, but columns 2 and 6 and bring it over to sheet 2 in the designated area. I know that you need to do a "VLookup" function and I got that to work. I know that you also need a "Loop" statement, so that it will continue to perform the Vlookup and bring over the information for each time that the name appears. I don't know how to write the formula so that the VLookup and the Loop are combined. Examp...

Macro
I need a macro that help me to transfer name and address information from an specific table in excel to a template in words on specific areas and then print the word document. The reason for this is that i need to create diferents letters to be sent to the customers from the excel table. Example of the table is: soc seg, customer name, child name, customer code, add 1 , add2, city, estate, zip code. all this information will be paste on word letter template on specific areas or fields. Any suggestion!!! -- nicoro Hi IMHO the best approach would be to set up a mail merge documen...

Excel fun patch
Excel fun patch, have you see it? http://www.conus.info ...

Excel 2003
Sometimes when I receive excel attachments in my email (outlook 2003) they have a row height of 409.5 when I open them. I have to highlight the whole sheet and change the row height before I am able to view the data. This does not happen all the time and not from any particular person. I can forward the email to another machine with excel 2003 and they open it with no problem. I have downloaded all the patches and updates that I can find and still no help. This is just an annoying quirk that is driving me nuts. Does anyone have any ideas? TIA How about a couple of silly guesses that might t...

Using INDIRECT within functions
I learned a bit from JLathman in a previous post but tried to use the same methodology with this formula (also learned from this Group to get the last entered value in a column) without much luck. The original formula was this with 2009 sheet being static: =LOOKUP(2,1/('2009'!H3:H65536<>""),'2009'!H3:H65536) Trying to make it dynamic I tried the following without success: =LOOKUP(INDIRECT("2,1/(" & O1 & "!\$H\$3:\$H\$65536<>"")," & O1 & "!\$H\$3:\$H\$65536)")) Did I miss something or are...

Need macro help to close excel
I have created a button in Access2000 that opens an Excel Spreadsheet. What I need now is assit in closing excel upon completion. I can get an excel macro to save my file and close the worksheet, but it is not closing excel entirely. I'm on project with this employer and could use a response today to fix this before I leave. Thanks much to any and all. My macro is as follows: Sub SaveClose() ' ' SaveClose Macro ' Macro recorded 9/27/2004 by cdjohnso ' ' Keyboard Shortcut: Ctrl+Shift+C ' ChDir "I:\SchoolsSurvey\Graphs_Reports" ActiveWorkb...

Date function quit working
Hi, I have an Access 2002 application that I have been running on Windows XP SP2 without issue. I just installed the application (running in Access Runtime) on a Windows Vista Home Premium machine. Now, anywhere I used the =Date() function, it fails and just shows #Name? I also have a subform on one of my forms that has now gone blank. It also uses the date function. I had this problem when I converted to Windows XP several years ago and updating the OWC10.dll to version 6619 fixed both issues. However, everything I have read says that reference file makes no difference to the Access...