|
From: KHMan <kei...@gm...> - 2010-06-04 17:28:41
|
Richard C. Wagner wrote: > 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. [snip] Nope, and at this point I'd recommend an hour or two of Googling and Wikipedia-ing on floating point number formats thereabouts. :-) > [snip] > 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. doubles give another 29 bits of precision, about 9 decimal digits. You'd zoom in much more in the high-dwell areas. It's a big difference -- floats won't work at all at high zooms! You need doubles or better at high zooms. On most x86 CPUs today, I don't think floats is any faster than doubles, so you might as well stick to doubles. You should also try compiling for SSE2/3, I suspect there is a speed boost lurking in there somewhere... -- Cheers, Kein-Hong Man (esq.) Kuala Lumpur, Malaysia |