Re: random roundoff?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]




On Apr 23, 2011, at 9:54 PM, Michael D. Berger wrote:

On my CentOS 5 box, in a C++ program that does much arithmetic,
including numerous matrix multiplications, I have a situation in
in which the result depends on the nature of nearby I/O.  Thus,
with all arithmetic done with type double, and where values
are mostly in the range [-1.0e0,+1.0e0]  or nearby, I do:

  cerr << "some stuff" << endl;
  mat3 = matmult(mat1,mat2);

I get a difference of the order 1.0e-15 depending on whether the
cerr line does or does not end in "endl" as shown.

I am imagining that there is some "randomness" in the roundoff
that depends on the I/O situation.  Is this credible?  Any other
suggestions?

Thanks for your help,
Mike.

Mike, I think I'm understanding your problem. This just sounds like a floating point rounding issue.

You've read the floating point bible already?

Todd
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux