In some cases where you are using a _boolean_ that will strictly turn into either `0` or `1`, the conditional check can be replaced with math equations: (x ? num1 : num2) conclusions: 1)if num1 equals num2, there ARE savings 2)if num1 is (+1) or (-1) than num2, there ARE savings 3)if either num1 or num2 equals to 0, there ARE savings 4)it is MORE LIKELY to find greater savings on num1>num2 instead of num1<num2 5)in method (*A), there COULD be savings (but never loss) 6)the secondary method (*B) is <= to the primary method (*A), but NEVER better a)num1>num2 i)(num1==(num2+1)) ex1: (x?5:4) to (x+4) ex2: (x?8:7) to (x+7) ii)num2==0 ex1: (x?3:0) to (x*3) ex2: (x?7:0) to (x*7) iii) (*A) b)num1<num2 i)((num1+1)==num2) ex1: (x?4:5) to (5-x) ex2: (x?7:8) to (8-x) ii)num1==0 ex1: (x?0:3) to (!x*3) ex2: (x?0:7) to (!x*7) iii) (*A) c)num1==num2 i) ex1: (x?5:5) to (5) ex2: (x?-3:-3) to (-3) (*A) use ((x*(num1-num2))+num2) ex1: (x?8:4) to ((x*4)+4) ex2: (x?4:8) to ((x*-4)+8) ex3: (x?6:-4) to ((x*10)-4) ex4: (x?-4:6) to ((x*-10)+6) ex5: (x?4:-6) to ((x*10)-6) ex6: (x?-6:4) to ((x*-10)+4) ex7: (x?-5:-9) to ((x*4)-9) ex8: (x?-9:-5) to ((x*-4)-5) Note: inferior method (*B) is ((!x*(num2-num1))+num1) **Note:** In addition to this, you will need to remove the unnecessary `*1`, `+0`, etc. Also, if you wanted to make further operations with this result, there is a correct way to arrange the numbers so that some parenthesis can be removed: (a+(x?1:-1)) (a+((x*2)-1)) ((a*2)-1+a) 2*a-1+a Note: the `a` in `a+(...)` was moved to the right side `(...)+a ` Also, you can turn `a*(b+c)` into `a*b + a*c`, this will sometimes lead to savings: (m*(x?1:-1)) (m*((x*2)-1)) ((m*x*2)-m) m*x*2-m; Note: multiplied `m` by both `(x*2)` and `m*-1` and then added up, obviously `x+-y` is `x-y` For mastering these swapping stuff around, you will need to know basic algebra rules, I can't really explain them into detail here, but just practice.