Index: branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/Interpreter.cs
===================================================================
--- branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/Interpreter.cs	(revision 16738)
+++ branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/Interpreter.cs	(revision 16744)
@@ -285,5 +285,5 @@
         var g = code[0].value.Gradient;
         for (int j = 0; j < nParams; ++j) {
-          if(g.Elements.TryGetValue(j, out AlgebraicDoubleVector v)) {
+          if (g.Elements.TryGetValue(j, out AlgebraicDoubleVector v)) {
             v.CopyColumnTo(jac, j, rowIndex, BATCHSIZE);
           } else {
@@ -490,10 +490,10 @@
     public AlgebraicDouble AssignSin(AlgebraicDouble a) { Value = Math.Sin(a.Value); return this; }
     public AlgebraicDouble AssignCos(AlgebraicDouble a) { Value = Math.Cos(a.Value); return this; }
-    public AlgebraicDouble AssignLog(AlgebraicDouble a) { Value = a.Value <= 0?double.NegativeInfinity : Math.Log(a.Value); return this; } // alternative definiton of log to prevent NaN
+    public AlgebraicDouble AssignLog(AlgebraicDouble a) { Value = a.Value <= 0 ? double.NegativeInfinity : Math.Log(a.Value); return this; } // alternative definiton of log to prevent NaN
     public AlgebraicDouble AssignExp(AlgebraicDouble a) { Value = Math.Exp(a.Value); return this; }
     public AlgebraicDouble AssignIntPower(AlgebraicDouble a, int p) { Value = Math.Pow(a.Value, p); return this; }
     public AlgebraicDouble AssignIntRoot(AlgebraicDouble a, int r) { Value = Math.Pow(a.Value, 1.0 / r); return this; }
     public AlgebraicDouble AssignAbs(AlgebraicDouble a) { Value = Math.Abs(a.Value); return this; }
-    public AlgebraicDouble AssignSgn(AlgebraicDouble a) { Value = double.IsNaN(a.Value)? double.NaN : Math.Sign(a.Value); return this; }
+    public AlgebraicDouble AssignSgn(AlgebraicDouble a) { Value = double.IsNaN(a.Value) ? double.NaN : Math.Sign(a.Value); return this; }
     public AlgebraicDouble Clone() { return new AlgebraicDouble(Value); }
 
@@ -828,44 +828,27 @@
     }
 
-//     Exponentiation by a natural power[a, b] k:
-// 
-// if 0∈[a, b], then
-//   [a, b]^0	 = 	[0, 1]
-//   [a, b]^2n   =  [0, max(a2n, b2n)]
-//   [a, b]^2n+1	 = 	[a2n+1, b2n+1]
-// if [a, b]>0, then
-//   [a, b]^0	 = 	[1, 1]
-//   [a, b]^k>0	 = 	[ak, bk]
-// if [a, b]<0, then
-//   [a, b]^0	 = 	[1, 1]
-//   [a, b]^2n   =  [b2n, a2n]
-//   [a, b]^2n+1	 = 	[a2n+1, b2n+1]
-
     public AlgebraicInterval AssignIntPower(AlgebraicInterval a, int p) {
-      if (p == 0) {
-        // => 1
-        low = new MultivariateDual<AlgebraicDouble>(1.0);
-        high = new MultivariateDual<AlgebraicDouble>(1.0);
-        return this;
-      }
-      if (p == 1) return this;
-
       if (p < 0) {  // x^-3 == 1/(x^3)
         AssignIntPower(a, -p);
         return AssignInv(this);
-      } else {
+      } else if (p == 0) {
+        if (a.Contains(0.0)) {
+          // => 0^0 = 0 ; might not be relevant
+          low = new MultivariateDual<AlgebraicDouble>(0.0);
+          high = new MultivariateDual<AlgebraicDouble>(1.0);
+          return this;
+        } else {
+          // => 1
+          low = new MultivariateDual<AlgebraicDouble>(1.0);
+          high = new MultivariateDual<AlgebraicDouble>(1.0);
+          return this;
+        }
+      } else if (p == 1) return this;
+      else if (p % 2 == 0) {
         // p is even => interval must be positive
-        if (p % 2 == 0) {
-          if (a.Contains(0.0)) {
-            low = new MultivariateDual<AlgebraicDouble>(0.0);
-            high = Algebraic.Max(a.low.IntPower(p), a.high.IntPower(p));
-          } else {
-            var lowPower = a.low.IntPower(p);
-            var highPower = a.high.IntPower(p);
-            low = Algebraic.Min(lowPower, highPower);
-            high = Algebraic.Max(lowPower, highPower);
-          }
+        if (a.Contains(0.0)) {
+          low = new MultivariateDual<AlgebraicDouble>(0.0);
+          high = Algebraic.Max(a.low.IntPower(p), a.high.IntPower(p));
         } else {
-          // p is uneven
           var lowPower = a.low.IntPower(p);
           var highPower = a.high.IntPower(p);
@@ -873,6 +856,17 @@
           high = Algebraic.Max(lowPower, highPower);
         }
-        return this;
-      }
+      } else {
+        // p is uneven
+        if (a.Contains(0.0)) {
+          low.AssignIntPower(a.low, p);
+          high.AssignIntPower(a.high, p);
+        } else {
+          var lowPower = a.low.IntPower(p);
+          var highPower = a.high.IntPower(p);
+          low = Algebraic.Min(lowPower, highPower);
+          high = Algebraic.Max(lowPower, highPower);
+        }
+      }
+      return this;
     }
 
