Skip to content

Commit

Permalink
Optimize use of .sign in infix:<div>.
Browse files Browse the repository at this point in the history
  • Loading branch information
colomon committed Jul 23, 2010
1 parent 937177e commit 3528a10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Int.pm
Expand Up @@ -49,7 +49,7 @@ our multi sub infix:<*>(Int $a, Int $b) {

our multi sub infix:<div>(Int $a, Int $b) {
my $result = pir::box__PI(pir::div__III($a, $b));
if $a.sign * $b.sign < 0 && $result * $b != $a {
if ($a * $b).sign < 0 && $result * $b != $a {
$result--;
}
$result;
Expand Down

0 comments on commit 3528a10

Please sign in to comment.