summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorStephen McCamant <smcc@mit.edu>2003-07-17 22:26:14 -0400
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-07-18 06:14:33 +0000
commit0615a99403886355a89a1cb45b8c609e4424870a (patch)
tree97e2cf7d68c26fa8ba2ff6f6d334b00294d722c1 /pp.c
parent8ec8fbef8c5eb2490dc99115adb2487f3bf9ddab (diff)
downloadperl-0615a99403886355a89a1cb45b8c609e4424870a.tar.gz
Re: Oops - Can't calculate our powers
Message-ID: <16151.37638.162561.84142@syllepsis.MIT.EDU> p4raw-id: //depot/perl@20167
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pp.c b/pp.c
index 910101a44c..537606eb15 100644
--- a/pp.c
+++ b/pp.c
@@ -972,6 +972,7 @@ PP(pp_pow)
register unsigned int highbit = 8 * sizeof(UV);
register unsigned int lowbit = 0;
register unsigned int diff;
+ bool odd_power = (power & 1);
while ((diff = (highbit - lowbit) >> 1)) {
if (baseuv & ~((1 << (lowbit + diff)) - 1))
lowbit += diff;
@@ -994,7 +995,7 @@ PP(pp_pow)
}
}
SP--;
- if (baseuok || !(power & 1))
+ if (baseuok || !odd_power)
/* answer is positive */
SETu( result );
else if (result <= (UV)IV_MAX)