|
|
1.1 ! root 1: long int pow_ii(ap, bp) ! 2: long int *ap, *bp; ! 3: { ! 4: long int pow, x, n; ! 5: ! 6: pow = 1; ! 7: x = *ap; ! 8: n = *bp; ! 9: ! 10: if(n < 0) ! 11: { } ! 12: else if(n > 0) ! 13: for( ; ; ) ! 14: { ! 15: if(n & 01) ! 16: pow *= x; ! 17: if(n >>= 1) ! 18: x *= x; ! 19: else ! 20: break; ! 21: } ! 22: return(pow); ! 23: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.