home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / Samples / C-SSP.ARJ / STEXPD.C < prev    next >
Encoding:
Text File  |  1984-07-25  |  464 b   |  21 lines

  1.       stexpd (a,x,df,cf)
  2.  
  3.       /*this subroutine computes the density function and cumlative*/
  4.       /*distribution of exponentional distribution of the form*/
  5.       /*df = a*exp(-a*x) for any fixed constant a greater than zero and*/
  6.       /*any variable x greater than or equal to zero.*/
  7.  
  8.       float a,x,*df,*cf;
  9.  
  10.      {
  11.  
  12.       float ax;
  13.       extern double exp();
  14.  
  15.       ax = -a*x;
  16.       *df = a*exp(ax);
  17.       *cf = 1.-exp(ax);
  18.  
  19.      }
  20.  
  21.