Ignore:
Timestamp:
04/23/21 18:26:45 (6 months ago)
Author:
gkronber
Message:

#3121: support integer powers in interval arithmetic (and two simplification rules)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/TreeSimplifier.cs

    r17820 r17963  
    784784      } else if (IsExp(node)) {
    785785        return MakeExp(MakeProduct(node.GetSubtree(0), MakeConstant(2.0))); // sqr(exp(x)) = exp(2x)
     786      } else if (IsSquare(node)) {
     787        return MakePower(node.GetSubtree(0), MakeConstant(4));
    786788      } else if (IsCube(node)) {
    787789        return MakePower(node.GetSubtree(0), MakeConstant(6));
     
    809811      } else if (IsSquare(node)) {
    810812        return MakePower(node.GetSubtree(0), MakeConstant(6));
     813      } else if (IsCube(node)) {
     814        return MakePower(node.GetSubtree(0), MakeConstant(9));
    811815      } else {
    812816        var cubeNode = cubeSymbol.CreateTreeNode();
Note: See TracChangeset for help on using the changeset viewer.