public static int CalculateEqualizationDifNo(List <Expression> seq) { //Console.WriteLine("calculating: ================================"); int no = 0; bool found = false; List <Expression> last = seq; while (!found) { // Console.Write("last = "); //foreach (var item in last) { // Console.Write(Infix.Print(item)+","); } //Console.WriteLine(); //* if (last.TrueForAll(x => Infix.PrintStrict(last.Last()) == Infix.PrintStrict(x))) { // Console.Write(" Last - x =" + Infix.Print(last.Last() - x)); found = true; continue; }//*/ last = GetDifference(last); no++; } return(no); }