Welcome to Fractal Forums

Fractal Software => Programming => Topic started by: laser blaster on April 05, 2013, 10:48:58 PM




Title: Cool resource: emulated quad-precision floats in glsl
Post by: laser blaster on April 05, 2013, 10:48:58 PM
This is a really helpful resource for anyone who wants to implement quad-precision floats in glsl, or any language, for that matter.

This article shows how to emulate double floats with two single floats (and even gives glsl code!), but by using native doubles instead of singles, you can easily extend the technique to allow for quad precision. http://www.thasler.org/blog/?p=93 (http://www.thasler.org/blog/?p=93)

If you're going to give it a try, then you should also read these:
http://www.thasler.org/blog/?p=118 (http://www.thasler.org/blog/?p=118)
http://www.thasler.org/blog/?p=133 (http://www.thasler.org/blog/?p=133)

Now if you want to get even more extreme, the author also wrote an article on emulating quad-precision with 4 single floats, and if you use native doubles with this technique, you can achieve octal precision. ;D
http://www.thasler.org/blog/?p=143 (http://www.thasler.org/blog/?p=143)

With that resource, I was able to implement quad-precision into my fractal explorer in 15 minutes flat. It was a simple matter of copy/pasting, changing some types, and replacing operators with function calls.

Big thanks to the author, Henry!

I'm worried that quad-precision might be old news to all you pros, but, at the very least, this could help someone who's new to fractal programming.


Title: Re: Cool resource: emulated quad-precision floats in glsl
Post by: Syntopia on April 06, 2013, 12:25:01 AM
Yes, it is a great series of blog posts.

His emulated double precision libraries are included with Fragmentarium - I wrote a bit about my experiences with them here: http://blog.hvidtfeldts.net/index.php/2012/07/double-precision-in-opengl-and-webgl/


Title: Re: Cool resource: emulated quad-precision floats in glsl
Post by: cKleinhuis on April 06, 2013, 01:25:46 AM
thank you for the links, i was searching for something similar!