Content deleted Content added
inserted blank line |
|||
Line 119:
def steff(f: Func, x: float, tol: float) -> Iterator[float]:
"""
This recursive generator yields the x_{n+1} value first then, when the generator iterates,
Line 131:
while True:
if n > 1000:
print(
break
else:
Line 146 ⟶ 145:
x = x - fx / gx # Update to x_{n+1}
yield x # Yield value
</syntaxhighlight>
|