willow-mouse
New Member
- Joined
- Aug 25, 2010
- Messages
- 17
My colleague has an issue with summing a list. I've shown the original below, and the permutations I've tried to the right which all result in the correct zero sum.
Any idea how this happens?
[TABLE="class: grid, width: 500, align: left"]
<colgroup><col><col span="4"></colgroup><tbody>[TR]
[TD]Cell[/TD]
[TD]Original[/TD]
[TD]A>Z[/TD]
[TD]Z>A[/TD]
[TD]Swapped[/TD]
[/TR]
[TR]
[TD]A1[/TD]
[TD]22.05[/TD]
[TD]-427.85[/TD]
[TD]661[/TD]
[TD]22.05[/TD]
[/TR]
[TR]
[TD]A2[/TD]
[TD]-7.05[/TD]
[TD]-232[/TD]
[TD]22.05[/TD]
[TD]-7.05[/TD]
[/TR]
[TR]
[TD]A3[/TD]
[TD]661[/TD]
[TD]-20.75[/TD]
[TD]6.2[/TD]
[TD]661[/TD]
[/TR]
[TR]
[TD]A4[/TD]
[TD]-232[/TD]
[TD]-7.05[/TD]
[TD]-1.6[/TD]
[TD]-232[/TD]
[/TR]
[TR]
[TD]A5[/TD]
[TD]-20.75[/TD]
[TD]-1.6[/TD]
[TD]-7.05[/TD]
[TD]-20.75[/TD]
[/TR]
[TR]
[TD]A6[/TD]
[TD]6.2[/TD]
[TD]6.2[/TD]
[TD]-20.75[/TD]
[TD]6.2[/TD]
[/TR]
[TR]
[TD]A7[/TD]
[TD]-427.85[/TD]
[TD]22.05[/TD]
[TD]-232[/TD]
[TD]-1.6[/TD]
[/TR]
[TR]
[TD]A8[/TD]
[TD]-1.6[/TD]
[TD]661[/TD]
[TD]-427.85[/TD]
[TD]-427.85[/TD]
[/TR]
[TR]
[TD]Sum(A1:A8)[/TD]
[TD]-3.42E-14[/TD]
[TD]0.00[/TD]
[TD]0.00[/TD]
[TD]0.00[/TD]
[/TR]
</tbody>[/TABLE]
Any idea how this happens?
[TABLE="class: grid, width: 500, align: left"]
<colgroup><col><col span="4"></colgroup><tbody>[TR]
[TD]Cell[/TD]
[TD]Original[/TD]
[TD]A>Z[/TD]
[TD]Z>A[/TD]
[TD]Swapped[/TD]
[/TR]
[TR]
[TD]A1[/TD]
[TD]22.05[/TD]
[TD]-427.85[/TD]
[TD]661[/TD]
[TD]22.05[/TD]
[/TR]
[TR]
[TD]A2[/TD]
[TD]-7.05[/TD]
[TD]-232[/TD]
[TD]22.05[/TD]
[TD]-7.05[/TD]
[/TR]
[TR]
[TD]A3[/TD]
[TD]661[/TD]
[TD]-20.75[/TD]
[TD]6.2[/TD]
[TD]661[/TD]
[/TR]
[TR]
[TD]A4[/TD]
[TD]-232[/TD]
[TD]-7.05[/TD]
[TD]-1.6[/TD]
[TD]-232[/TD]
[/TR]
[TR]
[TD]A5[/TD]
[TD]-20.75[/TD]
[TD]-1.6[/TD]
[TD]-7.05[/TD]
[TD]-20.75[/TD]
[/TR]
[TR]
[TD]A6[/TD]
[TD]6.2[/TD]
[TD]6.2[/TD]
[TD]-20.75[/TD]
[TD]6.2[/TD]
[/TR]
[TR]
[TD]A7[/TD]
[TD]-427.85[/TD]
[TD]22.05[/TD]
[TD]-232[/TD]
[TD]-1.6[/TD]
[/TR]
[TR]
[TD]A8[/TD]
[TD]-1.6[/TD]
[TD]661[/TD]
[TD]-427.85[/TD]
[TD]-427.85[/TD]
[/TR]
[TR]
[TD]Sum(A1:A8)[/TD]
[TD]-3.42E-14[/TD]
[TD]0.00[/TD]
[TD]0.00[/TD]
[TD]0.00[/TD]
[/TR]
</tbody>[/TABLE]