intops

Core arithmetic operations for CPU-sized integers.

Pure Nim score 15/100 · tests present · no docs generated

Summary

Latest Version 1.0.8
License MIT or Apache License 2.0
CI Status Failing
Downloads 0
Last Indexed 2026-07-21 05:27

Authors

  • Constantine Molchanov

Installation

nimble install intops
choosenim install intops
git clone https://github.com/vacp2p/nim-intops

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
intops - - - - - -

Dependencies

Package Version Optional
nim >= 1.6.16", "unittest2 >= 0.2.5 No

Source

Repository https://github.com/vacp2p/nim-intops
Homepage https://github.com/vacp2p/nim-intops
Registry Source nimble_official

README

intops

intops is a Nim library with ready-to-use arithmetic operations for integers. It is intended to be used as a foundation for other libraries that rely on manipulations with big integers, e.g. cryptography libraries.

intops offers a clean high-level API that hides the implementation details of an operation behind a dispatcher which tries to offer the best implementation for the given environment. However, you can override the dispatcher's choice and call any implementation manually.

intops aims to satisfy the following requirements:

  1. Offer a complete set of arithmetic primitives on signed and unsigned integers necessary to build bignum and cryptography-focuced libraries: addition, subtraction, multiplication, division, and composite operations.
  2. Support 64- and 32-bit integers.
  3. Support 64- and 32-bit CPUs.
  4. Support Windows, Linux, and macOS.
  5. Support GCC-compatible and MSVC compilers.
  6. Support runtime and compile time usage.
  7. Offer the best implementaion for each combination of CPU, OS, C compiler, and usage time.
  8. Allow the user to pick the implementation manually.

License

Licensed and distributed under either of

  • MIT license: LICENSE-MIT or http://opensource.org/licenses/MIT

or

  • Apache License, Version 2.0, (LICENSE-APACHEv2 or http://www.apache.org/licenses/LICENSE-2.0)

at your option. This file may not be copied, modified, or distributed except according to those terms.