UNPR
This function evaluates the uniform probability density function.
Function Return Value
UNPR — Function value, the value of the probability density function. (Output)
Required Arguments
X — Argument for which the uniform probability density function is to be evaluated. (Input)
A — Location parameter of the uniform probability function. (Input)
B — Value used to compute the scale parameter (B – A) of the uniform probability density function. (Input)
FORTRAN 90 Interface
Generic: UNPR (X, A, B)
Specific: The specific interface names are S_UNPR and D_UNPR.
FORTRAN 77 Interface
Single: UNPR (X, A, B)
Double: The double precision name is DUNPR.
Description
The function UNPR evaluates the uniform probability density function with location parameter A and scale parameter (B – A), defined
Example
In this example, we evaluate the uniform probability density function at X = 0.65, A = 0.25,
B = 0.75.
USE UMACH_INT
USE UNPR_INT
IMPLICIT NONE
INTEGER NOUT
REAL X, A, B, PR
CALL UMACH(2, NOUT)
X = 0.65
A = 0.25
B = 0.75
PR = UNPR(X, A, B)
WRITE (NOUT, 99999) X, A, B, PR
99999 FORMAT (' UNPR(', F4.2, ', ', F4.2, ', ', F4.2, ') = ', F6.4)
END
Output
UNPR(0.65, 0.25, 0.75) = 2.0000