Skip to content
Dave Hudson edited this page May 9, 2017 · 30 revisions

c8 (Calculate) Library

c8 (calculate) is designed as an easy-to-use arbitrary precision (big number) maths library that has no dependencies other than the standard C++ libraries provided with gcc or clang.

The design of c8 emphasizes ease of use, but it is intended to be used in high performance applications. Comprehensible software should not have to be intrinsically slow!

c8 provides supports for three primary classes of numbers:

  • c8::natural provides natural numbers (between zero and +infinity).
  • c8::integer provides integers (between -infinity and +infinity).
  • c8::rational provides rational numbers (all ratios between -infinity and +infinity).

Each class supports functions to construct objects from, and to export object values to, standard C++ value types.

Between the three classes it's possible to represent all the interesting numbers that a computer can directly represent, since floating point numbers are a subset of the set of rational numbers. By using rationals instead of floating point it's also much easier to avoid some types of computational error.

Documentation

Documentation to use this project. See: Documentation

FAQ

Questions and answers about the project. See: FAQ

License

The code is licensed under a 3-clause BSD license. See: FAQ

Implementation

It is written in C++14 and makes extensive use of features that do not appear prior to C++11. It does use std::make_unique<>, and that's not part of the C++11 standard, but it's easy enough to find an implementation that works in C++11 should the need arise.

Development Notes

Part of the aim of this library project is to document the development process. See: Dev Notes

Contact

Please feel free to raise issues via the issue tracker, or tweet the author (Dave Hudson) via @hashingitcom

Contributing

Software is best as a collaborative effort, so if you'd like to suggest, or make, improvements then please feel free!

Clone this wiki locally