Index: branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/DerivativeCalculator.cs
===================================================================
--- branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/DerivativeCalculator.cs	(revision 16831)
+++ branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/DerivativeCalculator.cs	(revision 16911)
@@ -143,5 +143,5 @@
         var f = (ISymbolicExpressionTreeNode)branch.Clone();
         var u = (ISymbolicExpressionTreeNode)branch.GetSubtree(0).Clone();
-        return Product(Div(CreateConstant(1.0), Product(CreateConstant(3.0), Square(f))), Derive(u, variableName));
+        return Product(Div(CreateConstant(1.0), Product(CreateConstant(3.0), Square(f))), Derive(u, variableName));  // 1/3 1/cbrt(f(x))^2 d/dx f(x)
       }
       if (branch.Symbol is Cube) {
Index: branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/LinearModelToTreeConverter.cs
===================================================================
--- branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/LinearModelToTreeConverter.cs	(revision 16831)
+++ branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/LinearModelToTreeConverter.cs	(revision 16911)
@@ -38,27 +38,34 @@
       double @const = 0) {
 
-      if (factorCoefficients.Length == 0 && coefficients.Length == 0) throw new ArgumentException();
+      if (factorCoefficients.Length == 0 && coefficients.Length == 0 && @const==0) throw new ArgumentException();
+
+      // Combine both trees
+      ISymbolicExpressionTreeNode add = (new Addition()).CreateTreeNode();
 
       // Create tree for double variables
-      ISymbolicExpressionTree tree = null;      
       if (coefficients.Length > 0) {
-        tree = CreateTree(variableNames, new int[variableNames.Length], coefficients, @const);
-        if (factorCoefficients.Length == 0) return tree;
+        var varTree = CreateTree(variableNames, new int[variableNames.Length], coefficients);
+        foreach (var varNode in varTree.IterateNodesPrefix().OfType<VariableTreeNode>())
+          add.AddSubtree(varNode);
       }
 
       // Create tree for string variables
-      ISymbolicExpressionTree factorTree = null;      
       if (factorCoefficients.Length > 0) {
-        factorTree = CreateTree(factors, factorCoefficients, @const);
-        if (tree == null) return factorTree;  
+        var factorTree = CreateTree(factors, factorCoefficients);
+        foreach (var binFactorNode in factorTree.IterateNodesPrefix().OfType<BinaryFactorVariableTreeNode>())
+          add.AddSubtree(binFactorNode);
       }
 
-      // Combine both trees
-      ISymbolicExpressionTreeNode add = tree.Root.GetSubtree(0).GetSubtree(0);
-      foreach (var binFactorNode in factorTree.IterateNodesPrefix().OfType<BinaryFactorVariableTreeNode>())
-        add.InsertSubtree(add.SubtreeCount - 1, binFactorNode);
+      if (@const!=0.0) {
+        ConstantTreeNode cNode = (ConstantTreeNode)new Constant().CreateTreeNode();
+        cNode.Value = @const;
+        add.AddSubtree(cNode);
+      }
+
+      ISymbolicExpressionTree tree = new SymbolicExpressionTree(new ProgramRootSymbol().CreateTreeNode());
+      ISymbolicExpressionTreeNode startNode = new StartSymbol().CreateTreeNode();
+      tree.Root.AddSubtree(startNode);
+      startNode.AddSubtree(add);
       return tree;
-
-      throw new ArgumentException();
     }
 
Index: branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/TreeToAutoDiffTermConverter.cs
===================================================================
--- branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/TreeToAutoDiffTermConverter.cs	(revision 16831)
+++ branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/TreeToAutoDiffTermConverter.cs	(revision 16911)
@@ -92,4 +92,11 @@
       );
 
+    private static readonly Func<Term, UnaryFunc> cbrt = UnaryFunc.Factory(
+      eval: x => x < 0 ? -Math.Pow(-x, 1.0 / 3) : Math.Pow(x, 1.0 / 3),
+      diff: x => { var cbrt_x = x < 0 ? -Math.Pow(-x, 1.0 / 3) : Math.Pow(x, 1.0 / 3); return 1.0 / (3 * cbrt_x * cbrt_x); }
+      );
+
+
+
     #endregion
 
