Superdouble

A C++ class more robust to overflow and underflow errors than double
Download

Superdouble Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Brian O'Meara
  • Publisher web site:
  • http://www.brianomeara.info/
  • Operating Systems:
  • Mac OS X
  • File Size:
  • 1 KB

Superdouble Tags


Superdouble Description

A C++ class more robust to overflow and underflow errors than double Overflows and underflows can be an issue in some calculations (such as calculating the probability of phylogenetic data). There are arbitrary precision libraries (notably GMP), but sometimes the use of them may be overkill. Superdouble is a free and open source C++ class consisting of a single header file. An object of that class is basically a number in scientific notation (i.e., 5.2 x 10^28), where the mantissa (5.2 in the example) is a long double and the exponent (28) is an integer. This allows the number to have the same precision as a long double but have an exponent that can take values much greater in magnitude than for a normal long double, dramatically reducing the chance of overflow or underflow. Basic operators (


Superdouble Related Software