Number theory: Euclidean Algorithm ,Extended Euclidean Algorithm and Sieve of Eratosthenes.
Project description
mypackage = scm203lab367112755
scm203lab367112755 This is an example of Python packaging that combines important Number Theory algorithms into an easy-to-use format: Euclidean Algorithm, Extended Euclidean Algorithm, and Sieve of Eratosthenes.It is designed mainly for learning purposes and as an example of Python packaging.
Features
- Euclidean Algorithm: Purpose: Compute the greatest common divisor (GCD) of two integers $a$ and $b$. Idea: Uses repeated division with remiander. [ \gcd(a, b) = \gcd(b, ; a \bmod b) ] Complexity: $O(\log(\min(a,b)))$.
- Extended Euclidean Algorithm: Purpose: find greatest integer $x$ and $y$ such that [ ax+by = gcd(a, b) ] Application: Solving Diophantine equations modular inverse. Complexity: $O(\log(\min(a,b)))$.
- Sieve of Eratosthenes: Purpose: Generates all prime numbers up to $n$. Idea: Iteratively marks multiples of primes as composite. Complexity: $O(n\log(\log(n)))$.
Installation
You can install the package directly from PyPI:
pip install scm203lab367112755
Example 1 Euclidean Algorithm
gcd(234, 42)
Example 2 Extended Euclidean Algorithm
extended_gcd_steps(7920, 4536)
Example 3 Sieve of Eratosthenes
sieve_steps(49)
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scm203lab367112755-0.1.0.tar.gz.
File metadata
- Download URL: scm203lab367112755-0.1.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
131c6a0fa35b8e8907ea62662fbbaacb5ff906a8a219eda61d663412d886e9b1
|
|
| MD5 |
785dfd88353a40aaa9ab235c7ae05a3d
|
|
| BLAKE2b-256 |
220d1641a0b932ba8df79ee17898b8764dc4b87059f1bdf99fe9180ba9d85010
|
File details
Details for the file scm203lab367112755-0.1.0-py3-none-any.whl.
File metadata
- Download URL: scm203lab367112755-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
878ded65e12f4187bdbb482f4a057654d8dd4c6145fed6b97d965812c6a6a541
|
|
| MD5 |
933dfc16da9e3d0c4d3cf80397c00064
|
|
| BLAKE2b-256 |
1fb8e536937d280d955ff3ddfa193009360b479f8e091f2d744f5be222a1a714
|