Skip to main content

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, )

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

neuromath-0.2.0.tar.gz (20.9 kB view details)

Uploaded Source

Built Distribution

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

neuromath-0.2.0-py3-none-any.whl (21.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: neuromath-0.2.0.tar.gz
  • Upload date:
  • Size: 20.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for neuromath-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3d6d3f310789304135bfa00a3dd61166a673ddc0391730cd13b39ea9ffe8ec0b
MD5 b1594ad17174a35da0428cdbe64e1c24
BLAKE2b-256 25b026ca22a05b0da4098886669602ad1934f46cecd7eebd9b2f9326b211b7a4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: neuromath-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 21.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for neuromath-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 025641a9cd3dcc3a8aee030c0b9b74400943d4a59a5b1179d9ee22df1a343618
MD5 4071139a7c122c5cabb09448fd9876a3
BLAKE2b-256 c229681cc4c73dc168e7b0412e185599ee081786c40cc5286e69dea2f8f90e86

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