NASA - Jet Propulsion Laboratory
    + View the NASA Portal
Search JPL
Jet Propulsion Laboratory Home Earth Solar System Stars & Galaxies Technology
Introduction Background Software Links


rand_uni


This routine returns a number out of a pseudo-random uniform deviate (ie, its probability distribution is uniform in the range ]0,1[).


Location in HEALPix directory tree: src/f90/mod/rngmod.f90


FORMAT

var=rand_uni( rng_handle )


ARGUMENTS

name & dimensionality kind in/out description
       
rng_handle planck_rng INOUT structure of type planck_rng containing on all information necessary to continue same random sequence.
var DP OUT number belonging to a pseudo-random uniform deviate.


EXAMPLE:

use healpix_types
use rngmod
type(planck_rng) :: rng_handle
real(dp) :: uni

call rand_init(rng_handle, 12345, 6789012)
uni = rand_uni(rng_handle)

initiates a random sequence with the pair of seeds (12345, 6789012), and generates one number out of the uniform deviate.


RELATED ROUTINES

This section lists the routines related to rand_uni


planck_rng
derived type describing RNG state
rand_gauss
function which returns a random normal deviate.
rand_init
subroutine to initiate a random number sequence.

Eric Hivon 2010-06-18
Privacy / Copyright
FIRST GOV Contact: NASA Home Page Site Manager:
Webmaster:

CL 03-2650