Metadata-Version: 2.3
Name: bm.integer-math
Version: 0.5.1
Summary: ### Boring Math Library - integer mathematics
Keywords: math,integer,number-theory,lcm,gcd,primes,comb,combinations,combinatorics
Author-email: "Geoffrey R. Scheller" <geoffrey@scheller.com>
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Pytest
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Dist: dtools.circular-array >= 3.9.1, < 3.10
Requires-Dist: dtools.fp >= 1.4.0, < 1.5
Requires-Dist: pytest >=8.3.2 ; extra == "tests"
Project-URL: Changelog, https://github.com/grscheller/bm-integer-math/blob/main/CHANGELOG.md
Project-URL: Documentation, https://grscheller.github.io/boring-math-docs/integer-math
Project-URL: Source, https://github.com/grscheller/bm-integer-math
Provides-Extra: tests

# Boring Math Library - Integer math package

Package of Python integer math libraries.

* [Number theory module](#number-theory)
* [Combinatorics module](#combinatorics)

* **Repositories**
  * [bm.integer-math][1] project on *PyPI*
  * [Source code][2] on *GitHub*
* **Detailed documentation**
  * [Detailed API documentation][3] on *GH-Pages*

This project is part of the
[Boring Math][4] **bm.** namespace project.

### Number Theory Module: 

* Number Theory
  * Function **gcd**(int, int) -> int
    * greatest common divisor of two integers
    * always returns a non-negative number greater than 0
  * Function **lcm**(int, int) -> int
    * least common multiple of two integers
    * always returns a non-negative number greater than 0
  * Function **coprime**(int, int) -> tuple(int, int)
    * make 2 integers coprime by dividing out gcd
    * preserves signs of original numbers
  * Function **iSqrt**(int) -> int
    * integer square root
    * same as math.isqrt
  * Function **isSqr**(int) -> bool
    * returns true if integer argument is a perfect square
  * Function **primes**(start: int, end: int) -> Iterator[int]
    * now using *Wilson's Theorem*
  * Function **legendre_symbol**(a: int, p: int) ->datastructures int
    * where `p > 2` is a prime number
  * Function **jacobi_symbol**(a: int, n: int) -> int
    * where `n > 0`

---

### Combinatorics Module: **bm.integer_math.combinatorics**

* Combinatorics 
  * Function **comb**(n: int, m: int) -> int
    * returns number of combinations of n items taken m at a time
    * pure integer implementation of math.comb

---

[1]: https://pypi.org/project/bm.integer-math/
[2]: https://github.com/grscheller/bm-integer-math/
[3]: https://grscheller.github.io/boring-math-docs/integer-math/
[4]: https://github.com/grscheller/boring-math-docs

