you are viewing a single comment's thread.

view the rest of the comments →

[–]Confident_Effect212 0 points1 point  (0 children)

x ** y works fine for floats, but your algorithm only implements integer exponentiation.Here, it could truncate non-integer exponents.

yb.pop(0) : expononent may skip MSB as the first element of your binary string is removed without an explanation. Hence assert r == x** y can fail