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

◆ slamc4()

subroutine slamc4 ( integer  emin,
real  start,
integer  base 
)

Definition at line 1480 of file tools.f.

1481*
1482* -- LAPACK auxiliary routine (version 2.0) --
1483* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
1484* Courant Institute, Argonne National Lab, and Rice University
1485* October 31, 1992
1486*
1487* .. Scalar Arguments ..
1488 INTEGER BASE, EMIN
1489 REAL START
1490* ..
1491*
1492* Purpose
1493* =======
1494*
1495* SLAMC4 is a service routine for SLAMC2.
1496*
1497* Arguments
1498* =========
1499*
1500* EMIN (output) EMIN
1501* The minimum exponent before (gradual) underflow, computed by
1502* setting A = START and dividing by BASE until the previous A
1503* can not be recovered.
1504*
1505* START (input) REAL
1506* The starting point for determining EMIN.
1507*
1508* BASE (input) INTEGER
1509* The base of the machine.
1510*
1511* =====================================================================
1512*
1513* .. Local Scalars ..
1514 INTEGER I
1515 REAL A, B1, B2, C1, C2, D1, D2, ONE, RBASE, ZERO
1516* ..
1517* .. External Functions ..
1518 REAL SLAMC3
1519 EXTERNAL slamc3
1520* ..
1521* .. Executable Statements ..
1522*
1523 a = start
1524 one = 1
1525 rbase = one / base
1526 zero = 0
1527 emin = 1
1528 b1 = slamc3( a*rbase, zero )
1529 c1 = a
1530 c2 = a
1531 d1 = a
1532 d2 = a
1533*+ WHILE( ( C1.EQ.A ).AND.( C2.EQ.A ).AND.
1534* $ ( D1.EQ.A ).AND.( D2.EQ.A ) )LOOP
1535 10 CONTINUE
1536 IF( ( c1.EQ.a ) .AND. ( c2.EQ.a ) .AND. ( d1.EQ.a ) .AND.
1537 $ ( d2.EQ.a ) ) THEN
1538 emin = emin - 1
1539 a = b1
1540 b1 = slamc3( a / base, zero )
1541 c1 = slamc3( b1*base, zero )
1542 d1 = zero
1543 DO 20 i = 1, base
1544 d1 = d1 + b1
1545 20 CONTINUE
1546 b2 = slamc3( a*rbase, zero )
1547 c2 = slamc3( b2 / rbase, zero )
1548 d2 = zero
1549 DO 30 i = 1, base
1550 d2 = d2 + b2
1551 30 CONTINUE
1552 GO TO 10
1553 END IF
1554*+ END WHILE
1555*
1556 RETURN
1557*
1558* End of SLAMC4
1559*
real function slamc3(a, b)
Definition tools.f:1443
Here is the caller graph for this function: