Doxygen Source Code Documentation
pow_ri.c File Reference
#include "f2c.h"Go to the source code of this file.
| Functions | |
| double | pow_ri (real *ap, integer *bp) | 
Function Documentation
| 
 | ||||||||||||
| 
 Definition at line 6 of file pow_ri.c. Referenced by clset_(), and zzlgin_(). 
 00008 {
00009 double pow, x;
00010 integer n;
00011 unsigned long u;
00012 
00013 pow = 1;
00014 x = *ap;
00015 n = *bp;
00016 
00017 if(n != 0)
00018         {
00019         if(n < 0)
00020                 {
00021                 n = -n;
00022                 x = 1/x;
00023                 }
00024         for(u = n; ; )
00025                 {
00026                 if(u & 01)
00027                         pow *= x;
00028                 if(u >>= 1)
00029                         x *= x;
00030                 else
00031                         break;
00032                 }
00033         }
00034 return(pow);
00035 }
 | 
 
                             
                             
                             
                             
                             
                             
                             
                             
                             
                             
                             
                             
 
 
 
 
       
	   
	   
	   
	  