MCPcopy Create free account
hub / github.com/cfgnunes/numerical-methods-python / example_limit_epsilon_delta

Function example_limit_epsilon_delta

main.py:35–55  ·  view source on GitHub ↗

Run an example 'Limits: epsilon-delta definition'.

()

Source from the content-addressed store, hash-verified

33
34@print_docstring
35def example_limit_epsilon_delta():
36 """Run an example 'Limits: epsilon-delta definition'."""
37 def f(x):
38 return math.sin(x) / x
39
40 x = 0
41 toler = 10 ** -5
42 iter_max = 100
43
44 print("Inputs:")
45 print(f"x = {x}")
46 print(f"toler = {toler}")
47 print(f"iter_max = {iter_max}")
48
49 print("Execution:")
50 limit, i, converged = limits.limit_epsilon_delta(f, x, toler, iter_max)
51
52 print("Output:")
53 print(f"limit = {limit:.5f}")
54 print(f"i = {i}")
55 print(f"converged = {converged}")
56
57
58@print_docstring

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected