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

◆ pb_srand()

real function pb_srand ( integer  idumm)

Definition at line 2120 of file psblastim.f.

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