Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #506 from zhuomingliang/patch-4
add native int version of pow
  • Loading branch information
FROGGS committed Aug 28, 2015
2 parents 70f6519 + cd9580f commit 906ca06
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/Int.pm
Expand Up @@ -257,6 +257,10 @@ multi sub infix:<**>(Int:D \a, Int:D \b) {
!! 1 / nqp::pow_I(nqp::decont(a), nqp::decont(-b), Num, Int)
}

multi sub infix:<**>(int $a, int $b) returns int {
nqp::pow_i($a, $b)
}

multi sub infix:<lcm>(Int:D \a, Int:D \b) returns Int {
nqp::lcm_I(nqp::decont(a), nqp::decont(b), Int);
}
Expand Down

0 comments on commit 906ca06

Please sign in to comment.