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 Distribution

ethiomultlib-0.1.1.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 2Python 3

File details

Details for the file ethiomultlib-0.1.1.tar.gz.

File metadata

  • Download URL: ethiomultlib-0.1.1.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for ethiomultlib-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d4aef9d9dc663cbbfb54b235ad71684f25ac0e67c8aa392105e98e35c481262e
MD5 5f617bd5f292dce70d5af449a172034a
BLAKE2b-256 03a296bbd68a18274f1d2d96f3313db1d1771243d6ddb603ce32d6f55848d0b2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ethiomultlib-0.1.1-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.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 55dc36dcf752053475bac88a205027b3c024ad6e9fc26872c46bbca76ef7f546
MD5 d4887e8c256d4f6e99edc7f69c674831
BLAKE2b-256 0c8b32b0ad56fadcd413a31566b975258259e77b18a26546901642ab6339df15

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