Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e0936a2

Browse files
committedOct 31, 2024·
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 8795283 commit e0936a2

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed
 

‎maths/numerical_analysis/fixed_point_iteration.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ def quadratic_transform(value: float) -> float:
6161
return (value**2 + 2) / 3
6262

6363
root = fixed_point_iteration(
64-
iteration_function=quadratic_transform,
65-
initial_guess=1.0
64+
iteration_function=quadratic_transform, initial_guess=1.0
6665
)
6766
print(f"The root is: {root}")

‎maths/numerical_analysis/modified_newton_raphson.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def modified_newton_raphson(
2424
derivative_function: Callable[[float], float],
2525
initial_guess: float,
2626
tolerance: float = 1e-7,
27-
max_iterations: int = 1000
27+
max_iterations: int = 1000,
2828
) -> float:
2929
"""
3030
Perform the Modified Newton-Raphson method to find the root of f(x) = 0.
@@ -78,6 +78,6 @@ def derivative_polynomial_function(value: float) -> float:
7878
root = modified_newton_raphson(
7979
function=polynomial_function,
8080
derivative_function=derivative_polynomial_function,
81-
initial_guess=2.0
81+
initial_guess=2.0,
8282
)
8383
print(f"The root is: {root}")

0 commit comments

Comments
 (0)
Please sign in to comment.