expcdf(3f) - [M_datapac:CUMULATIVE_DISTRIBUTION] compute the exponential cumulative
distribution function
SUBROUTINE EXPCDF(X,Cdf)
REAL(kind=wp),intent(in) :: X
REAL(kind=wp),intent(out) :: Cdf
EXPCDF(3f) computes the cumulative distribution function value for
the exponential distribution with mean = 1 and standard deviation = 1.
This distribution is defined for all non-negative X, and has the
probability density function
f(x) = exp(-x)
X The value at which the cumulative distribution function is
to be evaluated. X should be non-negative.
CDF The cumulative distribution function value.
Sample program:
program demo_expcdf
use M_datapac, only : expcdf
implicit none
! call expcdf(x,y)
end program demo_expcdf
Results:
The original DATAPAC library was written by James Filliben of the
Statistical Engineering Division, National Institute of Standards
and Technology.
John Urban, 2022.05.31
CC0-1.0
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | X | |||
real(kind=wp), | intent(out) | :: | Cdf |
SUBROUTINE EXPCDF(X,Cdf) REAL(kind=wp),intent(in) :: X REAL(kind=wp),intent(out) :: Cdf ! ! CHECK THE INPUT ARGUMENTS FOR ERRORS ! IF ( X<0.0_wp ) THEN WRITE (G_IO,99001) 99001 FORMAT (' ***** NON-FATAL DIAGNOSTIC--THE FIRST INPUT ARGUMENT TO EXPCDF(3f) IS NEGATIVE *****') WRITE (G_IO,99002) X 99002 FORMAT (' ','***** THE VALUE OF THE ARGUMENT IS ',E15.8,' *****') Cdf = 0.0_wp RETURN ELSE Cdf = 1.0_wp - EXP(-X) ENDIF ! END SUBROUTINE EXPCDF