views:

221

answers:

2

I'm using long double in a C program to compute 2D images of the Mandelbrot Set but wish to have further precision to zoom deeper.

Are there any performance gains to be had from an arbitrary precision maths library that can restrict the amount of precision as required, rather than leaping from long double precision straight into arbitrary precision?

Which is the fastest of the arbitrary precision maths libraries?

+4  A: 

'fastest' is going to be somewhat dependent on your platform and intended use.

The MPFR Library

GMP

This wiki article contains links to several libraries.

Mitch Wheat
+1; mpfr is the gold standard.
Stephen Canon
I've been using MPFR since your answer. To use, it is much like how I remember MAPM to be, which I used a few years ago on a much older computer. Back then, MAPM on old 32bit hardware was unusable for generating Mandelbrot images even without zooming in at all. Now, on much faster 64bit hardware, MPFR is definitely usable. Poor comparison I know... ... ... ...
James Morris
+2  A: 

If you need more precision, see qd at http://crd.lbl.gov/~dhbailey/mpdist/.

lhf
It only seems to mention C++, not C as this question is tagged.
James Morris
qd does have a C API. The core code is in C++.
lhf