Skip to content

Danigy/ethiomultlib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ethiopian Arithmetic Library

(ethiomultlib)

License: MIT PyPI version

Open Source Contribution Welcome Star Badge

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), (GitHub)

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

About

This library offers a function, `ethiopian_multiplication`, to perform multiplication of two positive integers using the elegant and historically significant Ethiopian Multiplication method.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages