Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:15:44

0001     
0002 C*********************************************************************  
0003     
0004       FUNCTION PYHIGAMM(X)    
0005     
0006 C...Gives ordinary Gamma function Gamma(x) for positive, real arguments;    
0007 C...see M. Abramowitz, I. A. Stegun: Handbook of Mathematical Functions 
0008 C...(Dover, 1965) 6.1.36.   
0009       DIMENSION B(8)    
0010       DATA B/-0.577191652,0.988205891,-0.897056937,0.918206857, 
0011      &-0.756704078,0.482199394,-0.193527818,0.035868343/    
0012     
0013       NX=INT(X) 
0014       DX=X-NX   
0015     
0016       PYHIGAMM=1. 
0017       DO 100 I=1,8  
0018   100 PYHIGAMM=PYHIGAMM+B(I)*DX**I  
0019       IF(X.LT.1.) THEN  
0020         PYHIGAMM=PYHIGAMM/X 
0021       ELSE  
0022         DO 110 IX=1,NX-1    
0023   110   PYHIGAMM=(X-IX)*PYHIGAMM    
0024       ENDIF 
0025     
0026       RETURN    
0027       END