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: Integration exploded
# ∫ x^2 dx = ??? (Integration exploded)

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: chaosmath-0.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 7766fcec6cbdfaaaf6b232a8d5c424816b0a0631ecd3b9d04d5a2e2f54ae3a56
MD5 24cf4e514b15393261dd2a66860d6415
BLAKE2b-256 7b78766fd018d39314918f8720b2363d4f558a8c27efeafd24dbb7b3ca0566ae

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chaosmath-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 43.8 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f7afdfd1ec28c135913f57c2d38fd8235e41944bb3f44f8348862f0c869af822
MD5 4b94c5e2f0cd7dce84517128f1c34acf
BLAKE2b-256 fea593cd75593393fc50fe4c1a178e55b6b831e8eebe30da20c478ef5c55f4de

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