C Library Functions  - dexran (3)

NAME

dexran(3f) - [M_datapac:RANDOM] generate double exponential random numbers

CONTENTS

Synopsis
Description
Input Arguments
Output Arguments
Examples
Author
Maintainer
License
References

SYNOPSIS

subroutine dexran(N,Istart,X)

       integer,intent(in)    :: N
       integer,intent(inout) :: Istart
       real(kind=wp)         :: X(:)

DESCRIPTION

DEXRAN(3f) generates a random sample of size n from the double exponential (Laplace) distribution with mean = 0 and standard deviation = sqrt(2).

This distribution is defined for all X and has the probability density function

       f(X) = 0.5*exp(-abs(X))

INPUT ARGUMENTS

N The desired integer number of random numbers to be generated.
ISTART An integer flag code which (if set to 0) will start the generator over and hence produce the same random sample over and over again upon successive calls to this subroutine within a run; or (if set to some integer value not equal to 0, like, say, 1) will allow the generator to continue from where it stopped and hence produce different random samples upon successive calls to this subroutine within a run.

OUTPUT ARGUMENTS

X A REAL vector (of dimension at least N) into which the generated random sample will be placed.

EXAMPLES

Sample program:

   program demo_dexran
   use M_datapac, only : dexran
   implicit none
   ! call dexran(x,y)
   end program demo_dexran

Results:

AUTHOR

The original DATAPAC library was written by James Filliben of the Statistical Engineering Division, National Institute of Standards and Technology.

MAINTAINER

John Urban, 2022.05.31

LICENSE

CC0-1.0

REFERENCES

o Tocher, The Art of Simulation, 1963, pages 14-15.
o Hammersley and Handscomb, Monte Carlo Methods, 1964, page 36.
o Filliben, Simple and Robust Linear Estimation of the Location Parameter of a Symmetric Distribution (Unpublished PH.D. dissertation, Princeton University), 1969, page 231.
o Filliben, ’The percent point function’, (Unpublished manuscript), 1970, pages 28-31.
o Johnson and Kotz, Continuous Univariate Distributions--2, 1970, pages 22-36.


Nemo Release 3.1 dexran (3) July 22, 2023
Generated by manServer 1.08 from fb9a5766-1870-4e4e-b841-7d7ab0f16cfd using man macros.