1
I Use This!
Activity Not Available

Project Summary

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. I made a "Superdouble" 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 (<<, , +, -, /, +=, =, -=, /=, ++, --) and natural log have all been written to work without requiring conversion back to double. There are also functions to convert from and to double.

I'm a biologist not trained in computer science, so the code is naively-written though useful. If you have suggestions to improve it, please contact me (bcomeara@nescent.org) and perhaps sign up as a developer.

Tags

cplusplus double overflow underflow

In a Nutshell, superdouble...

 No code available to analyze

Open Hub computes statistics on FOSS projects by examining source code and commit history in source code management systems. This project has no code locations, and so Open Hub cannot perform this analysis

Is this project's source code hosted in a publicly available repository? Do you know the URL? If you do, click the button below and tell us so that Open Hub can generate statistics! It's fast and easy - try it and see!

Add a code location

GNU General Public License v2.0 or later
Permitted

Commercial Use

Modify

Distribute

Place Warranty

Forbidden

Sub-License

Hold Liable

Required

Distribute Original

Disclose Source

Include Copyright

State Changes

Include License

These details are provided for information only. No information here is legal advice and should not be used as such.

All Licenses

This Project has No vulnerabilities Reported Against it

Did You Know...

  • ...
    Black Duck offers a free trial so you can discover if there are open source vulnerabilities in your code
  • ...
    data presented on the Open Hub is available through our API
  • ...
    55% of companies leverage OSS for production infrastructure
  • ...
    anyone with an Open Hub account can update a project's tags

 No code available to analyze

Open Hub computes statistics on FOSS projects by examining source code and commit history in source code management systems. This project has no code locations, and so Open Hub cannot perform this analysis

Is this project's source code hosted in a publicly available repository? Do you know the URL? If you do, click the button below and tell us so that Open Hub can generate statistics! It's fast and easy - try it and see!

Add a code location

Community Rating

Be the first to rate this project
Click to add your rating
   Spinner
Review this Project!
Sample ohloh analysis