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

◆ pb_dran()

double precision function pb_dran ( integer  idumm)

Definition at line 10439 of file pdblastst.f.

10440*
10441* -- PBLAS test routine (version 2.0) --
10442* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
10443* and University of California, Berkeley.
10444* April 1, 1998
10445*
10446* .. Scalar Arguments ..
10447 INTEGER IDUMM
10448* ..
10449*
10450* Purpose
10451* =======
10452*
10453* PB_DRAN generates the next number in the random sequence.
10454*
10455* Arguments
10456* =========
10457*
10458* IDUMM (local input) INTEGER
10459* This argument is ignored, but necessary to a FORTRAN 77 func-
10460* tion.
10461*
10462* Further Details
10463* ===============
10464*
10465* On entry, the array IRAND stored in the common block RANCOM contains
10466* the information (2 integers) required to generate the next number in
10467* the sequence X( n ). This number is computed as
10468*
10469* X( n ) = ( 2^16 * IRAND( 2 ) + IRAND( 1 ) ) / d,
10470*
10471* where the constant d is the largest 32 bit positive integer. The
10472* array IRAND is then updated for the generation of the next number
10473* X( n+1 ) in the random sequence as follows X( n+1 ) = a * X( n ) + c.
10474* The constants a and c should have been preliminarily stored in the
10475* array IACS as 2 pairs of integers. The initial set up of IRAND and
10476* IACS is performed by the routine PB_SETRAN.
10477*
10478* -- Written on April 1, 1998 by
10479* Antoine Petitet, University of Tennessee, Knoxville 37996, USA.
10480*
10481* =====================================================================
10482*
10483* .. Parameters ..
10484 DOUBLE PRECISION DIVFAC, POW16
10485 parameter( divfac = 2.147483648d+9,
10486 $ pow16 = 6.5536d+4 )
10487* ..
10488* .. Local Arrays ..
10489 INTEGER J( 2 )
10490* ..
10491* .. External Subroutines ..
10492 EXTERNAL pb_ladd, pb_lmul
10493* ..
10494* .. Intrinsic Functions ..
10495 INTRINSIC dble
10496* ..
10497* .. Common Blocks ..
10498 INTEGER IACS( 4 ), IRAND( 2 )
10499 COMMON /rancom/ irand, iacs
10500* ..
10501* .. Save Statements ..
10502 SAVE /rancom/
10503* ..
10504* .. Executable Statements ..
10505*
10506 pb_dran = ( dble( irand( 1 ) ) + pow16 * dble( irand( 2 ) ) ) /
10507 $ divfac
10508*
10509 CALL pb_lmul( irand, iacs, j )
10510 CALL pb_ladd( j, iacs( 3 ), irand )
10511*
10512 RETURN
10513*
10514* End of PB_DRAN
10515*
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:
Here is the caller graph for this function: