Differentiate conditional expressions?



I think a major issue may be that conditionals are
hard to combine.

e.g.  (if(x>=0) then 2 else 1) + (if(x<0) then 1 else 2)  ==> 
if(real(x))then 3 else ... ?


RJF