mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-20 01:08:15 +01:00
[poincare] Replace Poincare::Complex by std::complex
This commit is contained in:
@@ -21,9 +21,9 @@ void CartesianFunction::setDisplayDerivative(bool display) {
|
||||
}
|
||||
|
||||
double CartesianFunction::approximateDerivative(double x, Poincare::Context * context) const {
|
||||
Poincare::Complex<double> abscissa = Poincare::Complex<double>::Float(x);
|
||||
Poincare::Expression * args[2] = {expression(context), &abscissa};
|
||||
Poincare::Derivative derivative(args, true);
|
||||
Poincare::Expression * abscissa = Expression::CreateDecimal(x);
|
||||
Poincare::Expression * args[2] = {expression(context)->clone(), abscissa};
|
||||
Poincare::Derivative derivative(args, false); // derivative takes ownership of abscissa and the clone of expression
|
||||
/* TODO: when we will simplify 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. */
|
||||
@@ -31,10 +31,10 @@ double CartesianFunction::approximateDerivative(double x, Poincare::Context * co
|
||||
}
|
||||
|
||||
double CartesianFunction::sumBetweenBounds(double start, double end, Poincare::Context * context) const {
|
||||
Poincare::Complex<double> x = Poincare::Complex<double>::Float(start);
|
||||
Poincare::Complex<double> y = Poincare::Complex<double>::Float(end);
|
||||
Poincare::Expression * args[3] = {expression(context), &x, &y};
|
||||
Poincare::Integral integral(args, true);
|
||||
Poincare::Expression * x = Expression::CreateDecimal(start);
|
||||
Poincare::Expression * y = Expression::CreateDecimal(end);
|
||||
Poincare::Expression * args[3] = {expression(context)->clone(), x, y};
|
||||
Poincare::Integral integral(args, false); // Integral takes ownership of args
|
||||
/* TODO: when we will simplify integral, we might want to simplify the
|
||||
* integral here. However, we might want to do it once for all x (to avoid
|
||||
* lagging in the derivative table. */
|
||||
|
||||
Reference in New Issue
Block a user