Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
b23fbb31
Commit
b23fbb31
authored
Apr 02, 2014
by
Damien George
Browse files
py: Implement floating point power binop.
parent
660aef67
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/objfloat.c
View file @
b23fbb31
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment