Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the fastest semi-arbitrary precision math library? [closed]

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?

like image 810
James Morris Avatar asked Dec 30 '09 16:12

James Morris


2 Answers

'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.

like image 92
Mitch Wheat Avatar answered Sep 19 '22 18:09

Mitch Wheat


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

like image 42
lhf Avatar answered Sep 21 '22 18:09

lhf