diff options
author | Damien George <damien.p.george@gmail.com> | 2014-04-02 12:26:49 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-04-02 12:26:49 +0100 |
commit | b23fbb3126ed415215cbbc2e917a508fd0286fea (patch) | |
tree | 91bee8dbd2322be3c8643a3f4350a7c4b256b922 | |
parent | 660aef67c4e7b598d98b7048784065922c7ab393 (diff) | |
download | micropython-b23fbb3126ed415215cbbc2e917a508fd0286fea.tar.gz micropython-b23fbb3126ed415215cbbc2e917a508fd0286fea.zip |
py: Implement floating point power binop.
-rw-r--r-- | py/objfloat.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/py/objfloat.c b/py/objfloat.c index 3916c340b3..d7bc6c7ff1 100644 --- a/py/objfloat.c +++ b/py/objfloat.c @@ -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); |