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

◆ pb_drand()

double precision function pb_drand ( integer  idumm)

Definition at line 2569 of file pzblastim.f.

2570*
2571* -- PBLAS test routine (version 2.0) --
2572* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
2573* and University of California, Berkeley.
2574* April 1, 1998
2575*
2576* .. Scalar Arguments ..
2577 INTEGER IDUMM
2578* ..
2579*
2580* Purpose
2581* =======
2582*
2583* PB_DRAND generates the next number in the random sequence. This func-
2584* tion ensures that this number will be in the interval ( -1.0, 1.0 ).
2585*
2586* Arguments
2587* =========
2588*
2589* IDUMM (local input) INTEGER
2590* This argument is ignored, but necessary to a FORTRAN 77 func-
2591* tion.
2592*
2593* Further Details
2594* ===============
2595*
2596* On entry, the array IRAND stored in the common block RANCOM contains
2597* the information (2 integers) required to generate the next number in
2598* the sequence X( n ). This number is computed as
2599*
2600* X( n ) = ( 2^16 * IRAND( 2 ) + IRAND( 1 ) ) / d,
2601*
2602* where the constant d is the largest 32 bit positive integer. The
2603* array IRAND is then updated for the generation of the next number
2604* X( n+1 ) in the random sequence as follows X( n+1 ) = a * X( n ) + c.
2605* The constants a and c should have been preliminarily stored in the
2606* array IACS as 2 pairs of integers. The initial set up of IRAND and
2607* IACS is performed by the routine PB_SETRAN.
2608*
2609* -- Written on April 1, 1998 by
2610* Antoine Petitet, University of Tennessee, Knoxville 37996, USA.
2611*
2612* =====================================================================
2613*
2614* .. Parameters ..
2615 DOUBLE PRECISION ONE, TWO
2616 parameter( one = 1.0d+0, two = 2.0d+0 )
2617* ..
2618* .. External Functions ..
2619 DOUBLE PRECISION PB_DRAN
2620 EXTERNAL pb_dran
2621* ..
2622* .. Executable Statements ..
2623*
2624 pb_drand = one - two * pb_dran( idumm )
2625*
2626 RETURN
2627*
2628* End of PB_DRAND
2629*
double precision function pb_dran(idumm)
double precision function pb_drand(idumm)
Here is the call graph for this function: