条件分支结构的实现:
if(x>y) then
a = b;
else
a = c;
endif
计算器语言:
a + 0.5(b - a) (1+s_1(x-y))+0.5(c - a)(1 - s_1(x-y)) → a
if(x≥y) then
a = b;
else
a = c;
endif
计算器语言:
a + 0.5(b - a) (1+s_2(x-y))+0.5(c - a)(1 - s_2(x-y)) → a
注:
以上if - else -双选择的单语句实现,是由991es82es发现的方法改进而来