diff options
author | jmz <jmz@FreeBSD.org> | 1995-09-28 20:49:15 +0000 |
---|---|---|
committer | jmz <jmz@FreeBSD.org> | 1995-09-28 20:49:15 +0000 |
commit | 88fe667d3502c54a9143eea7b611ec0362bb639c (patch) | |
tree | 2bd4eef14755fc92c0ed2b2ea8abefe3c3081747 /lib/libF77/pow_hh.c | |
parent | 3ebc2913631c7b53207cac9503f0a0141f628900 (diff) | |
download | FreeBSD-src-88fe667d3502c54a9143eea7b611ec0362bb639c.zip FreeBSD-src-88fe667d3502c54a9143eea7b611ec0362bb639c.tar.gz |
Update to the 1995/09/20 version. Previous version was 1993/12/17.
Diffstat (limited to 'lib/libF77/pow_hh.c')
-rw-r--r-- | lib/libF77/pow_hh.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libF77/pow_hh.c b/lib/libF77/pow_hh.c index e1a503c..24a0197 100644 --- a/lib/libF77/pow_hh.c +++ b/lib/libF77/pow_hh.c @@ -7,6 +7,7 @@ shortint pow_hh(shortint *ap, shortint *bp) #endif { shortint pow, x, n; + unsigned u; x = *ap; n = *bp; @@ -18,11 +19,12 @@ shortint pow_hh(shortint *ap, shortint *bp) return x == 0 ? 1/x : 0; n = -n; } + u = n; for(pow = 1; ; ) { - if(n & 01) + if(u & 01) pow *= x; - if(n >>= 1) + if(u >>= 1) x *= x; else break; |