UNDDF
This function evaluates the discrete uniform cumulative distribution function.
Function Return Value
UNDDF — Function value, the probability that a uniform random variable takes a value less than or equal to IX. (Output)
Required Arguments
IX — Argument for which the discrete uniform cumulative distribution function is to be evaluated. (Input)
N — Scale parameter. N must be greater than 0. (Input)
FORTRAN 90 Interface
Generic: UNDDF (IX, N)
Specific: The specific interface names are S_UNDDF and D_UNDDF.
FORTRAN 77 Interface
Single: UNDDF (IX, N)
Double: The double precision name is DUNDDF.
Description
The notation below uses the floor and ceiling function notation, and.
The function UNDDF evaluates the discrete uniform cumulative probability distribution function with scale parameter N, defined
Example
In this example, we evaluate the probability function at IX = 3, N = 5.
 
USE UMACH_INT
USE UNDDF_INT
IMPLICIT NONE
INTEGER NOUT, IX, N
REAL PR
CALL UMACH(2, NOUT)
IX = 3
N = 5
PR = UNDDF(IX, N)
WRITE (NOUT, 99999) IX, N, PR
99999 FORMAT (' UNDDF(', I2, ', ', I2, ') = ', F6.4)
END
Output
 
UNDDF( 3, 5) = 0.6000