repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
* expr.c (emit_block_move): Use copy_to_mode_reg for
[official-gcc.git]
/
libf2c
/
libF77
/
pow_ri.c
blob
6e5816bbf10915c7f75c370aea7ecaf96b75b023
1
#include
"f2c.h"
2
3
#ifdef KR_headers
4
double
pow_ri
(
ap
,
bp
)
real
*
ap
;
integer
*
bp
;
5
#else
6
double
pow_ri
(
real
*
ap
,
integer
*
bp
)
7
#endif
8
{
9
double
pow
,
x
;
10
integer n
;
11
unsigned long
u
;
12
13
pow
=
1
;
14
x
= *
ap
;
15
n
= *
bp
;
16
17
if
(
n
!=
0
)
18
{
19
if
(
n
<
0
)
20
{
21
n
= -
n
;
22
x
=
1
/
x
;
23
}
24
for
(
u
=
n
; ; )
25
{
26
if
(
u
&
01
)
27
pow
*=
x
;
28
if
(
u
>>=
1
)
29
x
*=
x
;
30
else
31
break
;
32
}
33
}
34
return
(
pow
);
35
}