public override float Solve(float n) { float Left = Child1.Solve(n); float Right = Child2.Solve(Left - n); if (Child1.evaluate(Left) - Child2.evaluate(Left) != n) { if (Child1.evaluate(Right) - Child2.evaluate(Right) != n) { Right = Child2.Solve(n); Left = Child1.Solve(Right - n); if (Child1.evaluate(Left) - Child2.evaluate(Left) != n) { if (Child1.evaluate(Right) - Child2.evaluate(Right) != n) { return(float.PositiveInfinity); } return(Right); } return(Left); } return(Right); } return(Left); }