simple-equ

raw JSON →
1.5.11 verified Sat May 09 auth: no python

An open source library containing multiple known STEM equations in a functional form. Current version 1.5.11, supports Python >=3.8. Developed by Muhammad Bilal Qamar. Released under MIT License.

pip install simple-equ
error ModuleNotFoundError: No module named 'simple_equ'
cause Incorrect import casing (Simple_equ vs simple_equ) or missing install.
fix
Install the library: pip install simple-equ, then import as: from simple_equ import ...
error ImportError: cannot import name 'Arithmetic' from 'simple_equ' (unknown location)
cause Old version (pre-1.0) had different module structure or the library is not installed correctly.
fix
Upgrade: pip install --upgrade simple-equ, or check installed version with pip show simple-equ.
error ValueError: math domain error
cause Passing invalid input to trigonometric functions (e.g., large angles) or sqrt with negative number.
fix
Ensure inputs are within valid domain (e.g., angles in degrees between -360 and 360 for typical use).
gotcha The library uses underscores in module names (simple_equ), not hyphens. Import as 'from simple_equ import ...'.
fix Use correct import: from simple_equ import ...
gotcha Some functions expect specific argument order or return values. Always check the docstrings or source code for method signatures.
fix Refer to official documentation for each module's API.

Import and use the core modules: Arithmetic, Trigonometric, Quadratic, Factorial, Kinematics.

from simple_equ import Arithmetic, Trigonometric, Quadratic, Factorial, Kinematics

# Arithmetic
print(Arithmetic.inverse('add'))  # Output: 'subtract'

# Trigonometric
degrees = 30
rad, sin_val, cos_val, tan_val = Trigonometric.evaluate(degrees)
print(f"Radians: {rad}, sin: {sin_val:.2f}, cos: {cos_val:.2f}, tan: {tan_val:.2f}")

# Quadratic
roots = Quadratic.solve(1, -3, 2)
print(f"Roots: {roots}")

# Factorial
print(Factorial.compute(5))  # 120

# Kinematics
time = Kinematics.distance_freefall(10, 9.8)
print(f"Time to fall 10m: {time:.2f}s")