Functions for mathematical algorithms in Python
Expects f
and g
to be passed-in functions with the form:
def f(x):
return expression
For example, if we were to create a quadratic function with arbitrary translations:
quadratic(x):
return x**2-x+4