public
/
Ack-5.5.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Pristine Ack-5.5
[Ack-5.5.git]
/
lang
/
fortran
/
lib
/
libF77
/
pow_hh.c
1
#include "f2c.h"
2
3
shortint pow_hh(ap, bp)
4
shortint *ap, *bp;
5
{
6
shortint pow, x, n;
7
8
pow = 1;
9
x = *ap;
10
n = *bp;
11
12
if(n < 0)
13
{ }
14
else if(n > 0)
15
for( ; ; )
16
{
17
if(n & 01)
18
pow *= x;
19
if(n >>= 1)
20
x *= x;
21
else
22
break;
23
}
24
return(pow);
25
}