SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ pb_drand()

double precision function pb_drand ( integer  idumm)

Definition at line 2119 of file pdblastim.f.

2120*
2121* -- PBLAS test routine (version 2.0) --
2122* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
2123* and University of California, Berkeley.
2124* April 1, 1998
2125*
2126* .. Scalar Arguments ..
2127 INTEGER IDUMM
2128* ..
2129*
2130* Purpose
2131* =======
2132*
2133* PB_DRAND generates the next number in the random sequence. This func-
2134* tion ensures that this number will be in the interval ( -1.0, 1.0 ).
2135*
2136* Arguments
2137* =========
2138*
2139* IDUMM (local input) INTEGER
2140* This argument is ignored, but necessary to a FORTRAN 77 func-
2141* tion.
2142*
2143* Further Details
2144* ===============
2145*
2146* On entry, the array IRAND stored in the common block RANCOM contains
2147* the information (2 integers) required to generate the next number in
2148* the sequence X( n ). This number is computed as
2149*
2150* X( n ) = ( 2^16 * IRAND( 2 ) + IRAND( 1 ) ) / d,
2151*
2152* where the constant d is the largest 32 bit positive integer. The
2153* array IRAND is then updated for the generation of the next number
2154* X( n+1 ) in the random sequence as follows X( n+1 ) = a * X( n ) + c.
2155* The constants a and c should have been preliminarily stored in the
2156* array IACS as 2 pairs of integers. The initial set up of IRAND and
2157* IACS is performed by the routine PB_SETRAN.
2158*
2159* -- Written on April 1, 1998 by
2160* Antoine Petitet, University of Tennessee, Knoxville 37996, USA.
2161*
2162* =====================================================================
2163*
2164* .. Parameters ..
2165 DOUBLE PRECISION ONE, TWO
2166 parameter( one = 1.0d+0, two = 2.0d+0 )
2167* ..
2168* .. External Functions ..
2169 DOUBLE PRECISION PB_DRAN
2170 EXTERNAL pb_dran
2171* ..
2172* .. Executable Statements ..
2173*
2174 pb_drand = one - two * pb_dran( idumm )
2175*
2176 RETURN
2177*
2178* End of PB_DRAND
2179*
double precision function pb_dran(idumm)
double precision function pb_drand(idumm)
Here is the call graph for this function: