This C++ class provides enhanced resistance to overflow and underflow errors in comparison to double data type.
Luckily, I stumbled upon Superdouble - a free and open source C++ class that does an excellent job of mitigating these issues. With just a single header file, Superdouble creates an object that consists of a number represented in scientific notation. For instance, 5.2 x 10^28, where the mantissa (5.2) is a long double, and the exponent (28) is an integer.
What's really impressive about Superdouble is that it grants the number the same precision as a long double while allowing the exponent to take much greater values; this significantly reduces the chance of overflows or underflows.
In my experience, basic operators like addition, subtraction, multiplication, division, and unary operations work well in Superdouble. All in all, I would recommend Superdouble to anyone who wants to increase the accuracy of their calculations and improve their work with phylogenetic data.
Version 1.0: N/A