{"slug": "gmp", "name": "GMP", "category": "dev-libs", "category_name": "Libraries and frameworks", "description": "", "recommenders": 4, "commenters": 4, "warners": 0, "score": 3.448, "rising": -1.31, "first": "2026-01-06", "latest": "2026-07-19", "why": "In practice when I've wanted extended precision, I've just used GMP or a language with bignums.", "why_is_quote": true, "has_verdict": false, "sentiment": {"recommend": 4, "neutral": 0, "compare": 0, "warn": 0}, "spark": [0, 0, 1, 2, 0, 0, 0, 0, 1, 0, 0, 0], "listed": true, "loved": [], "caveat": "", "short_quote": "In practice when I've wanted extended precision, I've just used GMP or a language with bignums.", "kind": "", "icon": false, "domain": "gmplib.org", "github_repo": null, "official_url": "https://gmplib.org", "pricing": "", "aliases": ["GMP"], "verdict": null, "praise": [{"label": "", "summary": "", "quotes": [{"id": 783456000, "item_id": 48966000, "url": "https://news.ycombinator.com/item?id=48966000", "by": "wormslayer666", "date": "2026-07-19", "version": null, "stance": "recommend", "quote": "They've got some fairly approachable manual pages", "excerpt": "A bit tangential, but the folks behind the GNU Multiple Precision Library (GMPLib) have the problem of choosing algorithms more or less fleshed out. They've got some fairly approachable manual pages[1] for the various algorithms they use as operand sizes scale up, where Karatsuba is only the second of six options in terms of operational complexity. [1] https://gmplib.org/manual/Multiplication-Algorithms", "context": "", "use_case": "Big-number arithmetic library", "switched_from": "", "story": "Mathematicians still don't know the fastest way to multiply numbers"}, {"id": 749656080, "item_id": 46853505, "url": "https://news.ycombinator.com/item?id=46853505", "by": "stackghost", "date": "2026-02-01", "version": null, "stance": "recommend", "quote": "All that to say GMP is a great library.", "excerpt": ">GMP When I was a teenager I downloaded some pirated games and reverse-engineered the installer/unpacker and discovered it used UHARC, which seemed to be almost magic in how well it could compress data compared to winzip. Knowing absolutely nothing about compression algorithms or information theory, I decided I'd write my own compression algorithm, as one does. I reasoned that since any computer value can be represen", "context": "", "use_case": "Arbitrary-precision math", "switched_from": "", "story": "Building Your Own Efficient uint128 in C++"}, {"id": 749635841, "item_id": 46852240, "url": "https://news.ycombinator.com/item?id=46852240", "by": "throwaway81523", "date": "2026-02-01", "version": null, "stance": "recommend", "quote": "In practice when I've wanted extended precision, I've just used GMP or a language with bignums.", "excerpt": "GCC alread has this for x64, I thought. https://gcc.gnu.org/onlinedocs/gcc/_005f_005fint128.html RISC-V has no carry bit and this whole thing becomes awkward. I am under the impression that boost::multiprecision has specialized templates for 128 and 256 bit math, but maybe I'm wrong. In practice when I've wanted extended precision, I've just used GMP or a language with bignums. I would expect the best x86 machine cod", "context": "", "use_case": "", "switched_from": "", "story": "Building Your Own Efficient uint128 in C++"}, {"id": 744337569, "item_id": 46521098, "url": "https://news.ycombinator.com/item?id=46521098", "by": "tntxtnt", "date": "2026-01-06", "version": null, "stance": "recommend", "quote": "Should be under 5 seconds in C or C++ using gmp", "excerpt": "From doing MR rounds in pure Python: https://github.com/textonly/git-prime/blob/main/git-prime-commit. Should be under 5 seconds in C or C++ using gmp", "context": "", "use_case": "Big-integer arithmetic library", "switched_from": "", "story": "Show HN: Number theoretic compliance stack for Git"}]}], "caveats": [], "who": [], "tags": [], "use_cases": ["big-number arithmetic library", "arbitrary-precision math", "big-integer arithmetic library"], "compared": [], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=46849154", "title": "Building Your Own Efficient uint128 in C++", "mentions": 2}, {"url": "https://news.ycombinator.com/item?id=48895861", "title": "Mathematicians still don't know the fastest way to multiply numbers", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=46454369", "title": "Show HN: Number theoretic compliance stack for Git", "mentions": 1}], "sentiment_by_month": {"2025-11": {}, "2025-12": {}, "2026-01": {"recommend": 1}, "2026-02": {"recommend": 2}, "2026-03": {}, "2026-04": {}, "2026-05": {}, "2026-06": {}, "2026-07": {"recommend": 1}, "2026-08": {}, "2026-09": {}, "2026-10": {}}, "versions": [], "version_unnamed": 0, "family_ref": null, "runs_on": null, "lines": [], "quotes": [{"id": 783456000, "item_id": 48966000, "url": "https://news.ycombinator.com/item?id=48966000", "by": "wormslayer666", "date": "2026-07-19", "version": null, "stance": "recommend", "quote": "They've got some fairly approachable manual pages", "excerpt": "A bit tangential, but the folks behind the GNU Multiple Precision Library (GMPLib) have the problem of choosing algorithms more or less fleshed out. They've got some fairly approachable manual pages[1] for the various algorithms they use as operand sizes scale up, where Karatsuba is only the second of six options in terms of operational complexity. [1] https://gmplib.org/manual/Multiplication-Algorithms", "context": "", "use_case": "Big-number arithmetic library", "switched_from": "", "story": "Mathematicians still don't know the fastest way to multiply numbers"}, {"id": 749656080, "item_id": 46853505, "url": "https://news.ycombinator.com/item?id=46853505", "by": "stackghost", "date": "2026-02-01", "version": null, "stance": "recommend", "quote": "All that to say GMP is a great library.", "excerpt": ">GMP When I was a teenager I downloaded some pirated games and reverse-engineered the installer/unpacker and discovered it used UHARC, which seemed to be almost magic in how well it could compress data compared to winzip. Knowing absolutely nothing about compression algorithms or information theory, I decided I'd write my own compression algorithm, as one does. I reasoned that since any computer value can be represen", "context": "", "use_case": "Arbitrary-precision math", "switched_from": "", "story": "Building Your Own Efficient uint128 in C++"}, {"id": 749635841, "item_id": 46852240, "url": "https://news.ycombinator.com/item?id=46852240", "by": "throwaway81523", "date": "2026-02-01", "version": null, "stance": "recommend", "quote": "In practice when I've wanted extended precision, I've just used GMP or a language with bignums.", "excerpt": "GCC alread has this for x64, I thought. https://gcc.gnu.org/onlinedocs/gcc/_005f_005fint128.html RISC-V has no carry bit and this whole thing becomes awkward. I am under the impression that boost::multiprecision has specialized templates for 128 and 256 bit math, but maybe I'm wrong. In practice when I've wanted extended precision, I've just used GMP or a language with bignums. I would expect the best x86 machine cod", "context": "", "use_case": "", "switched_from": "", "story": "Building Your Own Efficient uint128 in C++"}, {"id": 744337569, "item_id": 46521098, "url": "https://news.ycombinator.com/item?id=46521098", "by": "tntxtnt", "date": "2026-01-06", "version": null, "stance": "recommend", "quote": "Should be under 5 seconds in C or C++ using gmp", "excerpt": "From doing MR rounds in pure Python: https://github.com/textonly/git-prime/blob/main/git-prime-commit. Should be under 5 seconds in C or C++ using gmp", "context": "", "use_case": "Big-integer arithmetic library", "switched_from": "", "story": "Show HN: Number theoretic compliance stack for Git"}]}