Skip to main content

A Python package implementing Terry's unique mathematical system

Project description

Terryology

A Python package implementing Terry's unique mathematical system, where multiplication is defined as a × b = a + b copies of a.

Installation

Using uv:

uv pip install terryology

Using pip:

pip install terryology

Basic Usage

from terryology import multiply, power

# Terry multiplication
result = multiply(2, 3)  # Returns 8 (2 + 3*2)

# Terry power
result = power(2, 2)    # Returns 6 (2 + 2*2)

Extending Terry's Mathematics

The package exposes the use_terryology decorator, allowing you to create your own Terry-style mathematical operations:

from terryology import use_terryology

# Create a new operation using Terry multiplication
@use_terryology
def square(a, b):
    # In Terry's system, squaring is the same as multiply(x, x)
    return a * a

# Create more complex expressions
@use_terryology
def complex_operation(a, b):
    # This will use Terry's multiplication and power rules
    return math.pow(a * b, 2)

# You can also use it for your own mathematical insights
@use_terryology
def my_terry_formula(a, b):
    return a * b + math.pow(a, b)

How the Decorator Works

The use_terryology decorator transforms mathematical operations within a function to follow Terry's system:

  • Regular multiplication (*) becomes a + (b * a)
  • math.pow(a, b) is redefined according to Terry's multiplication rules

Contributing

Contributions are welcome! If you have discovered new insights into Terry's mathematical system, please feel free to submit a pull request.

License

MIT License

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

terryology-0.1.1.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

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

terryology-0.1.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: terryology-0.1.1.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for terryology-0.1.1.tar.gz
Algorithm Hash digest
SHA256 92300fd5733ade9532247135dbbdfd1b95ece50a5770a8997d437b45e72bd48f
MD5 fd025c1aa3358cd27dec9f486800a980
BLAKE2b-256 053403bcfe27f181c7cea2287479a658c53893d7e2f4776b7a9d77202f62b9e2

See more details on using hashes here.

File details

Details for the file terryology-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: terryology-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for terryology-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c8ab0cf7b1daf819dca2b2e1ce24ad60f5ad20f7ee84dd410d7dfb8c2adf2a83
MD5 bf4c1f6f72962d2499ab4306be1142b6
BLAKE2b-256 81f2f876b97d489c777b4bae9e4e27299e322ba274af5ab8988372e94e519073

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