18 Commits
Author SHA1 Message Date
CarlosZamGChristian Clausscclausspre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
836bd712a1 Add algorithm for approximating the nth root with Newton's Method (#11509)
* Add algorithm for approximating the nth root with Newton's Method

* updating DIRECTORY.md

* Fix typos in nth_root.py documentation and code

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-09-23 07:42:48 +02:00
Raj Srivastavapre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>Christian Clausscclauss
dca13f6ff9 Implement Gauss-Seidel method for solving linear systems. (#13535)
* Add Gauss-Seidel method implementation

Implement Gauss-Seidel method for solving linear systems.

* Update gauss-seidel-method.py

* Rename gauss-seidel-method.py to gauss_seidel_method.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Rename parameters in Gauss-Seidel method

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Enhance gauss_seidel function documentation and code style

Refactor gauss_seidel method for improved readability and clarity.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Enhance Gauss-Seidel method with result rounding

Added rounding to results for stable test comparison.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Clean up comments in Gauss-Seidel method

Removed comments related to convergence check and result rounding.

* updating DIRECTORY.md

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
2026-09-14 06:25:41 +02:00
Christian Clauss 0525ef5da8 ruff rule ANN202 missing-return-type-private-function (#15298)
* ruff rule ANN202 missing-return-type-private-function

* ruff rule ANN202 missing-return-type-private-function
2026-09-12 21:47:08 +02:00
Christian Claussandcclauss 7bd1e983c3 ruff rules RET for return statements (#15301)
* updating DIRECTORY.md

* ruff rules RET for return statements

---------

Co-authored-by: cclauss <cclauss@users.noreply.github.com>
2026-09-12 21:33:52 +02:00
debesh00800debeshpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>Christian Clauss
16e3b40408 Add Brent's Method for root finding (numerical analysis) (#13063)
* Add Brent's Method for root finding (numerical analysis)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix parameter names and lint issues in Brent's Method

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix import name

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Rename maths/brent_method.py to maths/numerical_analysis/brent_method.py

---------

Co-authored-by: debesh <debeshmaheshwari008@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2026-09-08 17:43:43 +02:00
__Adityaandpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> 4394fd93d3 Weierstrass Method (#12877)
* Add weierstrass_method for approximating complex roots

- Implements Durand-Kerner (Weierstrass) method for polynomial root finding
- Accepts user-defined polynomial function and degree
- Uses random perturbation of complex roots of unity for initial guesses
- Handles validation, overflow clipping, and includes doctest

* Update weierstrass_method.py
* add more tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update weierstrass_method.py

* Update weierstrass_method.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-08-29 17:33:43 +01:00
pre-commit-ci[bot]pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>Christian Clauss
4fe50bc1fc [pre-commit.ci] pre-commit autoupdate -- ruff 2025 stable format (#12521)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.8.6 → v0.9.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.8.6...v0.9.1)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update maths/dual_number_automatic_differentiation.py

* Update maths/dual_number_automatic_differentiation.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update dual_number_automatic_differentiation.py

* Update dual_number_automatic_differentiation.py

* No <fin-streamer> tag with the specified data-test attribute found.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2025-01-13 21:52:12 +01:00
Shikhar Maheshwari 24923ee635 Add doctest to maths/numerical_analysis/intersection.py (#12148) 2024-12-30 13:51:10 +03:00
Christian Clauss 0177ae1cd5 Upgrade to Python 3.13 (#11588) 2024-09-30 23:01:15 +02:00
CarlosZamG ed1900f1b3 Fix typo in integration_by_simpson_approx.py (#11501) 2024-08-06 01:44:58 -07:00
Maxim SmolskiyandChristian Clauss 4700297b3e Enable ruff RUF002 rule (#11377)
* Enable ruff RUF002 rule

* Fix

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
2024-04-22 21:51:47 +02:00
Maxim Smolskiy f437f92279 Enable ruff INP001 rule (#11346)
* Enable ruff INP001 rule

* Fix

* Fix

* Fix

* Fix

* Fix
2024-04-02 21:13:56 +02:00
MargaretChristian Clausspre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
8faf823e83 adding a proper fractions algorithm (#11224)
* adding a proper fractions algorithm

* Implementing suggestions in maths/numerical_analysis/proper_fractions.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Implementing suggestions to proper_fractions.py

* Fixing ruff errors in proper_fractions.py

* Apply suggestions from code review

* ruff check --output-format=github .

* Update maths/numerical_analysis/proper_fractions.py

* Update proper_fractions.py

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-20 14:33:40 +01:00
pre-commit-ci[bot]andpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> bc8df6de31 [pre-commit.ci] pre-commit autoupdate (#11322)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.2.2 → v0.3.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.2.2...v0.3.2)
- [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.9.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.8.0...v1.9.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-13 07:52:41 +01:00
Ravi Kumarpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>Christian Clauss
444dfb0a0f Added adams-bashforth method of order 2, 3, 4, 5 (#10969)
* added runge kutta gills method

* added adams-bashforth method of order 2, 3, 4, 5

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update adams_bashforth.py

* Deleted extraneous file, maths/numerical_analysis/runge_kutta_gills.py

* Added doctests to each function adams_bashforth.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update adams_bashforth.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2023-10-29 00:12:17 +02:00
Ravi KumarandTianyi Zheng c71c280726 added runge kutta gills method to maths/ numerical_analysis (#10967)
* added runge kutta gills method

* Apply suggestions from code review

---------

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
2023-10-26 03:20:28 -04:00
Tianyi Zhengandgithub-actions b98312ca9f Consolidate Newton-Raphson implementations (#10859)
* updating DIRECTORY.md

* updating DIRECTORY.md

* Consolidate Newton-Raphson duplicates

* Rename consolidated Newton-Raphson file

* updating DIRECTORY.md

* updating DIRECTORY.md

* Fix doctest precision

* Fix doctest precision again

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-10-23 16:37:17 -04:00
Tianyi Zhengandgithub-actions a8b6bda993 Delete arithmetic_analysis/ directory and relocate its contents (#10824)
* Remove eval from arithmetic_analysis/newton_raphson.py

* Relocate contents of arithmetic_analysis/

Delete the arithmetic_analysis/ directory and relocate its files because
the purpose of the directory was always ill-defined. "Arithmetic
analysis" isn't a field of math, and the directory's files contained
algorithms for linear algebra, numerical analysis, and physics.

Relocated the directory's linear algebra algorithms to linear_algebra/,
its numerical analysis algorithms to a new subdirectory called
maths/numerical_analysis/, and its single physics algorithm to physics/.

* updating DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-10-23 09:31:30 +02:00