Skip to main content

Math functions that almost work

Project description

ChaosMath

Math. But Unstable.

chaosmath is a Python module that provides mathematical functions which are almost correct.
Results may vary depending on randomness, time, and pure bad vibes.

Deterministic? No
Accurate? Maybe
Entertaining? Absolutely


Installation

  pip install chaosmath

or

  git clone https://github.com/prathambhandary/ChaosMath.git
  cd ChaosMath
  pip install .

Features

  • random_error() → weapon-grade excuses when things go wrong (2500+ and growing)
  • pi() → returns π-ish values depending on the universe’s mood
  • sqrt(x) → usually correct, occasionally spiritually incorrect
  • add(a, b) → addition with attitude and possible delusions
  • multiply(a, b) → multiplication, but quantum-unstable
  • divide(a, b) → division that may anger the laws of physics
  • integrate(expr, var) → attempts calculus, fails with confidence
  • differentiate(expr, var) → derivative denied with an excuse
  • solve(equation) → solving is attempted, success is optional
  • CLI support → unleash chaos directly from your terminal

Examples

import chaosmath as cm

print(f"[ERROR]: {cm.random_error()}")
# [ERROR]: Memory said 'nah'

print(cm.integrate("x^2"))
# ⚠️ CHAOS MATH: Debugger learned violin
# ∫ x^2 dx = ??? (Debugger learned violin)

print(f"Pi: {cm.pi()}")
# Pi: 3

Disclaimer

This is not a bug. This is the feature.

If the output is wrong, confusing, or deeply disappointing — chaosmath is functioning correctly.

Do not use for:

  • Exams
  • Production
  • Finance
  • Space travel
  • Anything you care about

You have been warned.

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

chaosmath-0.2.2.tar.gz (43.9 kB view details)

Uploaded Source

Built Distribution

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

chaosmath-0.2.2-py3-none-any.whl (43.9 kB view details)

Uploaded Python 3

File details

Details for the file chaosmath-0.2.2.tar.gz.

File metadata

  • Download URL: chaosmath-0.2.2.tar.gz
  • Upload date:
  • Size: 43.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for chaosmath-0.2.2.tar.gz
Algorithm Hash digest
SHA256 7753a1425682b2ac967eb34b4ec4ab9e643b16bb6df66cffeb199110f637f537
MD5 2db639fd1e5da39b716b524d5e0e0097
BLAKE2b-256 64a58815cfd15317bf01e9a7eb7d1366034c4c8aa599dc2c34c45999ce24f9fe

See more details on using hashes here.

File details

Details for the file chaosmath-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: chaosmath-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 43.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for chaosmath-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 92aeb1f1d71c067e8a721a9a464684e9ce7dce95e4a07e2b9eb34c5622ed34e1
MD5 6dba9def5955998d09929dd9e594782b
BLAKE2b-256 d5edfc9f6e1493840d251f118ca2eb20dcfdf542c824bae468c78217e55f754b

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