[poincare/constant] Constants differentiate to 0

This commit is contained in:
Gabriel Ozouf
2020-12-02 11:31:05 +01:00
committed by LeaNumworks
parent a178c88e54
commit 764d14fed1
2 changed files with 13 additions and 0 deletions

View File

@@ -50,6 +50,9 @@ public:
Expression shallowReduce(ReductionContext reductionContext) override;
LayoutShape leftLayoutShape() const override { return LayoutShape::OneLetter; };
/* Derivation */
bool derivate(ReductionContext reductionContext, Expression symbol, Expression symbolValue) override;
private:
char m_name[0]; // MUST be the last member variable
@@ -70,6 +73,7 @@ public:
// Simplification
Expression shallowReduce(ExpressionNode::ReductionContext reductionContext);
bool derivate(ExpressionNode::ReductionContext reductionContext, Expression symbol, Expression symbolValue);
private:
ConstantNode * node() const { return static_cast<ConstantNode *>(Expression::node()); }