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

◆ slamc4()

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

Definition at line 615 of file slamch.f.

616*
617* -- LAPACK auxiliary routine (version 2.1) --
618* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
619* Courant Institute, Argonne National Lab, and Rice University
620* October 31, 1992
621*
622* .. Scalar Arguments ..
623 INTEGER BASE, EMIN
624 REAL START
625* ..
626*
627* Purpose
628* =======
629*
630* SLAMC4 is a service routine for SLAMC2.
631*
632* Arguments
633* =========
634*
635* EMIN (output) EMIN
636* The minimum exponent before (gradual) underflow, computed by
637* setting A = START and dividing by BASE until the previous A
638* can not be recovered.
639*
640* START (input) REAL
641* The starting point for determining EMIN.
642*
643* BASE (input) INTEGER
644* The base of the machine.
645*
646* =====================================================================
647*
648* .. Local Scalars ..
649 INTEGER I
650 REAL A, B1, B2, C1, C2, D1, D2, ONE, RBASE, ZERO
651* ..
652* .. External Functions ..
653 REAL SLAMC3
654 EXTERNAL slamc3
655* ..
656* .. Executable Statements ..
657*
658 a = start
659 one = 1
660 rbase = one / base
661 zero = 0
662 emin = 1
663 b1 = slamc3( a*rbase, zero )
664 c1 = a
665 c2 = a
666 d1 = a
667 d2 = a
668*+ WHILE( ( C1.EQ.A ).AND.( C2.EQ.A ).AND.
669* $ ( D1.EQ.A ).AND.( D2.EQ.A ) )LOOP
670 10 CONTINUE
671 IF( ( c1.EQ.a ) .AND. ( c2.EQ.a ) .AND. ( d1.EQ.a ) .AND.
672 $ ( d2.EQ.a ) ) THEN
673 emin = emin - 1
674 a = b1
675 b1 = slamc3( a / base, zero )
676 c1 = slamc3( b1*base, zero )
677 d1 = zero
678 DO 20 i = 1, base
679 d1 = d1 + b1
680 20 CONTINUE
681 b2 = slamc3( a*rbase, zero )
682 c2 = slamc3( b2 / rbase, zero )
683 d2 = zero
684 DO 30 i = 1, base
685 d2 = d2 + b2
686 30 CONTINUE
687 GO TO 10
688 END IF
689*+ END WHILE
690*
691 RETURN
692*
693* End of SLAMC4
694*
real function slamc3(a, b)
Definition tools.f:1443