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.3.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.3-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: terryology-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 6b3b121b1f9e7f1db1935f868b6caf683625ba2b06f451fdd6bf3af560ead040
MD5 4662f55eca67baafc955b3693bfd3f1e
BLAKE2b-256 572745c71a42e2a835d401eb525585bf72d9f6ed9fa57ef1bca0b6cc97bfb02a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: terryology-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0b25eaee5772c19de06b3926312f93b3245597a7cbdae79277237c28e4152a6c
MD5 9d55898d6787e3d497aee309401e7e28
BLAKE2b-256 0477cd064296adb803448a3ed6be9623980d54ca9f63c854ea2e46b6e34b60a1

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