Metadata-Version: 2.1
Name: numsy
Version: 0.1.0
Summary: Providing a powerful and accurate Math Solver.
Author-email: xCirno1 <xcirno6@gmail.com>
License: MIT License
        
        Copyright (c) 2024 xCirno
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE

# NumSy
Welcome to NumSy, a project designed to ensure precise and accurate mathematical calculations. This is an independent project, which eliminates the need for any additional libraries. Our primary goal is to provide users with an easy-to-use platform for solving math problems. We highly welcome your feedback, suggestions, and contributions, so please don't hesitate to create issues or pull requests.

## Installation
To install NumSy using PyPI, run the following command:

    $ pip install numsy

## Basic Example
* #### As a calculator
```python
from numsy import solver

# Let's try to calculate triangle area with a height of 5
# and base length of 10
answer = solver.solve("1/2 * 10 * 5")
print(answer)  # Prints 25
```
* #### As a math solver
```python
from numsy import solver

answer = solver.solve("4x + 3 = 19")
print(answer.x)  # Prints 4
```

* #### Solving Matrix
```python
from solver.matrices import Matrix

m1 = [
    [1, 2, 3],
    [3, 2, 1],
    [0, 0, 8]
]

print(Matrix(m1).inverse().matrix)
# [[-0.5, 0.5, 0.125], [0.75, -0.25, -0.25], [-0.0, -0.0, 0.125]]

print(Matrix(m1).adjugate().matrix)
# [[16, -16, -4], [-24, 8, 8], [0, 0, -4]]
```

## Features
- Parsing problems and equations
- Safe calculation without the usage of `eval` or `exec`
- Basic arithmetics calculation (PEMDAS problem)
- Solving linear algebra (1 variable)
- Matrices

## How it works
NumSy operates by accepting problems and equations as strings and using its own algorithm to solve them. Here's a breakdown of the process:
1. NumSy receives the problem or equation as a string.
2. It parses the string character by character, identifying the type of each character (operator, digit, etc.).
3. Once the parsing phase is complete, NumSy determines the problem's identity, such as the number of variables or whether it's an equation.
4. It then categorizes the problem type, whether it falls under Basic PEMDAS, Quadratic Equation, or other categories.
5. Using specific functions bound to each problem type, NumSy proceeds to solve the problem.
