diff options
| author | Jean-Marc Zucconi <jmz@FreeBSD.org> | 1995-09-28 20:49:15 +0000 |
|---|---|---|
| committer | Jean-Marc Zucconi <jmz@FreeBSD.org> | 1995-09-28 20:49:15 +0000 |
| commit | f310327a5b2374c9442f9d4b0bf28a81f9d4c8eb (patch) | |
| tree | 2bd4eef14755fc92c0ed2b2ea8abefe3c3081747 /lib/libF77/pow_ri.c | |
| parent | c28f85011857a5a0a93b4eb62175c7e506ca1d0b (diff) | |
Notes
Diffstat (limited to 'lib/libF77/pow_ri.c')
| -rw-r--r-- | lib/libF77/pow_ri.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libF77/pow_ri.c b/lib/libF77/pow_ri.c index 3a3c4cf1ca4e..6e5816bbf109 100644 --- a/lib/libF77/pow_ri.c +++ b/lib/libF77/pow_ri.c @@ -8,6 +8,7 @@ double pow_ri(real *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; |
