// Arithmetic and Relational Operators combined // one arithOp1 two relOp three arithOp2 four // Even though this topic comes AFTER Relational, // since Arithmetic is the more important topic, // it is Arithmetic.Relational rather than Relational.Arithmetic // Given classes of precedences: // * / % are Arithmetic.High // + - are Arithmetic.Low // < <= > >= are Relational.High // == != are Relational.Low // We identify four types of precedences among // arithmetic and relational operators: // Low.High.Precedence e.g., + and <= // Low.Low.Precedence e.g., - and == // High.High.Precedence e.g., * and >= // High.Low.Precedence e.g,. % and != // The lowest class among all the operators of Arithmetic or Relational // is used to classify the combination, e.g,. // expression using * + < is Low.High // ---------------------------------------------- # 101 Arithmetic.Relational.Low.High.Precedence > 3 + 9 < 7 + 8 > Type: expression Hardness: 20 # 102 Arithmetic.Relational.Low.High.Precedence > 6 + 7 < 15 - 3 > Type: expression Hardness: 20 # 103 Arithmetic.Relational.Low.High.Precedence > 4 + 8 < 6 * 2 > Type: expression Hardness: 20 # 104 Arithmetic.Relational.Low.High.Precedence > 3 + 4 < 13 % 7 > Type: expression Hardness: 20 # 105 Arithmetic.Relational.Low.High.Precedence > 3 + 6 < 15 / 2 > Type: expression Hardness: 20 # 106 Arithmetic.Relational.Low.High.Precedence > 4 + 2.5 < 4 * 1.5 > Type: expression Hardness: 20 # 107 Arithmetic.Relational.Low.High.Precedence > 3 + 4 < 9 - 0.5 > Type: expression Hardness: 20 # 108 Arithmetic.Relational.Low.High.Precedence > 4 + 1.5 < 3 * 1.5 > Type: expression Hardness: 20 # 109 Arithmetic.Relational.Low.High.Precedence > 2 + 3 < 6 - 0.5 > Type: expression Hardness: 20 // ---------------------------------------------- # 111 Arithmetic.Relational.Low.High.Precedence > 8 - 6 < 8 + 2 > Type: expression Hardness: 20 # 112 Arithmetic.Relational.Low.High.Precedence > 4 - 8 < 8 - 4 > Type: expression Hardness: 20 # 113 Arithmetic.Relational.Low.High.Precedence > 9 - 3 < 3 * 2 > Type: expression Hardness: 20 # 114 Arithmetic.Relational.Low.High.Precedence > 2 - 8 < 8 % 2 > Type: expression Hardness: 20 # 115 Arithmetic.Relational.Low.High.Precedence > 9 - 5 < 9 / 4 > Type: expression Hardness: 20 // ---------------------------------------------- # 121 Arithmetic.Relational.Low.High.Precedence > 5 + 3 <= 2 + 6 > Type: expression Hardness: 20 # 122 Arithmetic.Relational.Low.High.Precedence > 4 + 2 <= 9 - 2 > Type: expression Hardness: 20 # 123 Arithmetic.Relational.Low.High.Precedence > 3 + 9 <= 4 * 4 > Type: expression Hardness: 20 # 124 Arithmetic.Relational.Low.High.Precedence > 9 % 3 <= 5 + 7 > Type: expression Hardness: 20 # 125 Arithmetic.Relational.Low.High.Precedence > 2 + 5 <= 2 / 5 > Type: expression Hardness: 20 // ---------------------------------------------- # 131 Arithmetic.Relational.Low.High.Precedence > 9 - 3 <= 2 + 4 > Type: expression Hardness: 20 # 132 Arithmetic.Relational.Low.High.Precedence > 5 - 9 <= 9 - 5 > Type: expression Hardness: 20 # 133 Arithmetic.Relational.Low.High.Precedence > 3 * 2 <= 9 - 2 > Type: expression Hardness: 20 # 134 Arithmetic.Relational.Low.High.Precedence > 6 - 9 <= 6 % 9 > Type: expression Hardness: 20 # 135 Arithmetic.Relational.Low.High.Precedence > 8 / 5 <= 8 - 5 > Type: expression Hardness: 20 # 136 Arithmetic.Relational.Low.High.Precedence > 5 - 8 <= 8.0 / 5 > Type: expression Hardness: 20 # 137 Arithmetic.Relational.Low.High.Precedence > 4 - 6 <= 6.0 / 4 > Type: expression Hardness: 20 // ---------------------------------------------- # 141 Arithmetic.Relational.Low.High.Precedence > 3 + 6 > 2 + 9 > Type: expression Hardness: 20 # 142 Arithmetic.Relational.Low.High.Precedence > 2 + 5 > 2 - 5 > Type: expression Hardness: 20 # 143 Arithmetic.Relational.Low.High.Precedence > 3 + 7 > 2 * 6 > Type: expression Hardness: 20 # 144 Arithmetic.Relational.Low.High.Precedence > 4 + 4 > 4 % 4 > Type: expression Hardness: 20 # 145 Arithmetic.Relational.Low.High.Precedence > 8 + 5 > 8 / 5 > Type: expression Hardness: 20 # 146 Arithmetic.Relational.Low.High.Precedence > 6 + 6 > 6 % 6 > Type: expression Hardness: 20 // ---------------------------------------------- # 151 Arithmetic.Relational.Low.High.Precedence > 8 - 2 > 4 + 2 > Type: expression Hardness: 20 # 152 Arithmetic.Relational.Low.High.Precedence > 4 - 6 > 3 - 7 > Type: expression Hardness: 20 # 153 Arithmetic.Relational.Low.High.Precedence > 6 - 3 > 2 * 2 > Type: expression Hardness: 20 # 154 Arithmetic.Relational.Low.High.Precedence > 7 - 7 > 7 % 7 > Type: expression Hardness: 20 # 155 Arithmetic.Relational.Low.High.Precedence > 6 - 9 > 6 / 9 > Type: expression Hardness: 20 // ---------------------------------------------- # 161 Arithmetic.Relational.Low.High.Precedence > -5 + 9 >= -9 + 5 > Type: expression Hardness: 20 # 162 Arithmetic.Relational.Low.High.Precedence > 2 + 9 >= 3 - -9 > Type: expression Hardness: 20 # 163 Arithmetic.Relational.Low.High.Precedence > 3 + 7 >= 2 * 5 > Type: expression Hardness: 20 # 164 Arithmetic.Relational.Low.High.Precedence > 9 % 5 >= 2 + 2 > Type: expression Hardness: 20 # 165 Arithmetic.Relational.Low.High.Precedence > 5 + 8 >= 8 / 5 > Type: expression Hardness: 20 // ---------------------------------------------- # 171 Arithmetic.Relational.Low.High.Precedence > 9 - 4 >= 2 + 3 > Type: expression Hardness: 20 # 172 Arithmetic.Relational.Low.High.Precedence > 4 - 7 >= 5 - 9 > Type: expression Hardness: 20 # 173 Arithmetic.Relational.Low.High.Precedence > 5 * 0 >= 7 - 3 > Type: expression Hardness: 20 # 174 Arithmetic.Relational.Low.High.Precedence > 9 - 6 >= 9 % 6 > Type: expression Hardness: 20 # 175 Arithmetic.Relational.Low.High.Precedence > 4 / 6 >= 4 - 6 > Type: expression Hardness: 20 # 176 Arithmetic.Relational.Low.High.Precedence > 8 - 3 >= 4 + 1 > Type: expression Hardness: 20 // ---------------------------------------------- # 181 Arithmetic.Relational.High.High.Precedence > 5 * 4 < 6 * 3 > Type: expression Hardness: 20 # 182 Arithmetic.Relational.High.High.Precedence > 2 * 3 <= 6 / 1 > Type: expression Hardness: 20 # 183 Arithmetic.Relational.High.High.Precedence > 2 * 2 <= 9 % 5 > Type: expression Hardness: 20 # 184 Arithmetic.Relational.High.High.Precedence > 3 * 3 <= 9 % 6 > Type: expression Hardness: 20 // ---------------------------------------------- # 191 Arithmetic.Relational.High.High.Precedence > 9 / 7 <= 5 * 7 > Type: expression Hardness: 20 # 192 Arithmetic.Relational.High.High.Precedence > 9 / 6 < 9 / 5 > Type: expression Hardness: 20 # 193 Arithmetic.Relational.High.High.Precedence > 9 / 5 <= 9 % 5 > Type: expression Hardness: 20 # 194 Arithmetic.Relational.High.High.Precedence > 8 / 10 > 2 * 3 > Type: expression Hardness: 20 # 195 Arithmetic.Relational.High.High.Precedence > 7 / 9 > 3 * 2 > Type: expression Hardness: 20 // ---------------------------------------------- # 201 Arithmetic.Relational.High.High.Precedence > 8 % 5 < 3 * 1 > Type: expression Hardness: 20 # 202 Arithmetic.Relational.High.High.Precedence > 7 % 3 <= 7 / 3 > Type: expression Hardness: 20 # 203 Arithmetic.Relational.High.High.Precedence > 7 % 5 < 7 % 4 > Type: expression Hardness: 20 # 204 Arithmetic.Relational.High.High.Precedence > 9 % 4 < 7 % 4 > Type: expression Hardness: 20 # 205 Arithmetic.Relational.High.High.Precedence > 7 % 5 > 5 % 7 > Type: expression Hardness: 20 // ---------------------------------------------- # 211 Arithmetic.Relational.High.High.Precedence > 3 * 5 > 5 * 3 > Type: expression Hardness: 20 # 212 Arithmetic.Relational.High.High.Precedence > 2 * 4 >= 9 / 4 > Type: expression Hardness: 20 # 213 Arithmetic.Relational.High.High.Precedence > 3 * 2 > 9 % 3 > Type: expression Hardness: 20 // ---------------------------------------------- # 221 Arithmetic.Relational.High.High.Precedence > 15 / 2 >= 6 * 1 > Type: expression Hardness: 20 # 222 Arithmetic.Relational.High.High.Precedence > 8 / 5 > 8 / 6 > Type: expression Hardness: 20 # 223 Arithmetic.Relational.High.High.Precedence > 7 / 2 >= 7 % 4 > Type: expression Hardness: 20 # 224 Arithmetic.Relational.High.High.Precedence > 10 / 2 >= 10 % 2 > Type: expression Hardness: 20 # 225 Arithmetic.Relational.High.High.Precedence > 9 / 6 >= 9 % 6 > Type: expression Hardness: 20 // ---------------------------------------------- # 231 Arithmetic.Relational.High.High.Precedence > 7 % 3 > 2 * 3 > Type: expression Hardness: 20 # 232 Arithmetic.Relational.High.High.Precedence > 3 % 5 >= 9 / 4 > Type: expression Hardness: 20 # 233 Arithmetic.Relational.High.High.Precedence > 3 % 9 > 9 % 3 > Type: expression Hardness: 20 # 234 Arithmetic.Relational.High.High.Precedence > 8 % 6 > 8 % 7 > Type: expression Hardness: 20 # 235 Arithmetic.Relational.High.High.Precedence > 1 % 5 > 5 % 1 > Type: expression Hardness: 20 # 236 Arithmetic.Relational.High.High.Precedence > 6 % 9 >= 9 / 2.0 > Type: expression Hardness: 20 # 237 Arithmetic.Relational.High.High.Precedence > 7 % 8 >= 7 / 2.0 > Type: expression Hardness: 20 // ---------------------------------------------- # 241 Arithmetic.Relational.Low.Low.Precedence > 3 + 6 == 3 - -6 > Type: expression Hardness: 20 # 242 Arithmetic.Relational.Low.Low.Precedence > 7 - 3 == 9 / 2 > Type: expression Hardness: 20 # 243 Arithmetic.Relational.Low.Low.Precedence > 2 + 7 == 3 * 3 > Type: expression Hardness: 20 # 244 Arithmetic.Relational.Low.Low.Precedence > 2 + 3 == 5 % 9 > Type: expression Hardness: 20 # 245 Arithmetic.Relational.Low.Low.Precedence > 2 + 2 == 9 / 2 > Type: expression Hardness: 20 # 246 Arithmetic.Relational.Low.Low.Precedence > 3 + 2 == 11 / 2 > Type: expression Hardness: 20 // ---------------------------------------------- # 251 Arithmetic.Relational.High.Low.Precedence > 3 * 8 == 6 * 4 > Type: expression Hardness: 20 # 252 Arithmetic.Relational.High.Low.Precedence > 7 * 2 == 7 % 2 > Type: expression Hardness: 20 # 253 Arithmetic.Relational.High.Low.Precedence > 3 * 2 == 7 / 2 > Type: expression Hardness: 20 # 254 Arithmetic.Relational.High.Low.Precedence > 4 * 3 == 4 % 3 > Type: expression Hardness: 20 // ---------------------------------------------- # 261 Arithmetic.Relational.High.Low.Precedence > 11 / 4 == 3 * 3 > Type: expression Hardness: 20 # 262 Arithmetic.Relational.High.Low.Precedence > 9 / 7 == 9 / 6 > Type: expression Hardness: 20 # 263 Arithmetic.Relational.High.Low.Precedence > 9 / 3 == 9 % 6 > Type: expression Hardness: 20 # 264 Arithmetic.Relational.High.Low.Precedence > 2 / 3 == 2 % 3 > Type: expression Hardness: 20 // ---------------------------------------------- # 271 Arithmetic.Relational.High.Low.Precedence > 6 % 8 == 3 * 2 > Type: expression Hardness: 20 # 272 Arithmetic.Relational.High.Low.Precedence > 8 % 3 == 8 / 3 > Type: expression Hardness: 20 # 273 Arithmetic.Relational.High.Low.Precedence > 3 % 9 == 9 % 3 > Type: expression Hardness: 20 # 274 Arithmetic.Relational.High.Low.Precedence > 10 % 3 == 7 % 3 > Type: expression Hardness: 20 # 275 Arithmetic.Relational.High.Low.Precedence > 9 % 4 == 9 % 2 > Type: expression Hardness: 20 // ---------------------------------------------- # 281 Arithmetic.Relational.Low.Low.Precedence > 3 - -5 != 3 + 5 > Type: expression Hardness: 20 # 282 Arithmetic.Relational.Low.Low.Precedence > 5 - -3 != 2 * 4 > Type: expression Hardness: 20 # 283 Arithmetic.Relational.Low.Low.Precedence > 4 + 5 != 9 / 10 > Type: expression Hardness: 20 # 284 Arithmetic.Relational.Low.Low.Precedence > 4 - -2 != 6 % 10 > Type: expression Hardness: 20 // ---------------------------------------------- # 291 Arithmetic.Relational.High.Low.Precedence > -3 * -4 != 6 * 2 > Type: expression Hardness: 20 # 292 Arithmetic.Relational.High.Low.Precedence > -2 * -3 != 6 % 9 > Type: expression Hardness: 20 # 293 Arithmetic.Relational.High.Low.Precedence > -2 * -4 != 8 / 1 > Type: expression Hardness: 20 # 294 Arithmetic.Relational.High.Low.Precedence > -2 * -3 != 6 / 1 > Type: expression Hardness: 20 // ---------------------------------------------- # 301 Arithmetic.Relational.High.Low.Precedence > 9 / 2 != 2 * 2 > Type: expression Hardness: 20 # 302 Arithmetic.Relational.High.Low.Precedence > 10 / 6 != 10 / 7 > Type: expression Hardness: 20 # 303 Arithmetic.Relational.High.Low.Precedence > 7 / 10 != 6 / 10 > Type: expression Hardness: 20 # 304 Arithmetic.Relational.High.Low.Precedence > 8 / 3 != 8 % 3 > Type: expression Hardness: 20 # 305 Arithmetic.Relational.High.Low.Precedence > 13 / 2 != 2 * 3 > Type: expression Hardness: 20 // ---------------------------------------------- # 311 Arithmetic.Relational.High.Low.Precedence > 6 % 5 != 2 * 3 > Type: expression Hardness: 20 # 312 Arithmetic.Relational.High.Low.Precedence > 4 % 7 != 9 / 2 > Type: expression Hardness: 20 # 313 Arithmetic.Relational.High.Low.Precedence > 8 % 3 != 8 / 4 > Type: expression Hardness: 20 # 314 Arithmetic.Relational.High.Low.Precedence > 4 % 10 != 10 % 6 > Type: expression Hardness: 20 # 315 Arithmetic.Relational.High.Low.Precedence > 9 % 4 != 9 % 8 > Type: expression Hardness: 20 # 316 Arithmetic.Relational.High.Low.Precedence > 4 % 7 != 7 % 4 > Type: expression Hardness: 20 // ---------------------------------------------- // any other? // // 3 >= 4 == 4 >= 0 // 5 >= 7 == 7 >= 0 // // 3 < 7 != 7 < 3 // 4 < 9 != 9 < 4