libtommath
« Back to VersTracker
Description:
C library for number theoretic multiple-precision integers
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: c-library mathematics cryptography big-integer number-theory
Install: brew install libtommath
About:
Libtommath is a portable and efficient C library for number theoretic multiple-precision integers. It provides routines for arithmetic on large integers, supporting operations like addition, multiplication, and modular exponentiation. Its value lies in being a standalone dependency for applications requiring high-precision math without relying on larger, more complex libraries.
Key Features:
  • Portable C code with no dependencies
  • Comprehensive set of arithmetic and number theoretic functions
  • Configurable memory allocation
  • Small and embeddable codebase
Use Cases:
  • Cryptographic implementations requiring large integer math
  • Scientific computing applications
  • Embedded systems development
Alternatives:
  • GMP (GNU Multiple Precision Arithmetic Library) – GMP is often faster but has more complex dependencies and a LGPL license, whereas Libtommath is public domain and simpler to embed.
Version History
Detected Version Rev Change Commit