@@ -250,6 +257,5 @@
       }
       if (node.Symbol is CubeRoot) {
-        return AutoDiff.TermBuilder.Power(
-          ConvertToAutoDiff(node.GetSubtree(0)), 1.0/3.0);
+        return cbrt(ConvertToAutoDiff(node.GetSubtree(0)));
       }
       if (node.Symbol is Sine) {
Index: branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionCSharpFormatter.cs
===================================================================
--- branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionCSharpFormatter.cs	(revision 16831)
+++ branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionCSharpFormatter.cs	(revision 16911)
@@ -140,5 +140,7 @@
           FormatPower(node, strBuilder, "3");
         } else if (node.Symbol is CubeRoot) {
-          FormatPower(node, strBuilder, "1.0/3");
+          strBuilder.Append("Cbrt(");
+          FormatRecursively(node.GetSubtree(0), strBuilder);
+          strBuilder.Append(")");
         } else if (node.Symbol is Power) {
           FormatFunction(node, "Math.Pow", strBuilder);
@@ -252,4 +254,5 @@
       strBuilder.AppendLine("public static class Model {");
       GenerateAverageSource(strBuilder);
+      GenerateCbrtSource(strBuilder);
       GenerateIfThenElseSource(strBuilder);
       GenerateFactorSource(strBuilder);
@@ -293,4 +296,9 @@
       strBuilder.AppendLine("private static double Average(params double[] values) {");
       strBuilder.AppendLine("  return values.Average();");
+      strBuilder.AppendLine("}");
+    }
+    private void GenerateCbrtSource(StringBuilder strBuilder) {
+      strBuilder.AppendLine("private static double Cbrt(double x) {");
+      strBuilder.AppendLine("  return x < 0 ? -Math.Pow(-x, 1.0 / 3.0) : Math.Pow(x, 1.0 / 3.0);");
       strBuilder.AppendLine("}");
     }
Index: branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionExcelFormatter.cs
===================================================================
--- branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionExcelFormatter.cs	(revision 16831)
+++ branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionExcelFormatter.cs	(revision 16911)
@@ -133,5 +133,5 @@
           stringBuilder.Append(")");
         }
