- Timestamp:
- 04/27/21 10:40:49 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/IntervalArithBoundsEstimator.cs
r17911 r17964 223 223 break; 224 224 } 225 case OpCodes.Power: { 226 var a = Evaluate(instructions, ref instructionCounter, nodeIntervals, variableIntervals); 227 var b = Evaluate(instructions, ref instructionCounter, nodeIntervals, variableIntervals); 228 // support only integer powers 229 if (b.LowerBound == b.UpperBound && Math.Truncate(b.LowerBound) == b.LowerBound) { 230 result = Interval.Power(a, (int)b.LowerBound); 231 } else { 232 throw new NotSupportedException("Interval is only supported for integer powers"); 233 } 234 break; 235 } 225 236 case OpCodes.Absolute: { 226 237 var argumentInterval = Evaluate(instructions, ref instructionCounter, nodeIntervals, variableIntervals); … … 329 340 !(n.Symbol is Cube) && 330 341 !(n.Symbol is CubeRoot) && 342 !(n.Symbol is Power) && 331 343 !(n.Symbol is Absolute) && 332 344 !(n.Symbol is AnalyticQuotient)
Note: See TracChangeset
for help on using the changeset viewer.