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

Uploaded Python 3

File details

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

File metadata

  • Download URL: simple_equ-1.2.9.tar.gz
  • Upload date:
  • Size: 24.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.9.tar.gz
Algorithm Hash digest
SHA256 9a96441664c694a60cffcafc70cca539edb9fc03cb04a75700470048b11a57a5
MD5 a765db13ed7627bc26d674edfe261848
BLAKE2b-256 9ce47729135edf4c150124f96a18c17b7e910116d3dcadab1d485bdcb88f74c1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: simple_equ-1.2.9-py3-none-any.whl
  • Upload date:
  • Size: 28.6 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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 d20e4573704ea49765a44635c2ebd4610a4383f01332210d796b59b07b672739
MD5 3b329b82563f823417fa4425c8d5caa7
BLAKE2b-256 e513d5d245d97abbc1a392aa497cfc5464d09f5b4880799b0dc6db7f0ec8eeb1

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