Skip to main content

A Python package for advanced mathematical operations

Project description

moremath

moremath is a Python package that provides a collection of advanced mathematical functions covering various areas such as algebra, statistics, arithmetic, and geometry. This library is designed to assist developers, data scientists, and mathematicians in performing complex mathematical operations with ease.

Installation

You can install the package via pip:

pip install moremath

To install a specific version, use:

pip install moremath==<version_number_here>

[!NOTE] Stable versions are as follows:

Version Notes
0.0.1 Initial stable release.
0.0.2 Minor improvements.
0.1.2 New features added.
0.2.2 Latest version.

Modules

Algebra

This deals with exponentiation, logarithm, sieve of eratosthenes, prime factors.

Examples

- Exponentiation

from moremath.algebra import exponentiation as exp

base = float(input("Enter the base:"))
exponent = float(input("Enter the exponent:"))

result = exp(base, exponent)

- Logarithm

from moremath.algebra import logarithm as log

num = float(input("Enter the number whose logarithm you want to find:"))
base = float(input("Enter the base:"))

result = log(num, base)

- Sieve Of Eratosthenes

from moremath.algebra import sieve_of_eratosthenes as se

num = int(input("Enter the number till which you want to generate prime numbers:"))

result = se(num)

- Prime Factors

from moremath.algebra import prime_factors as pf

num = int(input("Enter the number whose prime factors you want to find:"))

result = pf(num)

Arithmetic

This deals with addition, subtraction, multiplication, division, factorial.

Examples

- Addition

from moremath.arithmetic import add

num1 = input("Enter first number:")
num2 = input("Enter second number:")

result = add(num1, num2)

- Subtraction

from moremath.arithmetic import subtract

num1 = input("Enter first number:")
num2 = input("Enter second number:")

result = subtract(num1, num2)

- Multiplication

from moremath.arithmetic import multiply

num1 = input("Enter first number:")
num2 = input("Enter second number:")

result = multiply(num1, num2)

- Division

from moremath.arithmetic import divide

num1 = input("Enter dividend:")
num2 = input("Enter divisor:")

result = divide(num1, num2)

- Factorial

from moremath.arithmetic import factorial

num = input("Enter number:")

result = factorial(num)

Geometry

This deals with perimeter, area, volume, surface area.

Examples

- Square Perimeter

from moremath.geometry import square_perimeter as sp

side = input("Enter side length:")

result = sp(side)

- Square Area

from moremath.geometry import square_area as sa

side = input("Enter side length:")

result = sa(side)

- Rectangle Perimeter

from moremath.geometry import rectangle_perimeter as rp

l = input("Enter length:")
b = input("Enter breadth:")

result = rp(l, b)

- Rectangle Area

from moremath.geometry import rectangle_area as ra

l = input("Enter length:")
b = input("Enter breadth:")

result = ra(l, b)

- Circumference / Circle Perimeter

from moremath.geometry import circle_perimeter as cp

r = input("Enter radius:")

result = cp(r)

- Circle Area

from moremath.geometry import circle_area as ca

r = input("Enter radius:")

result = ca(r)

- Cube Volume

from moremath.geometry import cube_volume as cv

a = input("Enter side:")

result = cv(a)

- Cube Surface Area

from moremath.geometry import cube_surface_area as csa

a = input("Enter side:")

result = csa(a)

- Sphere Volume

from moremath.geometry import sphere_volume as sv

r = input("Enter radius:")

result = sv(r)

- Sphere Surface Area

from moremath.geometry import sphere_surface_area as ssa

r = input("Enter radius:")

result = ssa(r)

Statistics

This deals with mean, median, mode, variance, standard deviation.

Examples

- Mean

from moremath.statistics import mean

data = [1, 3, 3, 6, 3, 7]
result = mean(data)

- Median

from moremath.statistics import median

data = [1, 3, 3, 6, 3, 7]
result = median(data)

- Mode

from moremath.statistics import mode

data = [1, 3, 3, 6, 3, 7]
result = mode(data)

- Variance

from moremath.statistics import variance

data = [1, 3, 3, 6, 3, 7]
result = variance(data)

- Standard Deviation

from moremath.statistics import standard_deviation as sd

data = [1, 3, 3, 6, 3, 7]
result = sd(data)

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

moremath-0.2.2.tar.gz (8.9 kB view hashes)

Uploaded Source

Built Distribution

moremath-0.2.2-py3-none-any.whl (6.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page