Skip to main content

An open source library containing multiple known STEM equations in a functional form.

Project description

simple-equ

An open source library containing multiple known STEM equations in a functional form.

Installation

pip install simple-equ

(For versions 3.8 or newer)

Optional: Use a venv (virtual environment).

Usage

simple-equ is simple, yet practical. That is the problem is solves. Sure, someone with some knowledge in their field can implement this library's functionality. But, let us look on how that would realistically look like:

a = 3
b = 4
c = 4

"""
Here is an example of implementing a basic quadratic equation
"""
import math

delta = b**2 - 4 * a * c
solution1 = (-b + math.sqrt(delta)) / 2*a
solution2 = (-b - math.sqrt(delta)) / 2*a

"""
Here, just an import and a function call is needed!
"""

import simple_equ.math_general.algebra as sa

result = sa.basic_quadratic(a,b,c)
Looking to calculate the sin of an angle?
Well... here is the algorithm to do this, is pseudo-code

function sin_taylor(x, n_terms):
    result = 0
    sign = 1             # alternates between + and -

    for i from 0 to n_terms-1:
        term_exponent = 2*i + 1
        term_factorial = factorial(term_exponent)
        term = sign * (x ^ term_exponent) / term_factorial
        result = result + term
        sign = -sign     # flip the sign for next term

    return result

function factorial(k):
    if k == 0 or k == 1:
        return 1
    else:
        f = 1
        for j from 2 to k:
            f = f * j
        return f

"""

import simple_equ.math_general.geometry as sg
sin30 = sg.sin(30) # In case you didn't notice, this is the same thing in simple_equ
"""
Normally, we would put a linear regression here. But it is pretty monsterous.
Worry not though. This is how to do it with simple-equ:
"""

import simple_equ.economics.statistics as se

se.linear_regression([3,4,6],[4,6,7])

You just import the field of your liking, and then boom!

Structure

The library is structured into fields. These fields have their own folder aka modules. However, a field can have multiple subsets. These subsets are usually present in the form of python files. For example: algebra.py and geometry.py, are examples of subfields of the general math field called math_general.

To import something in a practical sense in simple_equ, the structure looks like this:

import simple_equ.field.subfield as ...

Practical examples include: import simple_equ.math_general.geometry as sg import simple_equ.economics.statistics as se

Contributing

Contributions are always welcome!

The project encourages a community-driven approach. Everyone can contribute. Be sure to be kind and respectful. Do not assume that something is known to the contributor you are talking to just because you know it and do not be rude or even made comments about their skill. This behaviour is not welcome here.

See contributing.md for ways to get started.

Features

  • Community driven and open
  • Functions from different fields
  • Reusable
  • Highly accurate
  • Simple yet practical

Do not forget to star the repo if you like it! It means a lot! Thank you for reading this document and getting involved with our community :)

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

simple_equ-1.2.8.tar.gz (23.5 kB view details)

Uploaded Source

Built Distribution

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

simple_equ-1.2.8-py3-none-any.whl (27.1 kB view details)

Uploaded Python 3

File details

Details for the file simple_equ-1.2.8.tar.gz.

File metadata

  • Download URL: simple_equ-1.2.8.tar.gz
  • Upload date:
  • Size: 23.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for simple_equ-1.2.8.tar.gz
Algorithm Hash digest
SHA256 83d29b9ce2c870980d81801f411bea1c7b385a3eeb28bad392dd2f14942df2cb
MD5 bb8da9b9278873b3d6fc7efc631fcef6
BLAKE2b-256 3d5d72c5a766a5f4c6a45cbb1c736d3e26b886bf6bc8a8aba7c1bd0ced7e2770

See more details on using hashes here.

File details

Details for the file simple_equ-1.2.8-py3-none-any.whl.

File metadata

  • Download URL: simple_equ-1.2.8-py3-none-any.whl
  • Upload date:
  • Size: 27.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for simple_equ-1.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 255d38810a0bcd371e8cf5aee5d44ccd0bf06a33f58dce01325e3d92f102d24a
MD5 e3214cfd1a137f86b397209a70203ad6
BLAKE2b-256 61b4443ad47ba1de19d0b54d56f2fa35d3868d5caf5fe6d6053d7ea5e3aa0782

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