View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.misc
joeu2004 joeu2004 is offline
external usenet poster
 
Posts: 2,059
Default $ - 0.00 nevgative zero

On Jun 18, 6:48 am, Michele wrote:
i thought of the rounding error but that is not the case my formula is as
follows: =C3-SUM(J7:J65536) this formula is adding up the following amounts
[see below]


That proves nothing to me. First, the arithmetic above could
introduce rounding error. Second, you do not know say how the column
of numbers that are summed is created. Perhaps those cells have
rounding errors.

The real proof is to format the cell with the formula above using
Scientific format and 14 or 15 decimal places. Actually, even that is
not "real proof" since neither format is a truly accurate picture of
the internal binary number. But they usually expose the internal
rounding error.

When I cut and paste the column of numbers that you posted, then
compute =SUM(A1:A16), the result is (positive) 0.00 when formatted as
Number with 2 decimal places. But it is about 7E-14 when formatted as
Scientific with 14 decimal places.

I'm not sure why you see -0.00. I can only guess that the numbers
that you posted were not entered directly, and the rounding error in
some of those cells tips the sum in the negative direction.

This is an annoying property of binary computers: they cannot store
even the simplest numbers accurately, for the most part. So there is
almost always some miniscule rounding error. Some work-arounds:

(1) Compute =round(C3-SUM(...),2)

(2) Set the Calculation option "Precision as displayed".

Personally, I do not like #2. It can have unforeseeable consequences.

Theoretically, even #1 should not be guaranteed to solve the problem.
I can only guess that it triggers internal heuristics that try to root
out the rounding error inherent in binary computers.

As an aside....

Earlier you wrote:
Zero is Zero.......LOL


Not a ones-complement computer like the CDC 6400 (circa 1960s) ;-).
But that's beside the point.


----- complete previous posting -----

On Jun 18, 6:48 am, Michele wrote:
i thought of the rounding error but that is not the case my formula is as
follows: =C3-SUM(J7:J65536) this formula is adding up the following amounts:
- $ 400.00
- $ 923.45
$ 60.00
$ 36.00
$ 44.00
$ 283.18
$ 36.00
$ 36.00
$ 200.00
$ 145.10
$ 127.35
$ 35.50
$ 30.60
$ 162.60
$ 106.32
$ 20.80
the format i have used is in these cells is: $ #,##0.00;[Red}-$ #,##0.00