Skip to main content

A Python library for Ethiopian Multiplication.

Project description

Ethiopian Arithmetic Library

(ethiomultlib)

License: MIT PyPI version

A Python library providing an implementation of the ancient Ethiopian Multiplication algorithm.

This library offers a function, ethiopian_multiplication, to perform multiplication of two positive integers using the elegant and historically significant Ethiopian Multiplication method. This technique relies solely on doubling, halving (integer division), and addition. The method involves halving the first number and doubling the second number in parallel columns. Rows where the first number is odd contribute the corresponding second number to the final sum. This sum represents the product. It's a fascinating demonstration of binary arithmetic principles in a pre-modern algorithmic form, offering a unique perspective on arithmetic operations.

Installation

pip install ethiomultlib

Usage

import ethiomultlib

# Use the function from the library
result = ethiomultlib.ethiopian_multiplication(45, 12)
print(f"Result of Ethiopian Multiplication: {result}") # Output: 540

Ethiopian Multiplication Explained

The method involves halving the first number and doubling the second number in parallel columns. Rows where the first number is odd contribute the corresponding second number to the final sum. This sum represents the product. It's a fascinating demonstration of binary arithmetic principles in a pre-modern algorithmic form.

Author

Daniel Gessese Amdework, Software Engineer, Data Scientist, and ML/DL Enthusiast. (LinkedIn)

License

This library is released under the MIT License. See the LICENSE file for details.

Giving Credit where Credit is due

If you use ethiomultlib in your research, projects, or publications, we appreciate it if you would cite it. This helps give recognition to the work, and it also helps other users discover this library.

You can use the following formats to give credit. Simply copy and paste the format that is most appropriate for your needs:

Option 1: Simple Attribution (for general use, project READMEs, websites, etc.)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ethiomultlib-0.1.0-py2.py3-none-any.whl (4.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file ethiomultlib-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: ethiomultlib-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for ethiomultlib-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e06c0b56c3eb68766f11c60b3049e9e048fc9374bb31745ec7cc41f930e35db4
MD5 1a39d07665e09a330879ae2719ee3adc
BLAKE2b-256 54d123ce013c3ce20bed62f2ba919fd7b697d4e5c1cef156cd601917dd9b502a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page