def test_implicit_multiplication(self): """ The query "(x^k)/k! exp(-x)" fails because the implicit multplication function in the preparser doesn't handle the "!" """ expression = Expression("(x^k)/k! exp(-x)") expression.taylor_series()
def series(): """ Endpoint to get the taylor series expansion of a function """ query = request.args.get('query') if query: # TODO later we're going to want to return some JSON to the frontend # TODO user input might not be something we can actually process, we # should handle that case (ideally help the user figure out what we # don't understand) expression = Expression(query) return expression.taylor_series() else: return ""