Move *-*-gnu* pattern below *-*-linux*.
[official-gcc.git] / libf2c / libF77 / pow_di.c
blobaffed625a91100c46eb99cbb8f33d4b4fba21ae2
1 #include "f2c.h"
3 #ifdef KR_headers
4 double pow_di(ap, bp) doublereal *ap; integer *bp;
5 #else
6 double pow_di(doublereal *ap, integer *bp)
7 #endif
9 double pow, x;
10 integer n;
11 unsigned long u;
13 pow = 1;
14 x = *ap;
15 n = *bp;
17 if(n != 0)
19 if(n < 0)
21 n = -n;
22 x = 1/x;
24 for(u = n; ; )
26 if(u & 01)
27 pow *= x;
28 if(u >>= 1)
29 x *= x;
30 else
31 break;
34 return(pow);