How can I support very big integers?

This page summarizes the projects mentioned and recommended in the original post on /r/ProgrammingLanguages

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • ric-script

    A modern scripting language; implemented in old school C, yacc & flex

    I am developing an interpreter for a language which currently use signed 32-bit values for integers. I was thinking about supporting big numbers, like 1024 bit values. I have implemented everything I C. Does anyone know of any good libraries in C I could use for this? Preferably I search for smaller projects I can build from source to incorporate in the interpreter. I have googled gmp but it’s source is 19 MB and supports FFT and stuff. I would like something that just supports basic arithmetic; multiplication, addition etc.

  • infint

    Arbitrary-Precision Integer Arithmetic

    Else maybe check this. It's a header-file only BigInt library. I don't have time to look into the algorithm in detail right now, but it seems readable

  • 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.

  • BigInt

    C library for operations with integers of arbitrary size (by dandclark)

  • seed7

    Source code of Seed7

    GMP was already mentioned. I did also write a bigInteger library for Seed7. The file big_rtl.c is written in C and has 7892 lines. It is licensed with the LGPL. It has been written to fit to Seed7. So several Seed7 specific things are used in it. E.g.: Big integers are converted to and from the UTF-32 strings of Seed7.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts