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])
linearreg

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.7.tar.gz (23.6 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.7-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: simple_equ-1.2.7.tar.gz
  • Upload date:
  • Size: 23.6 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.7.tar.gz
Algorithm Hash digest
SHA256 f2fdd87f42b387b4683a58a8d4882e1bb738b646b07ee8effe605007d4e4b984
MD5 64c428be25eb8051c3cb0e9efab732c6
BLAKE2b-256 765ac59c5ac3212013c583ebace034643553decba112c08e23de54a2bdc7bbb9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: simple_equ-1.2.7-py3-none-any.whl
  • Upload date:
  • Size: 27.2 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 3854105072b2c6dbda816acdae3ffc3fed03e884c595c2aaaa923454f6648ad0
MD5 08ec05fe7f0651aea77b84b5b317cefd
BLAKE2b-256 51c4b0d412484a03f7d5ac9beeb2924704ca872df050e392fd0d24a8c355029b

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