Metadata-Version: 2.4
Name: AxiomX
Version: 0.1.4
Summary: A dynamic Python math library containing numerous mathematical functions implemented from scratch.
Author: Eric Joseph
License: MIT
Requires-Python: >=2.7
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file
Dynamic: requires-python

# AxiomX

AxiomX is a lightweight, pure-Python mathematical library built from first principles - designed for accuracy, learning, and mathematical exploration.

* * *

## 📦 Contents

### 𝛑 AxiomX.constants - Constants module

`AxiomX.constants` is the constants module of AxiomX. It has a wide variety of constants. Here are the constants we provide:
- 𝛑 (pi)
- e (Euler's number)
- ϖ (lemniscate constant)
- Square roots of 2, 3 and 5
- Metallic ratio
- Bernoulli Numbers - **NEW**
- Stieltjes Numbers - **NEW**
- Harmonic Numbers - **NEW**

### ∫ AxiomX.calculus - Calculus module

`AxiomX.calculus` is the calculus module of AxiomX. It provides three functions:
- integrate(function, lowlim, uplim)
- summation(lowlim, uplim, function)
- converges(function)

#### Usage
```
from AxiomX.calculus import *
import math  # just for demo. We will show you our function later. 

print(integrate(lambda x: 1 / math.cosh(x), -100, 100)) # prints 3.141592...
print(summation(1, float("inf"), lambda x: 1 / x**2)) # prints 1.64493...
```

### ⚙️ AxiomX.functions - Arithmetic functions module

`AxiomX.functions` is the module of AxiomX which contains all kinds of arithmetic functions. These are the functions the module provides:
- absolute(x)
- gamma(x)
- sqrt(n)
- cbrt(n)
- factorial(n)
- zeta(n)
- beta(n)
- bc(n, k)
- pascal(row)

#### Usage
```
from AxiomX.functions import *

print(gamma(0.5)) # prints 1.7724...
print(zeta(3)) # prints 1.20205...
print(beta(2)) # prints 0.91596...
```

### 📈 AxiomX.exp - Exponential and Logarithmic functions

The `AxiomX.exp` module contains exponential and logarithmic functions. These are the functions we provide:
- exp(n)
- ln(x)
- log10(x)
- log2(x)
- log(x,b)

#### Usage
```
from AxiomX.exp import *

print(exp(2)) # prints 7.389...
print(ln(2)) # prints 0.693...
print(log10(2)) # prints 0.301...
```

### 🔥 AxiomX.hyperbolic - Hyperbolic functions

The `AxiomX.hyperbolic` module deals with hyperbolic functions and their inverses. These are the functions provided:
- sinh(x), cosh(x), tanh(x), coth(x), sech(x), cosech(x)
- their inverses.

#### Usage
```
from AxiomX.hyperbolic import *

print(sinh(1)) # returns 1.17520...
print(sech(1)) # returns 0.64805...
```

### 📐 AxiomX.trig - Trigonometric functions

The `AxiomX.trig` module deals with trigonometric functions, their inverses and also angle conversion from degrees to radians and vice-versa. Here are the functions provided:

- sin(x), cos(x), tan(x), cot(x), sec(x), cosec(x)
- their inverses
- radians(deg) - degrees to radians
- degrees(rad) - radians to degrees

#### Usage
```
from AxiomX.trig import *
from AxiomX.constants import *

print(radians(180)) # prints 3.141592...
print(sin(pi / 2)) # prints 1.0
print(arctan(1)) # prints 0.785398...
```

### 🔢 AxiomX.matrix - Matrix operations

The `AxiomX.matrix` module has been introduced since version [0.1.2](https://pypi.org/project/AxiomX/0.1.2). It has a class Matrix which has all sorts of operations.

#### Features supported

- Matrix creation and indexing
- Addition, subtraction, multiplication
- Scalar multiplication
- Determinant (recursive expansion)
- Matrix inverse (adjoint method)
- Rank (Gaussian elimination)
- Transpose
- Identity and zero matrix generation

#### Example
```
from AxiomX.matrix import Matrix

A = Matrix.from_list([[1,2],[3,4]])
B = Matrix.from_list([[5,6],[7,8]])

print(A + B)
print(A**2)
```

### 📊 AxiomX.graph - plotting graphs for functions

`AxiomX.graph` is one of the latest additions of AxiomX, added on from version [0.1.3](https://www.pypi.org/project/AxiomX/0.1.3). This graph has now enhanced a lot. Look at our features.

#### Features

- Plot one or multiple functions
- Smooth zoom (PageUp / PageDown)
- Pan using arrow keys
- Infinite-style grid rendering
- Dynamic tick spacing (auto-adjusts with zoom)
- Real-time mouse coordinate tracking

#### Example Usage

##### Single Function

```
from AxiomX.trig import *
from AxiomX.graph import plot

plot(sin,-10,10) # plots the sine curve
```

##### Multiple Functions
```
from AxiomX.trig import *
from AxiomX.graph import plot

plot([lambda x: sin(x)**2, lambda y: cos(y)**2, lambda z: 1]) # explanation for sin²x + cos²x = 1
```
#### 🎮 Graph Controls

##### ⌨️ Keyboard

- PgUp - zooming out
- PgDn - zooming in
- Arrow keys - for panning around the graph

##### 🖱️ Mouse

- shows realtime graph coordinates.

##### 🖥️ GUI Buttons

- There are GUI buttons at the bottom with commands.

* * *

## 🚀 Installation

You can directly install via *pip*. Go to your terminal and type: `pip install AxiomX`. Or rather install with the wheel file or the gzipped package.

* * *

## 🛣️ Roadway

- PNG exporter for graph
- Mouse panning
- Function accepting GUI

* * *

## 🤝 Contributions

If you have any suggestions or if you see bugs, just email at AxiomX.python@gmail.com.
Thanks for acknowledging AxiomX.

## 🪪 License

MIT
