Skip to content

Commit

Permalink
Contributes to TheAlgorithms#9943
Browse files Browse the repository at this point in the history
  • Loading branch information
shikhar-sm committed Oct 18, 2024
1 parent 03a4251 commit 6652fde
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions maths/numerical_analysis/intersection.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ def intersection(function: Callable[[float], float], x0: float, x1: float) -> fl


def f(x: float) -> float:
"""
function is f(x) = x^3 - 2x - 5
>>> f(2)
-1.0
"""
return math.pow(x, 3) - (2 * x) - 5


Expand Down

0 comments on commit 6652fde

Please sign in to comment.