--- libqalculate/Calculator.cc.orig 2018-05-15 00:14:33.000000000 -0400 +++ libqalculate/Calculator.cc 2018-05-18 18:05:14.646690898 -0400 @@ -5537,7 +5537,7 @@ return true; } if((i = str.find_first_of(LESS GREATER EQUALS NOT, 0)) != string::npos) { - while((i != string::npos && (str[i] == LESS_CH && i + 1 < str.length() && str[i + 1] == LESS_CH)) || (str[i] == GREATER_CH && i + 1 < str.length() && str[i + 1] == GREATER_CH)) { + while(i != string::npos && ((str[i] == LESS_CH && i + 1 < str.length() && str[i + 1] == LESS_CH) || (str[i] == GREATER_CH && i + 1 < str.length() && str[i + 1] == GREATER_CH))) { i = str.find_first_of(LESS GREATER NOT EQUALS, i + 2); } } @@ -5552,7 +5552,7 @@ } MathOperation s = OPERATION_ADD; while(!c) { - while((i != string::npos && (str[i] == LESS_CH && i + 1 < str.length() && str[i + 1] == LESS_CH)) || (str[i] == GREATER_CH && i + 1 < str.length() && str[i + 1] == GREATER_CH)) { + while(i != string::npos && ((str[i] == LESS_CH && i + 1 < str.length() && str[i + 1] == LESS_CH) || (str[i] == GREATER_CH && i + 1 < str.length() && str[i + 1] == GREATER_CH))) { i = str.find_first_of(LESS GREATER NOT EQUALS, i + 2); while(i != string::npos && str[i] == NOT_CH && str.length() > i + 1 && str[i + 1] == NOT_CH) { i++;