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

◆ pb_srand()

real function pb_srand ( integer  idumm)

Definition at line 11489 of file pcblastst.f.

11490*
11491* -- PBLAS test routine (version 2.0) --
11492* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
11493* and University of California, Berkeley.
11494* April 1, 1998
11495*
11496* .. Scalar Arguments ..
11497 INTEGER IDUMM
11498* ..
11499*
11500* Purpose
11501* =======
11502*
11503* PB_SRAND generates the next number in the random sequence. This func-
11504* tion ensures that this number will be in the interval ( -1.0, 1.0 ).
11505*
11506* Arguments
11507* =========
11508*
11509* IDUMM (local input) INTEGER
11510* This argument is ignored, but necessary to a FORTRAN 77 func-
11511* tion.
11512*
11513* Further Details
11514* ===============
11515*
11516* On entry, the array IRAND stored in the common block RANCOM contains
11517* the information (2 integers) required to generate the next number in
11518* the sequence X( n ). This number is computed as
11519*
11520* X( n ) = ( 2^16 * IRAND( 2 ) + IRAND( 1 ) ) / d,
11521*
11522* where the constant d is the largest 32 bit positive integer. The
11523* array IRAND is then updated for the generation of the next number
11524* X( n+1 ) in the random sequence as follows X( n+1 ) = a * X( n ) + c.
11525* The constants a and c should have been preliminarily stored in the
11526* array IACS as 2 pairs of integers. The initial set up of IRAND and
11527* IACS is performed by the routine PB_SETRAN.
11528*
11529* -- Written on April 1, 1998 by
11530* Antoine Petitet, University of Tennessee, Knoxville 37996, USA.
11531*
11532* =====================================================================
11533*
11534* .. Parameters ..
11535 REAL ONE, TWO
11536 parameter( one = 1.0e+0, two = 2.0e+0 )
11537* ..
11538* .. External Functions ..
11539 REAL PB_SRAN
11540 EXTERNAL pb_sran
11541* ..
11542* .. Executable Statements ..
11543*
11544 pb_srand = one - two * pb_sran( idumm )
11545*
11546 RETURN
11547*
11548* End of PB_SRAND
11549*
real function pb_sran(idumm)
real function pb_srand(idumm)
Here is the call graph for this function:
Here is the caller graph for this function: