* fix inconsistent python/cpp APIs for if_then_else * fix error message * fix power consistency * fix * fix bug * add test