Download gam1.procedur

Back to the list

   1 : * GAM1      PROCEDUR  AM        09/12/07    21:15:36     6578           
   2 : DEBPROC GAM1 x1*flottant;
   3 : 
   4 : *-------------------------------------------------------------------------------
   5 : * Calcul de la fonction GAMMA complete=int[0;inf[(t**(x-1).e**(-t).dt]]
   6 : *-------------------------------------------------------------------------------
   7 : *
   8 : *    PROCEDURE GRACIEUSEMENT MISE A DISPOSITION PAR F. DUPRAT
   9 : *
  10 : SI (x1 <EG 0.);
  11 :  MESS 'GAM1 : X<0';
  12 :  QUIT GAM1;
  13 : FINSI;
  14 : 
  15 : coef1=PROG 76.18009172947146 -86.50532032941677 24.01409824083091;
  16 : coef1=coef1 ET (PROG -1.231739572450155 0.1208650973866179e-2);
  17 : coef1=coef1 ET (PROG -0.5395239384953e-5);
  18 : r1=x1;
  19 : r2=x1+5.5;
  20 : r3=((x1+0.5)*(LOG(r2)))-r2;
  21 : r4=1.;
  22 : REPE bouc1 6;
  23 :  r1=r1+1.;
  24 :  r4=r4+((EXTR &bouc1 coef1)/r1);
  25 : FIN bouc1;
  26 : resu1=r3+(LOG(2.5066282746310005*r4/x1));
  27 : 
  28 : FINPROC (EXP(resu1));
  29 :  

© Cast3M 2003 - All rights reserved.
Disclaimer