beeware/batavia

pow not working properly for corner cases

djmgit opened this issue · 1 comments

Expected Behavior

pow function (builtins/pow.js) is not working as expected for corner cases. It should be at par with
python output for corner case (like y=0 and z = 1 or -1)

Current Behavior

pow function is not behaving properly. Details of the output and how to reproduce is
given below.

Steps to reproduce

1.Try executing the following python snippet:
print(pow(1,0,1))
and
print(pow(1,0,-1))
the output is always 1 where as the ideal output should be 0 (from python compiler)
Also presently there is no test for this,

Your Environment

  • Python Version (list the specific version number)
    3.5.2

  • Operating System and Version (select from the following and list the specific version number; if your OS is not listed, list that as well)

    • OSX
    • Linux
    • Windows
    • Ubuntu

I am working on this.