-        stringBuilder.Append(")");
+        stringBuilder.Append("))");
       } else if (symbol is Constant) {
         ConstantTreeNode constantTreeNode = node as ConstantTreeNode;
@@ -144,5 +144,6 @@
         stringBuilder.Append($"POWER({FormatRecursively(node.GetSubtree(0))}, 3)");
       } else if (symbol is CubeRoot) {
-        stringBuilder.Append($"POWER({FormatRecursively(node.GetSubtree(0))}, 1/3)");
+        var arg_expr = FormatRecursively(node.GetSubtree(0));
+        stringBuilder.Append($"IF({arg_expr} < 0, -POWER(-{arg_expr}, 1/3), POWER({arg_expr}, 1/3))");
       } else if (symbol is Division) {
         if (node.SubtreeCount == 1) {
Index: branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionLatexFormatter.cs
===================================================================
--- branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionLatexFormatter.cs	(revision 16831)
+++ branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionLatexFormatter.cs	(revision 16911)
@@ -138,5 +138,5 @@
         strBuilder.Append(@"\left(");
       } else if (node.Symbol is CubeRoot) {
-        strBuilder.Append(@"\left(");
+        strBuilder.Append(@"\operatorname{cbrt}\left(");
       } else if (node.Symbol is Sine) {
         strBuilder.Append(@"\sin \left( ");
@@ -420,5 +420,5 @@
         strBuilder.Append(@"\right)^3");
       } else if (node.Symbol is CubeRoot) {
-        strBuilder.Append(@"\right)^\frac{1}{3}");
+        strBuilder.Append(@"\right)");
       } else if (node.Symbol is Sine) {
         strBuilder.Append(@" \right) ");
Index: branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionMATLABFormatter.cs
===================================================================
--- branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionMATLABFormatter.cs	(revision 16831)
+++ branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionMATLABFormatter.cs	(revision 16911)
@@ -188,7 +188,7 @@
         stringBuilder.Append(").^3");
       } else if (symbol is CubeRoot) {
-        stringBuilder.Append("(");
-        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
-        stringBuilder.Append(").^(1/3)");
+        stringBuilder.Append("NTHROOT(");
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(", 3)");
       } else if (symbol is GreaterThan) {
         stringBuilder.Append("((");
Index: branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionMathematicaFormatter.cs
===================================================================
--- branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionMathematicaFormatter.cs	(revision 16831)
+++ branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionMathematicaFormatter.cs	(revision 16911)
@@ -115,5 +115,7 @@
           FormatPower(node, strBuilder, "3");
         } else if (node.Symbol is CubeRoot) {
-          FormatPower(node, strBuilder, "1/3");
+          strBuilder.Append("CubeRoot[");
+          FormatRecursively(node.GetSubtree(0), strBuilder);
+          strBuilder.Append("]");
         } else if (node.Symbol is Power) {
           FormatFunction(node, "Power", strBuilder);
Index: branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionSmalltalkFormatter.cs
===================================================================
--- branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionSmalltalkFormatter.cs	(revision 16831)
+++ branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionSmalltalkFormatter.cs	(revision 16911)
@@ -92,5 +92,6 @@
         stringBuilder.Append(FormatPower(node.GetSubtree(0), "3"));
       } else if (symbol is CubeRoot) {
-        stringBuilder.Append(FormatPower(node.GetSubtree(0), "(1/3)"));
+        stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
+        stringBuilder.Append(" cbrt");
       } else if (symbol is Division) {
         if (node.SubtreeCount == 1) {
Index: branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/BatchOperations.cs
===================================================================
--- branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/BatchOperations.cs	(revision 16831)
+++ branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/BatchOperations.cs	(revision 16911)
@@ -101,5 +101,5 @@
     public static void CubeRoot(double[] a, double[] b) {
       for (int i = 0; i < BATCHSIZE; ++i)
-        a[i] = Math.Pow(b[i], 1d / 3d);
+        a[i] = b[i] < 0 ? -Math.Pow(-b[i], 1d / 3d) : Math.Pow(b[i], 1d / 3d);
     }
 
Index: branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionCompiledTreeInterpreter.cs
===================================================================
--- branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionCompiledTreeInterpreter.cs	(revision 16831)
+++ branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionCompiledTreeInterpreter.cs	(revision 16911)
@@ -247,5 +247,7 @@
         case OpCodes.CubeRoot: {
             var arg = MakeExpr(node.GetSubtree(0), variableIndices, row, columns);
-            return Expression.Power(arg, Expression.Constant(1.0 / 3.0));
+            return Expression.Condition(Expression.LessThan(arg, Expression.Constant(0.0)),
+              Expression.Negate(Expression.Power(Expression.Negate(arg), Expression.Constant(1.0 / 3.0))),
+              Expression.Power(arg, Expression.Constant(1.0 / 3.0)));
           }
         case OpCodes.Root: {
@@ -514,6 +516,6 @@
             var x1 = MakeExpr(node.GetSubtree(0), variableIndices, row, columns);
             var x2 = MakeExpr(node.GetSubtree(1), variableIndices, row, columns);
-            return Expression.Divide(x1, 
-              Expression.Call(Sqrt, 
+            return Expression.Divide(x1,
+              Expression.Call(Sqrt,
               Expression.Add(
                 Expression.Constant(1.0),
Index: branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs
===================================================================
--- branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs	(revision 16831)
+++ branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs	(revision 16911)
@@ -336,6 +336,20 @@
         case OpCodes.CubeRoot: {
             CompileInstructions(il, state, ds);
+            var c1 = il.DefineLabel();
+            var end = il.DefineLabel();
+
+            il.Emit(System.Reflection.Emit.OpCodes.Dup); // x
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, 0.0);
+            il.Emit(System.Reflection.Emit.OpCodes.Clt); // x < 0?
+            il.Emit(System.Reflection.Emit.OpCodes.Brfalse, c1);
+            il.Emit(System.Reflection.Emit.OpCodes.Neg); // x = -x
             il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, 1.0 / 3.0);
             il.Emit(System.Reflection.Emit.OpCodes.Call, power);
+            il.Emit(System.Reflection.Emit.OpCodes.Neg); // -Math.Pow(-x, 1/3)
+            il.Emit(System.Reflection.Emit.OpCodes.Br, end);
+            il.MarkLabel(c1);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, 1.0 / 3.0);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, power);
+            il.MarkLabel(end);
             return;
           }
Index: branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeInterpreter.cs
===================================================================
--- branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeInterpreter.cs	(revision 16831)
+++ branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeInterpreter.cs	(revision 16911)
@@ -232,5 +232,6 @@
           }
         case OpCodes.CubeRoot: {
-            return Math.Pow(Evaluate(dataset, ref row, state), 1.0 / 3.0);
+            var arg = Evaluate(dataset, ref row, state);
+            return arg < 0 ? -Math.Pow(-arg, 1.0 / 3.0) : Math.Pow(arg, 1.0 / 3.0);
           }
         case OpCodes.Root: {
Index: branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeLinearInterpreter.cs
===================================================================
--- branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeLinearInterpreter.cs	(revision 16831)
+++ branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeLinearInterpreter.cs	(revision 16911)
@@ -245,5 +245,6 @@
           instr.value = Math.Sqrt(code[instr.childIndex].value);
         } else if (instr.opCode == OpCodes.CubeRoot) {
-          instr.value = Math.Pow(code[instr.childIndex].value, 1.0 / 3.0);
+          var arg = code[instr.childIndex].value;
+          instr.value = arg < 0 ? -Math.Pow(-arg, 1.0 / 3.0) : Math.Pow(arg, 1.0 / 3.0);
         } else if (instr.opCode == OpCodes.Root) {
           double x = code[instr.childIndex].value;
Index: branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Selectors/DiversitySelector.cs
===================================================================
--- branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Selectors/DiversitySelector.cs	(revision 16831)
+++ branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Selectors/DiversitySelector.cs	(revision 16911)
@@ -100,6 +100,14 @@
     #region Events
     private void RegisterParameterEventHandlers() {
-      SelectorParameter.ValueChanged += new EventHandler(SelectorParameter_ValueChanged);
-      CopySelected.ValueChanged += new EventHandler(CopySelected_ValueChanged);
+      SelectorParameter.ValueChanged += SelectorParameter_ValueChanged;
+      CopySelectedParameter.ValueChanged += CopySelectedParameter_ValueChanged;
+      CopySelected.ValueChanged += CopySelected_ValueChanged;
+    }
+
+    private void CopySelectedParameter_ValueChanged(object sender, EventArgs e) {
+      if (CopySelected.Value != true) {
+        CopySelected.Value = true;
+      }
+      CopySelected.ValueChanged += CopySelected_ValueChanged;
     }
 
