py: Implement floating point power binop.

This commit is contained in:
Damien George 2014-04-02 12:26:49 +01:00
parent 660aef67c4
commit b23fbb3126
1 changed files with 2 additions and 0 deletions

View File

@ -124,6 +124,8 @@ check_zero_division:
nlr_jump(mp_obj_new_exception_msg(&mp_type_ZeroDivisionError, "float division by zero"));
}
break;
case MP_BINARY_OP_POWER:
case MP_BINARY_OP_INPLACE_POWER: lhs_val = MICROPY_FLOAT_C_FUN(pow)(lhs_val, rhs_val); break;
case MP_BINARY_OP_LESS: return MP_BOOL(lhs_val < rhs_val);
case MP_BINARY_OP_MORE: return MP_BOOL(lhs_val > rhs_val);
case MP_BINARY_OP_LESS_EQUAL: return MP_BOOL(lhs_val <= rhs_val);