diff options
Diffstat (limited to 'lib/libF77/pow_di.c')
-rw-r--r-- | lib/libF77/pow_di.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libF77/pow_di.c b/lib/libF77/pow_di.c index 7af69a7..affed62 100644 --- a/lib/libF77/pow_di.c +++ b/lib/libF77/pow_di.c @@ -8,6 +8,7 @@ double pow_di(doublereal *ap, integer *bp) { double pow, x; integer n; +unsigned long u; pow = 1; x = *ap; @@ -20,11 +21,11 @@ if(n != 0) n = -n; x = 1/x; } - for( ; ; ) + for(u = n; ; ) { - if(n & 01) + if(u & 01) pow *= x; - if(n >>= 1) + if(u >>= 1) x *= x; else break; |