From 01929635e85b9302445f2b77fe9ad3194160f61d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Mon, 1 Oct 2018 10:46:35 +0200 Subject: [PATCH] [poincare] Fix derivative missing argument --- apps/graph/cartesian_function.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/graph/cartesian_function.cpp b/apps/graph/cartesian_function.cpp index 73cfc7327..1d7c541c5 100644 --- a/apps/graph/cartesian_function.cpp +++ b/apps/graph/cartesian_function.cpp @@ -26,7 +26,8 @@ void CartesianFunction::setDisplayDerivative(bool display) { } double CartesianFunction::approximateDerivative(double x, Poincare::Context * context) const { - Poincare::Derivative derivative(expression(context).clone(), Poincare::Float(x)); // derivative takes ownership of Poincare::Float(x) and the clone of expression + const char xUnknown[] = {Symbol::SpecialSymbols::UnknownX, 0}; + Poincare::Derivative derivative(expression(context).clone(), Symbol(xUnknown, 1), Poincare::Float(x)); // derivative takes ownership of Poincare::Float(x) and the clone of expression /* TODO: when we will approximate derivative, we might want to simplify the * derivative here. However, we might want to do it once for all x (to avoid * lagging in the derivative table. */