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

Uploaded Python 3

File details

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

File metadata

  • Download URL: chaosmath-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 14fb8de21ce46b127932831fac925e407c66926abe402d32fd7a6d270138e423
MD5 e5df710a1583735d4e92381ca0c5011f
BLAKE2b-256 9a341925c4c31739db79400c1a016bc9ca1a8105a0d3636dbaacf5115ae031a2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chaosmath-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 44.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 411f1e637ce5df6c9016a86753b858929aa09fe3d00cd50256ad3096f3f19d35
MD5 c19f2451d565270424fc7182a3982dd6
BLAKE2b-256 9cd07f66f89a80d84a0f97d557714ae9ba426a3f262b018a1e97fd2e0fb7cd3a

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