GMP is the GNU Multiple Precision Arithmetic Library. It’s an LGPL big-number library. It does arithmetic on integers, rational numbers, and floating-point numbers with size and precision limited only by available memory.
http://gmplib.org/
Notes at this site inform you that gcc sometimes produces errors - so you must test thoroughly. But of course, you knew that, didn’t you? ::))
A test is provided with the build.