From seager@lll-zeus Thu Feb 12 13:27:27 1987 Received: from anl-mcs.ARPA by dasher.sun.com (3.2/SMI-3.2) id AA12211; Thu, 12 Feb 87 13:27:19 CST Received: from lll-crg.ARPA (lll-crg.arpa.ARPA) by anl-mcs.ARPA (4.12/4.9) id AA29687; Wed, 11 Feb 87 13:14:26 cst Received: Wed, 11 Feb 87 11:14:17 pst from lll-heracles.Arpa by lll-crg.ARPA (4.12/) id AA24188; Wed, 11 Feb 87 11:14:17 pst Received: from lll-zeus.Arpa by lll-heracles.Arpa (1.1/SMI-3.0DEV3) id AA08325; Wed, 11 Feb 87 11:15:02 PST Return-Path: Received: by lll-zeus.Arpa (1.1/SMI-3.0DEV3) id AA07649; Wed, 11 Feb 87 11:15:08 PST Date: Wed, 11 Feb 87 11:15:08 PST From: seager@lll-zeus (Mark Seager) Message-Id: <8702111915.AA07649@lll-zeus.Arpa> To: dongarra%dasher@anl-mcs.Arpa Cc: na.seager@Score.Stanford.EDU In-Reply-To: Jack Dongarra's message of Wed, 11 Feb 87 09:48:43 CST <8702111548.AA09723@dasher.sun.com> Subject: try again Status: RO Ooooooopppppsss, I sent the wrong file...Here is the correct version of the machine numbers for the sun. There was a problem with the D1MACH routine putting the values into the integer arrays. This file is *NOT* in shar format... ====================================================================== double precision function d1mach(i) c***begin prologue d1mach c***date written 750101 (yymmdd) c***revision date 831014 (yymmdd) c***category no. r1 c***keywords machine constants c***author fox, p. a., (bell labs) c hall, a. d., (bell labs) c schryer, n. l., (bell labs) c***purpose returns double precision machine dependent constants c***description c c d1mach can be used to obtain machine-dependent parameters c for the local machine environment. it is a function c subprogram with one (input) argument, and can be called c as follows, for example c c d = d1mach(i) c c where i=1,...,5. the (output) value of d above is c determined by the (input) value of i. the results for c various values of i are discussed below. c c double-precision machine constants c d1mach( 1) = b**(emin-1), the smallest positive magnitude. c d1mach( 2) = b**emax*(1 - b**(-t)), the largest magnitude. c d1mach( 3) = b**(-t), the smallest relative spacing. c d1mach( 4) = b**(1-t), the largest relative spacing. c d1mach( 5) = log10(b) c***references fox p.a., hall a.d., schryer n.l.,*framework for a c portable library*, acm transactions on mathematical c software, vol. 4, no. 2, june 1978, pp. 177-188. c***routines called xerror c***end prologue d1mach c integer small(4) integer large(4) integer right(4) integer diver(4) integer log10(4) c double precision dmach(5) c equivalence (dmach(1),small(1)) equivalence (dmach(2),large(1)) equivalence (dmach(3),right(1)) equivalence (dmach(4),diver(1)) equivalence (dmach(5),log10(1)) c c machine constants for the sun c data dmach(1) / 2.22507385850720d-308 / data dmach(2) / 1.79769313486232d+308 / data dmach(3) / 1.1101827117665d-16 / data dmach(4) / 1.06021462628034d+292 / data dmach(5) / 3.01029995663981e-1 / c c c***first executable statement d1mach if (i .lt. 1 .or. i .gt. 5) 1 call xerror( 'd1mach -- i out of bounds',25,1,2) c d1mach = dmach(i) return c end integer function i1mach(i) c***begin prologue i1mach c***date written 750101 (yymmdd) c***revision date 860106 (yymmdd) c***category no. r1 c***keywords machine constants c***author fox, p. a., (bell labs) c hall, a. d., (bell labs) c schryer, n. l., (bell labs) c***purpose return integer machine dependent constants. c***description c c * * * * * * * * * * * * * * * * * * * * * * * * * * * * * c these machine constant routines must be activated for c a particular environment. c * * * * * * * * * * * * * * * * * * * * * * * * * * * * * c c i1mach can be used to obtain machine-dependent parameters c for the local machine environment. it is a function c subroutine with one (input) argument, and can be called c as follows, for example c c k = i1mach(i) c c where i=1,...,16. the (output) value of k above is c determined by the (input) value of i. the results for c various values of i are discussed below. c c i/o unit numbers. c i1mach( 1) = the standard input unit. c i1mach( 2) = the standard output unit. c i1mach( 3) = the standard punch unit. c i1mach( 4) = the standard error message unit. c c words. c i1mach( 5) = the number of bits per integer storage unit. c i1mach( 6) = the number of characters per integer storage unit. c c integers. c assume integers are represented in the s-digit, base-a form c c sign ( x(s-1)*a**(s-1) + ... + x(1)*a + x(0) ) c c where 0 .le. x(i) .lt. a for i=0,...,s-1. c i1mach( 7) = a, the base. c i1mach( 8) = s, the number of base-a digits. c i1mach( 9) = a**s - 1, the largest magnitude. c c floating-point numbers. c assume floating-point numbers are represented in the t-digit, c base-b form c sign (b**e)*( (x(1)/b) + ... + (x(t)/b**t) ) c c where 0 .le. x(i) .lt. b for i=1,...,t, c 0 .lt. x(1), and emin .le. e .le. emax. c i1mach(10) = b, the base. c c single-precision c i1mach(11) = t, the number of base-b digits. c i1mach(12) = emin, the smallest exponent e. c i1mach(13) = emax, the largest exponent e. c c double-precision c i1mach(14) = t, the number of base-b digits. c i1mach(15) = emin, the smallest exponent e. c i1mach(16) = emax, the largest exponent e. c c to alter this function for a particular environment, c the desired set of data statements should be activated by c removing the c from column 1. also, the values of c i1mach(1) - i1mach(4) should be checked for consistency c with the local operating system. c***references fox p.a., hall a.d., schryer n.l.,*framework for a c portable library*, acm transactions on mathematical c software, vol. 4, no. 2, june 1978, pp. 177-188. c***routines called (none) c***end prologue i1mach c integer imach(16),output equivalence (imach(4),output) c c c machine constants for the sun. c data imach( 1) / 5 / data imach( 2) / 6 / data imach( 3) / 6 / data imach( 4) / 0 / data imach( 5) / 32 / data imach( 6) / 4 / data imach( 7) / 2 / data imach( 8) / 32 / data imach( 9) /2147483647/ data imach(10) / 2 / data imach(11) / 23 / data imach(12) / -38 / data imach(13) / 38 / data imach(14) / 52 / data imach(15) / -308 / data imach(16) / 308 / c c c***first executable statement i1mach if (i .lt. 1 .or. i .gt. 16) go to 10 c i1mach=imach(i) return c 10 continue write(output,9000) 9000 format('1error 1 in i1mach - i out of bounds ') c c call fdump c c stop end c the routine i1mach has been edited. the routine fdump c has been deleted from the original slatec release. real function r1mach(i) c***begin prologue r1mach c***date written 790101 (yymmdd) c***revision date 831014 (yymmdd) c***category no. r1 c***keywords machine constants c***author fox, p. a., (bell labs) c hall, a. d., (bell labs) c schryer, n. l., (bell labs) c***purpose returns single precision machine dependent constants c***description c c r1mach can be used to obtain machine-dependent parameters c for the local machine environment. it is a function c subroutine with one (input) argument, and can be called c as follows, for example c c a = r1mach(i) c c where i=1,...,5. the (output) value of a above is c determined by the (input) value of i. the results for c various values of i are discussed below. c c single-precision machine constants c r1mach(1) = b**(emin-1), the smallest positive magnitude. c r1mach(2) = b**emax*(1 - b**(-t)), the largest magnitude. c r1mach(3) = b**(-t), the smallest relative spacing. c r1mach(4) = b**(1-t), the largest relative spacing. c r1mach(5) = log10(b) c***references fox, p.a., hall, a.d., schryer, n.l, *framework for c a portable library*, acm transactions on mathe- c matical software, vol. 4, no. 2, june 1978, c pp. 177-188. c***routines called xerror c***end prologue r1mach c integer small(2) integer large(2) integer right(2) integer diver(2) integer log10(2) c real rmach(5) c equivalence (rmach(1),small(1)) equivalence (rmach(2),large(1)) equivalence (rmach(3),right(1)) equivalence (rmach(4),diver(1)) equivalence (rmach(5),log10(1)) c c c machine constants for the sun c data rmach(1) / 1.17549435e-38 / data rmach(2) / 3.40282347e+38 / data rmach(3) / 5.96016605e-8 / data rmach(4) / 1.10795077e+31 / data rmach(5) / 3.0103001e-1 / c c c***first executable statement r1mach if (i .lt. 1 .or. i .gt. 5) 1 call xerror ( 'r1mach -- i out of bounds',25,1,2) c r1mach = rmach(i) return c end .