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

◆ pb_srand()

real function pb_srand ( integer  idumm)

Definition at line 10379 of file psblastst.f.

10380*
10381* -- PBLAS test routine (version 2.0) --
10382* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
10383* and University of California, Berkeley.
10384* April 1, 1998
10385*
10386* .. Scalar Arguments ..
10387 INTEGER IDUMM
10388* ..
10389*
10390* Purpose
10391* =======
10392*
10393* PB_SRAND generates the next number in the random sequence. This func-
10394* tion ensures that this number will be in the interval ( -1.0, 1.0 ).
10395*
10396* Arguments
10397* =========
10398*
10399* IDUMM (local input) INTEGER
10400* This argument is ignored, but necessary to a FORTRAN 77 func-
10401* tion.
10402*
10403* Further Details
10404* ===============
10405*
10406* On entry, the array IRAND stored in the common block RANCOM contains
10407* the information (2 integers) required to generate the next number in
10408* the sequence X( n ). This number is computed as
10409*
10410* X( n ) = ( 2^16 * IRAND( 2 ) + IRAND( 1 ) ) / d,
10411*
10412* where the constant d is the largest 32 bit positive integer. The
10413* array IRAND is then updated for the generation of the next number
10414* X( n+1 ) in the random sequence as follows X( n+1 ) = a * X( n ) + c.
10415* The constants a and c should have been preliminarily stored in the
10416* array IACS as 2 pairs of integers. The initial set up of IRAND and
10417* IACS is performed by the routine PB_SETRAN.
10418*
10419* -- Written on April 1, 1998 by
10420* Antoine Petitet, University of Tennessee, Knoxville 37996, USA.
10421*
10422* =====================================================================
10423*
10424* .. Parameters ..
10425 REAL ONE, TWO
10426 parameter( one = 1.0e+0, two = 2.0e+0 )
10427* ..
10428* .. External Functions ..
10429 REAL PB_SRAN
10430 EXTERNAL pb_sran
10431* ..
10432* .. Executable Statements ..
10433*
10434 pb_srand = one - two * pb_sran( idumm )
10435*
10436 RETURN
10437*
10438* End of PB_SRAND
10439*
real function pb_sran(idumm)
real function pb_srand(idumm)
Here is the call graph for this function: