Package grscheller.boring_math
Project description
PyPI grscheller.boring-math Project
Daddy's Boring Math Library.
- Example of a Python package with both libraries and executables
- Package name suggested by my then 13 year old daughter Mary
- Detailed grscheller.datastructures API's
Package overview grscheller.boring_math
Integer Math Module
Number theory
-
Function gcd(fst: int, snd: int) -> int
- takes two integers, returns greatest common divisor (gcd)
- where
gcd >= 0
gcd(0,0)
returns0
but in this case the gcd does not exist
-
Function lcm(fst: int, snd: int) -> int
- takes two integers, returns least common multiple (lcm)
-
Function primes(start: int=2, end_before: int=100) -> Iterator
- takes two integers, returns least common multiple (lcm)
Pythagorean Triples
The values a, b, c > 0
represent integer sides of a right triangle.
- Function pythag3(a_max: int=3, all_max: int|None=None) -> Iterator
- Return an interator of tuples of Pythagorean Tiples
- Side
a <= a_max
and sidesa, b, c <= all_max
- Iterator finds all primative pythagorean triples up to a given a_max
Ackermann's Function
- Function ackermann(m: int, n: int) -> int
- Ackermann's function is a doublely recursively defined function
- An example of a computable but not primitive recursive function
- Becomes numerically intractable after m=4
Fibonacci Sequences
- Function fibonacci(f0: int=0, f1: int=1) -> Iterator
- Return an iterator for a Fibonacci sequence
- Defaults to
0, 1, 1, 2, 3, 5, 8, ...
Semantic Versioning
- Semantic versioning for PyPI releases:
- first digit signifies a major event, epoch, or paradigm shift
- second digit means
- PyPI breaking API changes
- PyPI major changes
- third digit either means
- PyPI API additions
- PyPI bugfixes or minor changes
- PyPI documentation updates
- first development branch breaking API changes
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for grscheller_boring_math-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 397f328bcd71c4c8f2fbd0250c67677350175166bd2522038eb72f9390eb5f3d |
|
MD5 | 97118b059b646735eef7d7e29ab7c372 |
|
BLAKE2b-256 | 59b7afb5d4196e542c83d01530a4af72cc3b8d2f4ca24073bbec7355a3fd0bb1 |
Close
Hashes for grscheller_boring_math-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43f6b6a0ead7e6a4b390f32a44d8a5d562a7aadc66e1728b627cdb9d86fdc468 |
|
MD5 | 47ee7e12707a8ce4e6e27d7223b37737 |
|
BLAKE2b-256 | 6169a298153f6ba229a0ecc87c19d8fbb6ff7c2c8c914dfc3a882c2cd4e10678 |