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

◆ pb_dran()

double precision function pb_dran ( integer  idumm)

Definition at line 2631 of file pzblastim.f.

2632*
2633* -- PBLAS test routine (version 2.0) --
2634* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
2635* and University of California, Berkeley.
2636* April 1, 1998
2637*
2638* .. Scalar Arguments ..
2639 INTEGER IDUMM
2640* ..
2641*
2642* Purpose
2643* =======
2644*
2645* PB_DRAN generates the next number in the random sequence.
2646*
2647* Arguments
2648* =========
2649*
2650* IDUMM (local input) INTEGER
2651* This argument is ignored, but necessary to a FORTRAN 77 func-
2652* tion.
2653*
2654* Further Details
2655* ===============
2656*
2657* On entry, the array IRAND stored in the common block RANCOM contains
2658* the information (2 integers) required to generate the next number in
2659* the sequence X( n ). This number is computed as
2660*
2661* X( n ) = ( 2^16 * IRAND( 2 ) + IRAND( 1 ) ) / d,
2662*
2663* where the constant d is the largest 32 bit positive integer. The
2664* array IRAND is then updated for the generation of the next number
2665* X( n+1 ) in the random sequence as follows X( n+1 ) = a * X( n ) + c.
2666* The constants a and c should have been preliminarily stored in the
2667* array IACS as 2 pairs of integers. The initial set up of IRAND and
2668* IACS is performed by the routine PB_SETRAN.
2669*
2670* -- Written on April 1, 1998 by
2671* Antoine Petitet, University of Tennessee, Knoxville 37996, USA.
2672*
2673* =====================================================================
2674*
2675* .. Parameters ..
2676 DOUBLE PRECISION DIVFAC, POW16
2677 parameter( divfac = 2.147483648d+9,
2678 $ pow16 = 6.5536d+4 )
2679* ..
2680* .. Local Arrays ..
2681 INTEGER J( 2 )
2682* ..
2683* .. External Subroutines ..
2684 EXTERNAL pb_ladd, pb_lmul
2685* ..
2686* .. Intrinsic Functions ..
2687 INTRINSIC dble
2688* ..
2689* .. Common Blocks ..
2690 INTEGER IACS( 4 ), IRAND( 2 )
2691 COMMON /rancom/ irand, iacs
2692* ..
2693* .. Save Statements ..
2694 SAVE /rancom/
2695* ..
2696* .. Executable Statements ..
2697*
2698 pb_dran = ( dble( irand( 1 ) ) + pow16 * dble( irand( 2 ) ) ) /
2699 $ divfac
2700*
2701 CALL pb_lmul( irand, iacs, j )
2702 CALL pb_ladd( j, iacs( 3 ), irand )
2703*
2704 RETURN
2705*
2706* End of PB_DRAN
2707*
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: