Logo by tomot - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Visit us on facebook
 
*
Welcome, Guest. Please login or register. March 29, 2024, 02:57:52 PM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: How much more useable precision will I get using quad precision?  (Read 2478 times)
0 Members and 1 Guest are viewing this topic.
Duncan C
Fractal Fanatic
****
Posts: 348



WWW
« on: March 06, 2010, 04:44:47 AM »

My app, FractalWorks, currently uses double precision (64 bit) floating point. This is the native precision in the floating point hardware on modern Intel processors, so it is quite fast.

I have been thinking about adding support for quad precision (128 bit). That will slow down calculations, but the math libraries support it, and it will still use hardware floating point - it will just do multiple operations for each quad primitive.

Have any of you worked with 128 bit floating point, and can you give me an idea of how many more useable decimal places this will give me?

Currently I can calculate Mandelbrot fractals with a width of around 6E-14 before the cumulative rounding errors cause the resulting fractal to fall apart completely. Somewhere around 2e-13 the 3D shape (based on DE values) starts to show a striped texture that tells me I am getting close to the limit.

How much of an improvement can I expect by converting to quad precision?

I have double precision data structures peppered throughout my code, so making it use quad precision is a pretty big job - especially if I want to make it a checkbox option (since double precision is much faster.)

My app has logic to do boundary following, identify symmetric areas of a plot and only render the unique bits, it cuts the plot into chunks and gives those chunks to "worker threads" for multi-threaded rendering, etc. All of those features pass around data structures that are currently double precision, and the files are saved to disk using doubles. Thus, it's not a simple matter to change a couple of variables to a different type and "let 'er rip".


Duncan C
Logged

Regards,

Duncan C
Botond Kósa
Fractal Lover
**
Posts: 233



WWW
« Reply #1 on: April 15, 2010, 12:16:56 PM »

Do you mean using two doubles to store the high and low part of a floating point number, the way it is described in this topic:

http://www.fractalforums.com/programming/%28java%29-double-double-library-for-128-bit-precision/

That isn't exactly IEEE quad precision, because it has only 104 bits of significand instead of 112. Nevertheless, it is quite useful for fractal calculation. I implemented a double-double library in my Mandelbrot generator, and it allows zooming about twice as deep (because it has twice as many significand bits), while being about 10x slower than double precision. It is still 4x faster than arbitrary (software-based fix point) precision though.

An interesting side-effect is mentioned in that topic:
Quote
Even though the double-double has less precision than the quad-precision, it is able to store numbers Quad-precision can't. Consider this number:
1.00000000000000000000000000000000001
which in Quad-precision would just be 1.0, but can be expressed in double-double precision by the tuple (1.0, 1.0-45})

This allows to zoom to the points [0,1] and [0,-1] more deeply. These complex numbers have orbits with a period of 3 ([0,1],[-1,1],[0,0] and [0,-1],[-1,1],[0,0] respectively) and all iterations result in complex numbers with real and imaginary parts of 0, 1, or -1, hence the high part of the double-double representations will always be 0, 1, or -1, and the low part can be arbitrarily small (it is only limited by the minimum exponent of double, -1023).

Botond
Logged

Check out my Mandelbrot set explorer:
http://web.t-online.hu/kbotond/mandelmachine/
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
High Precision Deep Zoom e+56 Movies Showcase (Rate My Movie) fractalwizz 1 1355 Last post August 17, 2008, 03:43:05 PM
by cKleinhuis
Julia set flower, at the limit of double precision Images Showcase (Rate My Fractal) Duncan C 1 2028 Last post January 11, 2010, 12:59:55 PM
by Nahee_Enterprises
Double Precision CUDA GTX 200 OpenGL GLSL Fractal Programs mrrgu 3 9248 Last post January 06, 2010, 08:39:16 AM
by Snakehand
Cross platform with infinite precision Mandelbulb Implementation cortexman 1 4360 Last post January 17, 2010, 04:41:29 AM
by cortexman
Cool resource: emulated quad-precision floats in glsl Programming laser blaster 2 3200 Last post April 06, 2013, 01:25:46 AM
by cKleinhuis

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.244 seconds with 27 queries. (Pretty URLs adds 0.012s, 2q)