semvec/pypi-packages huggingface dataset:
bm.recursive-functions 0.6.1
Recursive Functions Package
Requires Python: >=3.12
Keywords: ackermann, fibonacci, recursive, recursive functions

# Boring Math Library - Recursive functions

The purpose of this project is to explore different ways to efficiently
implement recursive functions in Python.

## Repos and Documentation

### Repositories

- [bm.recursive-functions][1] project on *PyPI*
- [Source code][2] on *GitHub*

### Detailed documentation

- [Detailed API documentation][3] on *GH-Pages*

## Overview

- Recursive functions
  - [Ackermann Function](#ackermanns-function)
  - [Fibonacci Sequences](#fibonacci-sequences)
- CLI applications
  - [Ackermann CGI programs](#ackermann-cli-programs)

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

### Recursive functions

Computable recursive functions can be defined with previously defined or not yet
defined values. Functions defined using previously defined values having
"base cases" are called "primitively recursive functions." Not all
computable functions are primitively recursive.

#### Ackermann's Function

- Function **ackermann_list**(m: int, n: int) -> int
  - is a total computable function that is not primitive recursive
  - becomes numerically intractable after `m=4`
  - see [CLI section](#ackermann-cli-programs) below for a mathematical definition

#### Fibonacci Sequences

- Function **fibonacci**(f0: int=0, f1: int=1) -> Iterator[int]

  - returns a *Fibonacci* sequence iterator where
    - `f(0) = f0` and `f(1) = f1`
    - `f(n) = f(n-1) + f(n-2)`
  - yield defaults to `0, 1, 1, 2, 3, 5, 8, 13, 21, ...`

- Function **rev_fibonacci**(f0: int=0, f1: int=1) -> Iterator[int]

  - returns a *Reverse Fibonacci* sequence iterator where
    - `rf(0) = f0` and `rf(1) = f1`
    - `rf(n) = rf(n-1) - rf(n-2)`
      - `rf(0) = fib(-1) = 1`
      - `rf(1) = fib(-2) = -1`
      - `rf(2) = fib(-3) = 2`
      - `rf(3) = fib(-4) = -3`
      - `rf(4) = fib(-5) = 5`
  - yield defaults to `1, -1, 2, -3, 5, -8, 13, -21, ...`

______________________________________________________________________

## CLI Applications

Implemented in an OS and package build tool independent way via the
project.scripts section of pyproject.toml.

### Ackermann CLI programs

Ackermann, a student of Hilbert, discovered early examples of totally
computable functions that are not primitively recursive.

A [fairly standard][5] definition of the Ackermann function is
recursively defined for `m,n >= 0` by

```
    ackermann(0,n) = n+1
    ackermann(m,0) = ackermann(m-1,1)
    ackermann(m,n) = ackermann(m-1, ackermann(m, n-1))
```

#### CLI program **ackermann_list**

- Given two non-negative integers, evaluates Ackermann's function
- Implements the recursion via a Python array
- **Usage:** `ackerman_list m n`

______________________________________________________________________

[1]: https://pypi.org/project/bm.recursive-functions/
[2]: https://github.com/grscheller/bm-recursive-functions/
[3]: https://grscheller.github.io/boring-math-docs/recursive-functions/
[4]: https://github.com/grscheller/boring-math-docs
[5]: https://mathworld.wolfram.com/AckermannFunction.html
bm.pythagorean-triples 0.6.1
Pythagorean triples
Requires Python: >=3.12
Keywords: math, mathematics, pythagorean, triples

# Boring Math Library - Pythagorean triples

Package containing a class to generate Pythagorean triples along
with a CLI executable.

## Repos and Documentation

### Repositories

- [bm.pythagorean-triples][1] project on *PyPI*
- [Source code][2] on *GitHub*

### Detailed documentation

- [Detailed API documentation][3] on *GH-Pages*

## Overview

Geometrically, a *Pythagorean* triangle is a right triangle with
positive integer sides.

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

### Library modules

#### Pythagorean Triple Class

- Pythagorean Triple Class
  - Method `Pythag3.triples(a_start: int, a_max: int, max: Optional[int]) -> Iterator[int]`
    - Returns an iterator of tuples of primitive *Pythagorean* triples
  - A Pythagorean triple is a tuple in positive integers (a, b, c)
    - such that `a² + b² = c²`
    - `a, b, c` represent integer sides of a right triangle
    - a *Pythagorean* triple is primitive if gcd of `a, b, c` is `1`
  - Iterator finds all primitive Pythagorean Triples
    - where `0 < a_start <= a < b < c <= max` where `a <= a_max`
    - if `max` not given, find all theoretically possible triples with `a <= a_max`

______________________________________________________________________

### CLI Applications

- program [pythag3](#cli-program-pythag3)

These programs are implemented in an OS and package
build tool independent way via the `project.scripts` section of
`pyproject.toml`.

#### CLI program pythag3

- Generates primitive Pythagorean triples
- **Usage:** `pythag3 [m [n [max]]`
  - 3 args print all triples with `m <= a <= n` and `a < b < c <= max`
  - 2 args print all theoretically possible triples with `m <= a <= n`
  - 1 arg prints all theoretically possible triples with `a <= m`
  - 0 args print all triples with `3 <= a <= 100`

______________________________________________________________________

[1]: https://pypi.org/project/bm.pythagorean-triples/
[2]: https://github.com/grscheller/bm-pythagorean-triples/
[3]: https://grscheller.github.io/boring-math-docs/pythagorean-triples/
[4]: https://github.com/grscheller/boring-math-docs
bm.probability-distributions 0.7.1
Visualize probability distributions
Requires Python: >=3.12
Keywords: distribution, probability distributions, sample data

# Boring Math Libraries - Probability distributions

Package to generate and visualize probability distributions.

## Repos and Documentation

### Repos

- [bm.probability-distributions][1] project on *PyPI*
- [Source code][2] on *GitHub*

### Detailed documentation

- [Detailed API documentation][3] on *GH-Pages*

## Overview

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

Distributions can be compared to either sample or population data. Package
originally derived from Udacity exercises.

### Continuous Distributions (bm.probability_distributions.continuous)

- Normal (Gaussian): gaussian

### Discrete Distributions (bm.probability-distributions.discrete)

- Binomial: binomial

______________________________________________________________________

[1]: https://pypi.org/project/bm.probability-distributions/
[2]: https://github.com/grscheller/bm-probability-distributions/
[3]: https://grscheller.github.io/boring-math-docs/probability-distributions/
[4]: https://github.com/grscheller/boring-math-docs
bm.integer-math 0.7.1
Integer Mathematics
Requires Python: >=3.12
Keywords: comb, combinations, combinatorics, gcd, integer, lcm, math, number-theory, primes

# Boring Math Library - Integer math package

Package of Python integer math libraries.

- [Number theory](#number-theory-module): `bm.integer_math.num_theory`
- [Combinatorics](#combinatorics-module): `bm.integer_math.combinatorics`

## Repos and Documentation

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

## Modules

### 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

- Combinatorics
  - *function* comb(n: int, m: int) -> int
    - returns number of combinations of n items taken m at a time
    - pure Python implementation of math.comb
      - reasonably performant
  - *function* perm(n: int, m: int) -> int
    - returns number of permutations of n items taken m at a time
    - pure Python implementation of math.perm
      - about 5x slower than `math.perm`
      - keeping around for PyPy 3.12+

______________________________________________________________________

[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
neqs 0.9.0
Newton-based nonlinear equation solvers
Requires Python: >=3.12
Keywords: modeling, numerical, simulation


# Neqs

Newton-based nonlinear equation solvers


## Project URLs

Homepage: [`https://github.com/iris-solutions-team/neqs`](https://github.com/iris-solutions-team/neqs)

Documentation: [`https://iris-solutions-team.github.io/neqs-pages`](https://iris-solutions-team.github.io/neqs-pages)

Bug Tracker: [`https://github.com/iris-solutions-team/neqs/issues`](https://github.com/iris-solutions-team/neqs/issues)