solveToZero¶
Perform iterative calculations, changing one variable until another reaches zero.
solveToZero(
functionToSolve,
startingValue=0
)
Arguments¶
functionToSolve- The function that should be solved to zero. Currently, this can only be another variable that can contain a function that should be solved.
startingValue- The starting value for the variable that calls this function. By default, the starting value is zero.
Examples¶
x = solveToZero(y,0.01)
y = x^2 - 4
This would change x, until y is solved to 0. Because the starting value was >0, x will solve to 2 (as opposed
to -2 if the starting value was <0)