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

◆ pb_dran()

double precision function pb_dran ( integer  idumm)

Definition at line 11556 of file pzblastst.f.

11557*
11558* -- PBLAS test routine (version 2.0) --
11559* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
11560* and University of California, Berkeley.
11561* April 1, 1998
11562*
11563* .. Scalar Arguments ..
11564 INTEGER IDUMM
11565* ..
11566*
11567* Purpose
11568* =======
11569*
11570* PB_DRAN generates the next number in the random sequence.
11571*
11572* Arguments
11573* =========
11574*
11575* IDUMM (local input) INTEGER
11576* This argument is ignored, but necessary to a FORTRAN 77 func-
11577* tion.
11578*
11579* Further Details
11580* ===============
11581*
11582* On entry, the array IRAND stored in the common block RANCOM contains
11583* the information (2 integers) required to generate the next number in
11584* the sequence X( n ). This number is computed as
11585*
11586* X( n ) = ( 2^16 * IRAND( 2 ) + IRAND( 1 ) ) / d,
11587*
11588* where the constant d is the largest 32 bit positive integer. The
11589* array IRAND is then updated for the generation of the next number
11590* X( n+1 ) in the random sequence as follows X( n+1 ) = a * X( n ) + c.
11591* The constants a and c should have been preliminarily stored in the
11592* array IACS as 2 pairs of integers. The initial set up of IRAND and
11593* IACS is performed by the routine PB_SETRAN.
11594*
11595* -- Written on April 1, 1998 by
11596* Antoine Petitet, University of Tennessee, Knoxville 37996, USA.
11597*
11598* =====================================================================
11599*
11600* .. Parameters ..
11601 DOUBLE PRECISION DIVFAC, POW16
11602 parameter( divfac = 2.147483648d+9,
11603 $ pow16 = 6.5536d+4 )
11604* ..
11605* .. Local Arrays ..
11606 INTEGER J( 2 )
11607* ..
11608* .. External Subroutines ..
11609 EXTERNAL pb_ladd, pb_lmul
11610* ..
11611* .. Intrinsic Functions ..
11612 INTRINSIC dble
11613* ..
11614* .. Common Blocks ..
11615 INTEGER IACS( 4 ), IRAND( 2 )
11616 COMMON /rancom/ irand, iacs
11617* ..
11618* .. Save Statements ..
11619 SAVE /rancom/
11620* ..
11621* .. Executable Statements ..
11622*
11623 pb_dran = ( dble( irand( 1 ) ) + pow16 * dble( irand( 2 ) ) ) /
11624 $ divfac
11625*
11626 CALL pb_lmul( irand, iacs, j )
11627 CALL pb_ladd( j, iacs( 3 ), irand )
11628*
11629 RETURN
11630*
11631* End of PB_DRAN
11632*
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: