Skip to content

Commit

Permalink
fixed small calculus bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Vihaan314 committed Jul 1, 2024
1 parent d865973 commit f008d46
Show file tree
Hide file tree
Showing 33 changed files with 71 additions and 9 deletions.
58 changes: 58 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

.pdm.toml
.pdm-python
.pdm-build/

__pypackages__/
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@
Mammath is the python library with all the functions you need to do complicated mathematics, anywhere from 2D and 3D graphing calculators to linear algebra, calculus and even physics. We even have a constant and function for practically everything
<br>

<h1><b> Release notes 0.2.1 - What's new at 25k downloads</b></h1>
<h1><b> Release notes 0.3.0 - our biggest release yet</b></h1>
<ul>
<li>Parser implemented with graphing </li>
<li>Removed a few unnessecary functions and modules for much faster import and install time</li>
<li>Fixed all general functions bugs that we found</li>
<li>Added many complex functions</li>
<li>Many new maths functions, including more support for 2D list matrices</li>
<li>Deprecated old graphing methods, they may be removed in the next release</li>
<li>Methods are all grouped by category. For instance, all calculus functions can be accessed through mammath.calculus, as well as the standard import</li>
<li>Added many new graphs, including the Mandelbrot set (quite spectacular), and other useful plots. The graphing functions have been updated with one function for a function for parametric and Cartesian graphing in 2 and 3 dimensions, as well as complex number functions.</li>
<li>Changed checkers_and_printers to special numbers and refactored the method names to be more intuitive</li>
<li>Added two new tables</li>
<li>Added new sequencing methods (arithmetic sums, geometric sums, etc.)</li>
<li>Created many new physics methods, including time dilation methods, path integrals, and even a photoelectric effect simulator</li>
<li>New linear algebra classes - Vector and Matrix, which each come will useful methods. Methods to compute linear least squares, eigenvalues, and more.</li>
<li>Many new complex functions, including complex hyperbolic methods, the Lambert W function, and the gamma function</li>
<li>New coordinate geometry section. It already has a multitude of features from triangle cevians, special centers, to rotations and harmonic conjguates. We plan to continue expanding this section to a full-on coordinate-based geometry engine with complex geometrical operations</li>
<li>Created many new calculus functions, from integral approximations like the trapezoidal rule, to multivariable calculus (partial derivatives, divergence, and curl). There are also new methods for each calculus function that allow you to visualize the actual function (e.g. derivative calculates the derivative at a point but f_derivative produces a function that can be used to compute, graph, and so much more)</li>
</ul>

Install via <code> pip install mammath </code>
Expand Down
1 change: 0 additions & 1 deletion mammath/.gitignore

This file was deleted.

Binary file modified mammath/__pycache__/Complex.cpython-311.pyc
Binary file not shown.
Binary file removed mammath/__pycache__/Complex.cpython-312.pyc
Binary file not shown.
Binary file removed mammath/__pycache__/Fibonacci.cpython-312.pyc
Binary file not shown.
Binary file removed mammath/__pycache__/Fractions.cpython-312.pyc
Binary file not shown.
Binary file removed mammath/__pycache__/__init__.cpython-312.pyc
Binary file not shown.
Binary file modified mammath/__pycache__/algebra.cpython-311.pyc
Binary file not shown.
Binary file removed mammath/__pycache__/algebra.cpython-312.pyc
Binary file not shown.
Binary file removed mammath/__pycache__/base_conversions.cpython-312.pyc
Binary file not shown.
Binary file modified mammath/__pycache__/calculus.cpython-311.pyc
Binary file not shown.
Binary file removed mammath/__pycache__/calculus.cpython-312.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed mammath/__pycache__/constants.cpython-312.pyc
Binary file not shown.
Binary file not shown.
Binary file modified mammath/__pycache__/geometry.cpython-311.pyc
Binary file not shown.
Binary file removed mammath/__pycache__/geometry.cpython-312.pyc
Binary file not shown.
Binary file modified mammath/__pycache__/graphing.cpython-311.pyc
Binary file not shown.
Binary file removed mammath/__pycache__/graphing.cpython-312.pyc
Binary file not shown.
Binary file removed mammath/__pycache__/helper.cpython-312.pyc
Binary file not shown.
Binary file removed mammath/__pycache__/misc.cpython-312.pyc
Binary file not shown.
Binary file removed mammath/__pycache__/operations.cpython-312.pyc
Binary file not shown.
Binary file removed mammath/__pycache__/physics.cpython-312.pyc
Binary file not shown.
Binary file removed mammath/__pycache__/prime_numbers.cpython-312.pyc
Binary file not shown.
Binary file removed mammath/__pycache__/sequences.cpython-312.pyc
Binary file not shown.
Binary file removed mammath/__pycache__/shunting_yard.cpython-312.pyc
Binary file not shown.
Binary file removed mammath/__pycache__/tables.cpython-312.pyc
Binary file not shown.
Binary file removed mammath/__pycache__/teachers.cpython-312.pyc
Binary file not shown.
Binary file removed mammath/__pycache__/unit_conversions.cpython-312.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion mammath/calculus.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def partial_derivative(function, inputs, var_idx, h = 0.0001):
"""
fi = function(*inputs)
inputs[var_idx] += h
return function(*inputs) - fi) / h
return (function(*inputs) - fi) / h

def del_operator(function, inputs, h = 0.0001):
"""
Expand Down
1 change: 0 additions & 1 deletion mammath/tests/tests.py

This file was deleted.

0 comments on commit f008d46

Please sign in to comment.