Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/18/18 15:29:59 (6 years ago)
Author:
gkronber
Message:

#2915: implemented all symbols in all interpreters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2915-AbsoluteSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeLinearInterpreter.cs

    r16236 r16238  
    233233        } else if (instr.opCode == OpCodes.Tan) {
    234234          instr.value = Math.Tan(code[instr.childIndex].value);
    235         } else if (instr.opCode == OpCodes.Square) {
     235        } else if(instr.opCode == OpCodes.Square) {
    236236          instr.value = Math.Pow(code[instr.childIndex].value, 2);
     237        } else if(instr.opCode == OpCodes.Cube) {
     238          instr.value = Math.Pow(code[instr.childIndex].value, 3);
    237239        } else if (instr.opCode == OpCodes.Power) {
    238240          double x = code[instr.childIndex].value;
    239241          double y = Math.Round(code[instr.childIndex + 1].value);
    240242          instr.value = Math.Pow(x, y);
    241         } else if (instr.opCode == OpCodes.SquareRoot) {
     243        } else if(instr.opCode == OpCodes.SquareRoot) {
    242244          instr.value = Math.Sqrt(code[instr.childIndex].value);
     245        } else if(instr.opCode == OpCodes.CubeRoot) {
     246          instr.value = Math.Pow(code[instr.childIndex].value, 1.0 / 3.0);
    243247        } else if (instr.opCode == OpCodes.Root) {
    244248          double x = code[instr.childIndex].value;
Note: See TracChangeset for help on using the changeset viewer.