Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Sum - Sum < Zero ??? How is it? Bug in Excel formula?

Please do not separately post the same question to different newsgroups.

Oh, sorry for this. Never more I will do it.

As respondants in both threads have pointed out, this is a well known
property of finite precision arithmetic exacerbated by binary representation
of numbes. It is not a bug and is not unique to Excel.


Well, it's not a bug, but a "feature".
Where in the hell is this "feature" explicited at help system ? Not so
easy to find...

And of course, for a common user, a number is a number, and nothing
more. If it's typed at 2 decimal precision, it could be good that sum
and multiplycation of it could be also at those 2 single decimal
precision. No use of thinking about IEEE, 15 limit precision, binary
internal representation, and so on... Unless the user ask for it.

I tried the solutions and as trunc() worked well, I put it everywhere.
Now the calculations take some time (few miliseconds more). Also the
parens () works well, but I can not trust 100%.

Well, thanks anyway.

yours, Daniel
from Brazil

  #2   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc
external usenet poster
 
Posts: 1,231
Default Sum - Sum < Zero ??? How is it? Bug in Excel formula?

wrote...
....
As respondants in both threads have pointed out, this is a well
known property of finite precision arithmetic exacerbated by
binary representation of numbes. It is not a bug and is not
unique to Excel.


Well, it's not a bug, but a "feature".


Feature in the sense that it's an UNAVOIDABLE aspect of the HARDWARE
to which ALL finite precision software applications that uses that
hardware are subject.

Where in the hell is this "feature" explicited at help system ?
Not so easy to find...


Anyone with any experience in numeric programming is aware of it.

And of course, for a common user, a number is a number, and
nothing more. . . .


Numbers as a mathematical concept are NEITHER FULLY NOR EXACTLY
supported on computers. The 'numbers' computers provide are
equivalence classes on a bounded subset of real numbers. Arithmetic on
these equivalence classes mostly duplicates mathematical arithmetic on
real numbers (within computer bounds) except near those equivalence
classes' boundary points. Then all bets are off.

If you don't like this, try to find other software that more nearly
meets your expectations. And good luck finding it!

If it's typed at 2 decimal precision, it could be good that sum
and multiplycation of it could be also at those 2 single decimal
precision. No use of thinking about IEEE, 15 limit precision,
binary internal representation, and so on... Unless the user ask
for it.

....

You could always use the Precision As Displayed option, but it causes
other problems. But Excel provides ONLY two options in this regard:
IEEE double precision reals (basically Excel's 15 decimal digit
precision reals) and fixed point (Precision As Displayed). Choose the
one you want.

  #3   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Sum - Sum < Zero ??? How is it? Bug in Excel formula?

On 12 abr, 07:41, "Harlan Grove" wrote:

Anyone with any experience in numeric programming is aware of it.


Yes, I tried it in Delphi using double variables and the values
(115.00 , 113.20 , 1.80) and also got the same result (-2.88658E-15).
Of course, if I was to make a program, and not a excel worksheet, I
would use Currency or Longint types (this last divided or multiplied
by 100), or if going to use real/float types, all the time ensure the
correct round() or trunc() functions.

But this post I included not to talk about programming language or
advanced computation.

I'was with a problem using Excel: some numbers, 2 digit precision,
after sum and subtraction, results different from zero, where the only
value expected was zero.

And now, searching this forum, I found other posts about this same
affair.


You could always use the Precision As Displayed option, but it causes
other problems. But Excel provides ONLY two options in this regard:
IEEE double precision reals (basically Excel's 15 decimal digit
precision reals) and fixed point (Precision As Displayed). Choose the
one you want.


I tried it but didn't get the results. As the final user could change
that option, it was better to lost some milliseconds at more trunc()
functions.


Thanks,
Daniel

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Formula Doesn't Execute (Shows formula-not the calcuation) Keys1970 Excel Discussion (Misc queries) 4 November 15th 06 02:12 PM
match formula - 2 excel files:#1 hasthis formula, 2nd has the Raw DS Excel Worksheet Functions 4 October 7th 06 12:25 AM
Excel 2002 formula displayed not value formula option not checked Dean Excel Worksheet Functions 1 February 28th 06 02:31 PM
i edit a formula (excel) then it displays formula not answer caiman Excel Discussion (Misc queries) 2 September 9th 05 02:09 AM
Converting an Excel formula to an Access query formula Adam Excel Discussion (Misc queries) 1 December 15th 04 03:38 AM


All times are GMT +1. The time now is 02:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"