<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Apr 23, 2011, at 9:54 PM, Michael D. Berger wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On my CentOS 5 box, in a C++ program that does much arithmetic,<br>including numerous matrix multiplications, I have a situation in<br>in which the result depends on the nature of nearby I/O. Thus,<br>with all arithmetic done with type double, and where values<br>are mostly in the range [-1.0e0,+1.0e0] or nearby, I do:<br><br> cerr << "some stuff" << endl;<br> mat3 = matmult(mat1,mat2);<br><br>I get a difference of the order 1.0e-15 depending on whether the<br>cerr line does or does not end in "endl" as shown.<br><br>I am imagining that there is some "randomness" in the roundoff<br>that depends on the I/O situation. Is this credible? Any other<br>suggestions?<br><br>Thanks for your help,<br>Mike.<br></div></blockquote></div><br><div>Mike, I think I'm understanding your problem. This just sounds like a floating point rounding issue.</div><div><br></div><div>You've read the floating point bible already?</div><div><a href="http://download.oracle.com/docs/cd/E19957-01/806-3568/ncg_goldberg.html">http://download.oracle.com/docs/cd/E19957-01/806-3568/ncg_goldberg.html</a></div><div><br></div><div>Todd</div></body></html>