slamc4.c

来自「NIST Handwriting OCR Testbed」· C语言 代码 · 共 98 行

C
98
字号
/** ======================================================================* NIST Guide to Available Math Software.* Fullsource for module SSYEVX.C from package CLAPACK.* Retrieved from NETLIB on Fri Mar 10 14:23:44 2000.* ======================================================================*/#include <f2c.h>/* Subroutine */ int slamc4_(integer *emin, real *start, integer *base){/*  -- LAPACK auxiliary routine (version 2.0) --          Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,          Courant Institute, Argonne National Lab, and Rice University          October 31, 1992       Purpose       =======       SLAMC4 is a service routine for SLAMC2.       Arguments       =========       EMIN    (output) EMIN               The minimum exponent before (gradual) underflow, computed by               setting A = START and dividing by BASE until the previous A               can not be recovered.       START   (input) REAL               The starting point for determining EMIN.       BASE    (input) INTEGER               The base of the machine.      ===================================================================== */    /* System generated locals */    integer i__1;    real r__1;    /* Local variables */    static real zero, a;    static integer i;    static real rbase, b1, b2, c1, c2, d1, d2;    extern doublereal slamc3_(real *, real *);    static real one;    a = *start;    one = 1.f;    rbase = one / *base;    zero = 0.f;    *emin = 1;    r__1 = a * rbase;    b1 = slamc3_(&r__1, &zero);    c1 = a;    c2 = a;    d1 = a;    d2 = a;/* +    WHILE( ( C1.EQ.A ).AND.( C2.EQ.A ).AND.         $       ( D1.EQ.A ).AND.( D2.EQ.A )      )LOOP */L10:    if (c1 == a && c2 == a && d1 == a && d2 == a) {	--(*emin);	a = b1;	r__1 = a / *base;	b1 = slamc3_(&r__1, &zero);	r__1 = b1 * *base;	c1 = slamc3_(&r__1, &zero);	d1 = zero;	i__1 = *base;	for (i = 1; i <= *base; ++i) {	    d1 += b1;/* L20: */	}	r__1 = a * rbase;	b2 = slamc3_(&r__1, &zero);	r__1 = b2 / rbase;	c2 = slamc3_(&r__1, &zero);	d2 = zero;	i__1 = *base;	for (i = 1; i <= *base; ++i) {	    d2 += b2;/* L30: */	}	goto L10;    }/* +    END WHILE */    return 0;/*     End of SLAMC4 */} /* slamc4_ */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?