NeuroMath - A lightweight symbolic mathematical DSL
Project description
NeuroMath
NeuroMath is a lightweight symbolic mathematical DSL (Domain Specific Language) built on top of SymPy.
It provides a clean notebook-style computation experience with both CLI and Streamlit GUI support.
✨ Features
- Symbolic computation
- Variable assignment
- Function definitions
- Differentiation
- Expression evaluation
- Built-in constants (
pi,e) - CLI interface
- Notebook-style Streamlit GUI
- Lightweight and easy to extend
📦 Installation
Install from PyPI:
pip install neuromath
# MathScript Language Reference 📚
A comprehensive guide to built-in functions and operations in MathScript.
## Table of Contents
- [Built-in Functions](#built-in-functions)
- [Math Functions](#math-functions)
- [Symbolic Functions](#symbolic-functions)
---
## Built-in Functions
### Basic Operations
| Function | Description |
|----------|-------------|
| `print(value)` | Print output to console |
| `typeof(value)` | Get type of value |
| `shape(matrix)` | Get matrix dimensions |
| `det(matrix)` | Calculate matrix determinant |
| `trans(matrix)` | Transpose matrix |
| `inv(matrix)` | Calculate matrix inverse |
### Matrix Operations
| Function | Description |
|----------|-------------|
| `identity(n)` | Create n×n identity matrix |
| `zeroes(rows, cols)` | Create matrix filled with zeros |
| `dot(v1, v2)` | Dot product of vectors |
| `cross(v1, v2)` | Cross product of vectors |
| `norm(v)` | Vector norm/magnitude |
| `unit(v)` | Convert to unit vector |
### Linear Algebra Functions
| Function | Description |
|----------|-------------|
| `eigenval(matrix)` | Calculate eigenvalues |
| `eigenvec(matrix)` | Calculate eigenvectors |
| `solve_linear(A, b)` | Solve linear system Ax = b |
### Visualization
| Function | Description |
|----------|-------------|
| `plot(f(x), x, start, end)` | Create 2D function plot |
| `plot_surface(f(x,y), x, y, x_start, x_end, y_start, y_end)` | Create 3D surface plot |
---
## Math Functions
### 📐 Trigonometric Functions
| Function | Description |
|----------|-------------|
| `sin(x)` | Sine of angle x |
| `cos(x)` | Cosine of angle x |
| `tan(x)` | Tangent of angle x |
| `arcsin(x)` | Inverse sine (arcsine) |
| `arccos(x)` | Inverse cosine (arccosine) |
| `arctan(x)` | Inverse tangent (arctangent) |
### Exponential & Logarithmic Functions
| Function | Description |
|----------|-------------|
| `exp(x)` | Exponential (e^x) |
| `log(x)` or `ln(x)` | Natural logarithm |
| `sqrt(x)` | Square root |
| `abs(x)` | Absolute value |
| `pow(x, y)` | Power (x^y) |
---
## Symbolic Functions
### Calculus & Algebra
| Function | Description |
|----------|-------------|
| `integrate(f(x), x)` | Perform symbolic integration |
| `diff(f(x), x)` | Perform symbolic differentiation |
| `limit(f(x), x, point)` | Calculate limit at a point |
| `solve(equation, variable)` | Solve algebraic equations |
| `summation(expr, (var, start, end))` | Compute series summation |
| `simplify(expr)` | Simplify mathematical expressions |
| `factor(expr)` | Factor algebraic expressions |
---
## Quick Examples
```mathscript
// Matrix operations
A = identity(3)
B = zeroes(2, 3)
det_A = det(A)
// Calculus
f(x) = x^2 + 3x + 2
derivative = diff(f(x), x)
integral = integrate(f(x), x)
// Visualization
plot(sin(x), x, 0, 2π)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
neuromath-0.1.9.tar.gz
(18.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
neuromath-0.1.9-py3-none-any.whl
(19.1 kB
view details)
File details
Details for the file neuromath-0.1.9.tar.gz.
File metadata
- Download URL: neuromath-0.1.9.tar.gz
- Upload date:
- Size: 18.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6ea139e63dba29302bf17f2bf32d4ed365f1cd34b2c12b8648692b3b1ba9008
|
|
| MD5 |
224b1a354e7a0b503b177558e5b1589c
|
|
| BLAKE2b-256 |
40e734b093d493432367b5baf92dba407954aae342c1e167244bfd2ad80668e6
|
File details
Details for the file neuromath-0.1.9-py3-none-any.whl.
File metadata
- Download URL: neuromath-0.1.9-py3-none-any.whl
- Upload date:
- Size: 19.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92f50d4fb3b9eca8600ba391ae711af1997f9ce7686cbd386418e9875704a967
|
|
| MD5 |
62b2aca5d4e380136d27a83007d61412
|
|
| BLAKE2b-256 |
f9ed529972350fa1e6cf2939334a74d0d9bfda823e3e779b93497d306a12aea7
|