Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pow_I missing some special cases #87

Open
jnthn opened this issue Apr 8, 2013 · 3 comments
Open

pow_I missing some special cases #87

jnthn opened this issue Apr 8, 2013 · 3 comments

Comments

@jnthn
Copy link
Contributor

jnthn commented Apr 8, 2013

Should look into these for both Parrot and JVM backends:

< BenGoldberg> Your big integer pow_I is missing a few special cases...
< BenGoldberg> When the exponent is positive and even, and the base is
               neg one, return pos one
< BenGoldberg> When the exponent is positive and odd, and the base is neg
               one, return neg one
< BenGoldberg> When the exponent is huge, and the base is less than neg
               one, return either Inf or -Inf depending on whether the
               exponent is odd or even
< BenGoldberg> When the exponent is negative, and the base is zero,
               return Inf
< BenGoldberg> In that last case, you might want to throw a division by
               zero, instead.
@leto
Copy link
Contributor

leto commented Apr 9, 2013

I would be happy to help with what is need on the Parrot side. Should Parrot and JVM have their own Github issues?

@jnthn
Copy link
Contributor Author

jnthn commented Apr 9, 2013

@leto the code for the Parrot side of things actually lives in the NQP repository, in the nqp_bigint.ops.

As for separate issues, no, the JVM stuff will be moving into this same repository soon anyway, since a vast majority of the code between the two is shared.

@leto
Copy link
Contributor

leto commented Apr 9, 2013

@jnthn thanks for clarifying. Do I need to do much else other than add some conditional cases to nqp_bigint.ops? I haven't touched nqp in ages :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants