<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jun 17, 2016 at 2:47 PM, Paul Urbanczyk <span dir="ltr"><<a href="mailto:gomer@stanford.edu" target="_blank">gomer@stanford.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello all,<br>
<br>
I'm using PETSc's "MatMult" function - MatMult(Mat A, Vec x, Vec y) - to do a matrix-vector multiply. The Matrix, A, is anti-symmetric, and the vector, x, is uniform. Thus, the resulting vector, y, should be all zeros.<br>
<br>
The output I'm seeing typically looks like the following:<br>
<br>
Vec Object: Vec_0x20b2000_2 1 MPI processes<br>
type: mpi<br>
Process [0]<br>
0.<br>
0.<br>
-2.08167e-17<br>
-2.08167e-17<br>
-2.08167e-17<br>
-2.08167e-17<br>
-2.08167e-17<br>
-2.08167e-17<br>
0.<br>
0.<br>
<br>
Now, I know that -2.08167e-17 is machine zero, but I'm a bit confused why a few of the entries would be exactly zero while others are "machine zero." I would expect them all to be either exactly zero, or machine zero, but not a mixture. Do you have any idea why this might be?<br></blockquote><div><br></div><div>The order of addition matter for roundoff errors.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks for your help!<span class="HOEnZb"><font color="#888888"><br>
<br>
-Paul<br></font></span></blockquote></div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>