|
From: Richard C. W. <drsavage@q.com> - 2010-06-04 17:02:35
|
Kein-Hong and Ben: Looking at the user's manual for the programming language of the second test, I see that the calculations were made using the PC's "80-bit, extended real" format. I believe that means that the mantissa is kept as an 80-bit number. It appears that the other formats available on the PC's FPU are 64-bit for "double precision" and 32-bit for "single precision". Using doubles instead of floats in the MinGW version of the test program, I get the following results: Pixel_X = 100 x = 1.00000140625000000000 1.000001406250000 Pixel_X = 101 x = 1.00000142031250010000 1.000001420312500 Pixel_X = 102 x = 1.00000143437500010000 1.000001434375000 Pixel_X = 103 x = 1.00000144843749990000 1.000001448437500 Pixel_X = 104 x = 1.00000146250000000000 1.000001462500000 Pixel_X = 105 x = 1.00000147656250000000 1.000001476562500 Pixel_X = 106 x = 1.00000149062500010000 1.000001490625000 Pixel_X = 107 x = 1.00000150468749990000 1.000001504687500 Pixel_X = 108 x = 1.00000151875000000000 1.000001518750000 Pixel_X = 109 x = 1.00000153281250000000 1.000001532812500 Pixel_X = 110 x = 1.00000154687500010000 1.000001546875000 Pixel_X = 111 x = 1.00000156093749990000 1.000001560937500 Pixel_X = 112 x = 1.00000157500000000000 1.000001575000000 Pixel_X = 113 x = 1.00000158906250000000 1.000001589062500 Pixel_X = 114 x = 1.00000160312500010000 1.000001603125000 Pixel_X = 115 x = 1.00000161718749990000 1.000001617187500 Pixel_X = 116 x = 1.00000163125000000000 1.000001631250000 Pixel_X = 117 x = 1.00000164531250000000 1.000001645312500 Pixel_X = 118 x = 1.00000165937500010000 1.000001659375000 Pixel_X = 119 x = 1.00000167343749990000 1.000001673437500 which are pretty much identical to the third column. So in this test case, it was just a difference in the precision of the calculations. In my Mandelbrot program, I actually rewrote it to use doubles, rather than floats, and I didn't see much difference. Perhaps I did something wrong, or perhaps it only makes a small difference. Regardless, mystery solved. Thanks for your help. Regards, Rich Wagner |