Jump to content

degreesK

Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Everything posted by degreesK

  1. [ahh forget it.] [This message has been edited by degreesK (edited 11-15-2000).]
  2. Oh yeah, the function above usually deviates around the ~60th or so iteration if there's an accuracy problem. We just double checked 20 000 iterations and both the PC and the Mac gave the same results. Using Visual C++ 6 on the PC and Codewarrior Pro 6 on the Mac.
  3. With the help of a friend with a Mac I've managed to get the following chaotic function to give the same results on both Mac and PC for doubles. Wasn't able to get the same results when using floats. PC gives the same results on AMD/Intel and Win98/2000. #include <stdio.h> #include <float.h> int main() { float f; double d; int i; f = 0.5; d = 0.5; for (i = 1; i <= 200; i++) { f = 3.8f * f / (1.0f / (1.0f - f)); d = 3.8 * d / (1.0 / (1.0 - d)); if (i % 10 == 0) printf ("%10d %20.5f %20.5f\n", i, f, d); } getchar(); } after the 200th iteration the result is .91816 on both PC and Mac for the double ( d ). I'll try getting square roots working next.
  4. <BLOCKQUOTE>quote:</font><HR>Originally posted by Big Time Software: degreesK, the problem was first discovered between an Intel PIII and a AMD chip. If you know of some way to synch the two please give Charles an email about this (charles@battlefront.com). <HR></BLOCKQUOTE> The project i've been working on for the last year has been using the method of syncronisation you were trying. Nothing special need be done to sync AMD w/Intel in my experience. I just double checked using a chaotic function on both an Intel Celeron 400 and a AMD Thunderbird 800. Results will very depending on whether you use float or double, optimisations on or off, set the _controlfp(...) rounding or precision, etc. The results are always consistant from between CPUs however. ie: both the Thunderbird and Celeron give the same result using an executable compiled with the same options. This is under Windows 2000 using Visual C++ 6.
  5. I think the variance is likely between PowerPC and AMD/Intel. I know it is possible to do syncronization between AMD and Intel x86 platforms. PowerPC must do something different. IEEE-754 doesn't specify the internal precision of operations only the precision of fetch/store and the rounding mode. Therefor, two implementations could both be IEEE-754 compliant and still give different results.
×
×
  • Create New...