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

◆ pb_dran()

double precision function pb_dran ( integer  idumm)

Definition at line 2181 of file pdblastim.f.

2182*
2183* -- PBLAS test routine (version 2.0) --
2184* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
2185* and University of California, Berkeley.
2186* April 1, 1998
2187*
2188* .. Scalar Arguments ..
2189 INTEGER IDUMM
2190* ..
2191*
2192* Purpose
2193* =======
2194*
2195* PB_DRAN generates the next number in the random sequence.
2196*
2197* Arguments
2198* =========
2199*
2200* IDUMM (local input) INTEGER
2201* This argument is ignored, but necessary to a FORTRAN 77 func-
2202* tion.
2203*
2204* Further Details
2205* ===============
2206*
2207* On entry, the array IRAND stored in the common block RANCOM contains
2208* the information (2 integers) required to generate the next number in
2209* the sequence X( n ). This number is computed as
2210*
2211* X( n ) = ( 2^16 * IRAND( 2 ) + IRAND( 1 ) ) / d,
2212*
2213* where the constant d is the largest 32 bit positive integer. The
2214* array IRAND is then updated for the generation of the next number
2215* X( n+1 ) in the random sequence as follows X( n+1 ) = a * X( n ) + c.
2216* The constants a and c should have been preliminarily stored in the
2217* array IACS as 2 pairs of integers. The initial set up of IRAND and
2218* IACS is performed by the routine PB_SETRAN.
2219*
2220* -- Written on April 1, 1998 by
2221* Antoine Petitet, University of Tennessee, Knoxville 37996, USA.
2222*
2223* =====================================================================
2224*
2225* .. Parameters ..
2226 DOUBLE PRECISION DIVFAC, POW16
2227 parameter( divfac = 2.147483648d+9,
2228 $ pow16 = 6.5536d+4 )
2229* ..
2230* .. Local Arrays ..
2231 INTEGER J( 2 )
2232* ..
2233* .. External Subroutines ..
2234 EXTERNAL pb_ladd, pb_lmul
2235* ..
2236* .. Intrinsic Functions ..
2237 INTRINSIC dble
2238* ..
2239* .. Common Blocks ..
2240 INTEGER IACS( 4 ), IRAND( 2 )
2241 COMMON /rancom/ irand, iacs
2242* ..
2243* .. Save Statements ..
2244 SAVE /rancom/
2245* ..
2246* .. Executable Statements ..
2247*
2248 pb_dran = ( dble( irand( 1 ) ) + pow16 * dble( irand( 2 ) ) ) /
2249 $ divfac
2250*
2251 CALL pb_lmul( irand, iacs, j )
2252 CALL pb_ladd( j, iacs( 3 ), irand )
2253*
2254 RETURN
2255*
2256* End of PB_DRAN
2257*
subroutine pb_ladd(j, k, i)
Definition pblastst.f:4480
subroutine pb_lmul(k, j, i)
Definition pblastst.f:4559
double precision function pb_dran(idumm)
Here is the call graph for this function: