Skip to main content

Providing a powerful and accurate Math Solver.

Project description

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

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

from numsy import solver

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

from numsy.solver 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.

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

numsy-0.1.1.tar.gz (34.2 kB view details)

Uploaded Source

Built Distribution

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

numsy-0.1.1-py3-none-any.whl (33.7 kB view details)

Uploaded Python 3

File details

Details for the file numsy-0.1.1.tar.gz.

File metadata

  • Download URL: numsy-0.1.1.tar.gz
  • Upload date:
  • Size: 34.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for numsy-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ff2e7dd69985a46fae89f0a3e0dc85e026ef1cebd7abef1fa7208490dae4f1f2
MD5 055e23a239b20fc454cee2374d2fb2ca
BLAKE2b-256 fb1f16030c23da4626e66fb0cb5f3589c5404683027b28a4f4c31b0afe2ac293

See more details on using hashes here.

Provenance

The following attestation bundles were made for numsy-0.1.1.tar.gz:

Publisher: python-publish.yml on xCirno1/numsy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file numsy-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: numsy-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 33.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for numsy-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 299ac55e72fb2810dcd6b395ca1781408228436dff285cfc5dcea4047254c079
MD5 856ce3810c9217fd4f41f6b017465204
BLAKE2b-256 88d85c79e8ab112f70a2ba86d61d6c0be5b46b58cfdee392309c99307bb81a2a

See more details on using hashes here.

Provenance

The following attestation bundles were made for numsy-0.1.1-py3-none-any.whl:

Publisher: python-publish.yml on xCirno1/numsy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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