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

◆ pb_srand()

real function pb_srand ( integer  idumm)

Definition at line 2565 of file pcblastim.f.

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