SaaSHub helps you find the best software and product alternatives Learn more →
Top 8 multiprecision Open-Source Projects
-
Project mention: mpmath – Python library for arbitrary-precision floating-point arithmetic | news.ycombinator.com | 2024-01-19
-
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
Measurements.jl
Error propagation calculator and library for physical measurements. It supports real and complex numbers with uncertainty, arbitrary precision calculations, operations with arrays, and numerical integration.
-
Project mention: Patriot Missile Floating point Software Problem lead to deaths 28 Americans | news.ycombinator.com | 2024-01-03
You can instead list your criteria for good number format and look at alternatives with those lenses. Floating point is designed for a good balance between dynamic range and precision, and IEEE 754 binary formats can be seen as a FP standard particularly optimized for numerical calculation.
There are several other FP formats. The most popular one is IEEE 754 minus subnormal numbers, followed by bfloat16, IEEE 754 decimal formats (formerly IEEE 854) and posits. Only first two have good hardware supports. The lack of subnormal number means that `a <=> b` can't be no longer rewritten to `a - b <=> 0` among others but is widely believed to be faster. (I don't fully agree, but it's indeed true for existing contemporary hardwares.) IEEE 754 decimal formats are notable for lack of normalization guarantee. Posits are, in some sense, what IEEE 754 would have been if designed today, and in fact aren't that fundamentally different from IEEE 754 in my opinion.
Fixed-point formats share pros and cons of finitely sized integer numbers and you should have no difficulty to analyze them. In short, they offer a smaller dynamic range compared to FP, but its truncation model is much simpler to reason. In turn you will get a varying precision and out-of-bound issues.
Rational number formats look very promising at the beginning, but they are much harder to implement efficiently. You will need a fast GCD algorithm (not Euclidean) and also have to handle out-of-bound numerators and denumerators. In fact, many rational number formats rely on arbitrary-precision integers precisely for avoiding those issues, and inherit the same set of issues---unbounded memory usage and computational overhead. Approximate rational number formats are much rarer, and I'm only aware of the Inigo Quilez's floating-bar experiment [1] in this space.
[1] https://iquilezles.org/articles/floatingbar/
Interval/ball/affine arithmetics and others are means to automatically approximate an error analysis. They have a good property of being never incorrect, but it is still really easy for them to throw up and give a correct but useless answer like [-inf, inf]. Also they are somewhat awkward in a typical procedural paradigm because comparisons will return a tri-state boolean (true, false, unsure). Nevertheless they are often useful when correctly used. Fredrik Johansson's Arb [2] is a good starting point in my opinion.
Finally you can model a number as a function that returns a successively accurate approximation. This is called the constructive or exact real number, and simultaneously most expensive and most correct. One of the most glaring problems is that an equality is not always decidable, and practical applications tend to have various heuristics to get around this fact. Amazingly enough, Android's built-in calculator is one of the most used applications that use this model [3].
-
-
-
wide-integer
Wide-Integer implements a generic C++ template for uint128_t, uint256_t, uint512_t, uint1024_t, etc.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
multiprecision related posts
- mpmath – Python library for arbitrary-precision floating-point arithmetic
- Patriot Missile Floating point Software Problem lead to deaths 28 Americans
- Lies My Calculator and Computer Told Me [pdf]
-
mpmath VS gmpy - a user suggested alternative
2 projects | 2 Aug 2023
- How can I compute the Mandelbrot Set at infinite zoom level
- How do I get more decimal places for numbers in Python?
- Beyond Automatic Differentiation
-
A note from our sponsor - SaaSHub
www.saashub.com | 17 Apr 2024
Index
What are some of the best open-source multiprecision projects? This list will help you:
Project | Stars | |
---|---|---|
1 | mpmath | 907 |
2 | cnl | 616 |
3 | Measurements.jl | 467 |
4 | arb | 455 |
5 | calc | 312 |
6 | heyoka | 189 |
7 | wide-integer | 176 |
8 | heyoka.py | 58 |