mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-20 14:20:39 +01:00
[poincare] Clean power implementation
Change-Id: I17f01cd7dc10a9864571c3fd76d44ff8da9b3fc0
This commit is contained in:
@@ -3,7 +3,6 @@ extern "C" {
|
||||
#include <stdlib.h>
|
||||
}
|
||||
#include <poincare/matrix_data.h>
|
||||
#include <poincare/integer.h>
|
||||
|
||||
namespace Poincare {
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ Expression * Power::evaluateOnComplex(Complex * c, Complex * d, Context& context
|
||||
}
|
||||
|
||||
Expression * Power::evaluateOnMatrixAndComplex(Matrix * m, Complex * c, Context& context, AngleUnit angleUnit) const {
|
||||
if (m_operands[1]->type() != Expression::Type::Integer) {
|
||||
if (isnan(m_operands[1]->approximate(context, angleUnit)) || m_operands[1]->approximate(context, angleUnit) != (int)m_operands[1]->approximate(context, angleUnit)) {
|
||||
return new Complex(Complex::Float(NAN));
|
||||
}
|
||||
if (m->numberOfColumns() != m->numberOfRows()) {
|
||||
|
||||
Reference in New Issue
Block a user