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

◆ pderraxpy()

subroutine pderraxpy ( double precision  errbnd,
double precision  psclr,
double precision  x,
double precision  y,
double precision  prec 
)

Definition at line 3312 of file pdblas1tst.f.

3313*
3314* -- PBLAS test routine (version 2.0) --
3315* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
3316* and University of California, Berkeley.
3317* April 1, 1998
3318*
3319* .. Scalar Arguments ..
3320 DOUBLE PRECISION ERRBND, PREC, PSCLR, X, Y
3321* ..
3322*
3323* Purpose
3324* =======
3325*
3326* PDERRAXPY serially computes Y := Y + PSCLR * X and returns a scaled
3327* relative acceptable error bound on the result.
3328*
3329* Arguments
3330* =========
3331*
3332* ERRBND (global output) DOUBLE PRECISION
3333* On exit, ERRBND specifies the scaled relative acceptable er-
3334* ror bound.
3335*
3336* PSCLR (global input) DOUBLE PRECISION
3337* On entry, PSCLR specifies the scale factor.
3338*
3339* X (global input) DOUBLE PRECISION
3340* On entry, X specifies the scalar to be scaled.
3341*
3342* Y (global input/global output) DOUBLE PRECISION
3343* On entry, Y specifies the scalar to be added. On exit, Y con-
3344* tains the resulting scalar.
3345*
3346* PREC (global input) DOUBLE PRECISION
3347* On entry, PREC specifies the machine precision.
3348*
3349* -- Written on April 1, 1998 by
3350* Antoine Petitet, University of Tennessee, Knoxville 37996, USA.
3351*
3352* =====================================================================
3353*
3354* .. Parameters ..
3355 DOUBLE PRECISION ONE, TWO, ZERO
3356 parameter( one = 1.0d+0, two = 2.0d+0,
3357 $ zero = 0.0d+0 )
3358* ..
3359* .. Local Scalars ..
3360 DOUBLE PRECISION ADDBND, FACT, SUMPOS, SUMNEG, TMP
3361* ..
3362* .. Intrinsic Functions ..
3363 INTRINSIC max
3364* ..
3365* .. Executable Statements ..
3366*
3367 sumpos = zero
3368 sumneg = zero
3369 fact = one + two * prec
3370 addbnd = two * two * two * prec
3371*
3372 tmp = psclr * x
3373 IF( tmp.GE.zero ) THEN
3374 sumpos = sumpos + tmp * fact
3375 ELSE
3376 sumneg = sumneg - tmp * fact
3377 END IF
3378*
3379 tmp = y
3380 IF( tmp.GE.zero ) THEN
3381 sumpos = sumpos + tmp
3382 ELSE
3383 sumneg = sumneg - tmp
3384 END IF
3385*
3386 y = y + ( psclr * x )
3387*
3388 errbnd = addbnd * max( sumpos, sumneg )
3389*
3390 RETURN
3391*
3392* End of PDERRAXPY
3393*
#define max(A, B)
Definition pcgemr.c:180
Here is the caller graph for this function: