Line data Source code
1 : *DECK PDA_D1MACH
2 0 : DOUBLE PRECISION FUNCTION PDA_D1MACH (I)
3 : C***BEGIN PROLOGUE PDA_D1MACH
4 : C***PURPOSE Return floating point machine dependent constants.
5 : C***LIBRARY SLATEC
6 : C***CATEGORY R1
7 : C***TYPE DOUBLE PRECISION (R1MACH-S, PDA_D1MACH-D)
8 : C***KEYWORDS MACHINE CONSTANTS
9 : C***AUTHOR Fox, P. A., (Bell Labs)
10 : C Hall, A. D., (Bell Labs)
11 : C Schryer, N. L., (Bell Labs)
12 : C***DESCRIPTION
13 : C
14 : C PDA_D1MACH can be used to obtain machine-dependent parameters for the
15 : C local machine environment. It is a function subprogram with one
16 : C (input) argument, and can be referenced as follows:
17 : C
18 : C D = PDA_D1MACH(I)
19 : C
20 : C where I=1,...,5. The (output) value of D above is determined by
21 : C the (input) value of I. The results for various values of I are
22 : C discussed below.
23 : C
24 : C PDA_D1MACH( 1) = B**(EMIN-1), the smallest positive magnitude.
25 : C PDA_D1MACH( 2) = B**EMAX*(1 - B**(-T)), the largest magnitude.
26 : C PDA_D1MACH( 3) = B**(-T), the smallest relative spacing.
27 : C PDA_D1MACH( 4) = B**(1-T), the largest relative spacing.
28 : C PDA_D1MACH( 5) = LOG10(B)
29 : C
30 : C Assume double precision numbers are represented in the T-digit,
31 : C base-B form
32 : C
33 : C sign (B**E)*( (X(1)/B) + ... + (X(T)/B**T) )
34 : C
35 : C where 0 .LE. X(I) .LT. B for I=1,...,T, 0 .LT. X(1), and
36 : C EMIN .LE. E .LE. EMAX.
37 : C
38 : C The values of B, T, EMIN and EMAX are provided in PDA_I1MACH as
39 : C follows:
40 : C PDA_I1MACH(10) = B, the base.
41 : C PDA_I1MACH(14) = T, the number of base-B digits.
42 : C PDA_I1MACH(15) = EMIN, the smallest exponent E.
43 : C PDA_I1MACH(16) = EMAX, the largest exponent E.
44 : C
45 : C To alter this function for a particular environment, the desired
46 : C set of DATA statements should be activated by removing the C from
47 : C column 1. Also, the values of PDA_D1MACH(1) - PDA_D1MACH(4) should be
48 : C checked for consistency with the local operating system.
49 : C
50 : C***REFERENCES P. A. Fox, A. D. Hall and N. L. Schryer, Framework for
51 : C a portable library, ACM Transactions on Mathematical
52 : C Software 4, 2 (June 1978), pp. 177-188.
53 : C***ROUTINES CALLED PDA_XERMSG
54 : C***REVISION HISTORY (YYMMDD)
55 : C 750101 DATE WRITTEN
56 : C 890213 REVISION DATE from Version 3.2
57 : C 891214 Prologue converted to Version 4.0 format. (BAB)
58 : C 900315 CALLs to XERROR changed to CALLs to PDA_XERMSG. (THJ)
59 : C 900618 Added DEC RISC constants. (WRB)
60 : C 900723 Added IBM RS 6000 constants. (WRB)
61 : C 900911 Added SUN 386i constants. (WRB)
62 : C 910710 Added HP 730 constants. (SMR)
63 : C 911114 Added Convex IEEE constants. (WRB)
64 : C 920121 Added SUN -r8 compiler option constants. (WRB)
65 : C 920229 Added Touchstone Delta i860 constants. (WRB)
66 : C 920501 Reformatted the REFERENCES section. (WRB)
67 : C 920625 Added CONVEX -p8 and -pd8 compiler option constants.
68 : C (BKS, WRB)
69 : C 930201 Added DEC Alpha and SGI constants. (RWC and WRB)
70 : C 950404 If index out of range, return value zero, but return.
71 : C (HME).
72 : C 960123 Added Linux support (BKM).
73 : C***END PROLOGUE PDA_D1MACH
74 : C
75 : INTEGER SMALL(4)
76 : INTEGER LARGE(4)
77 : INTEGER RIGHT(4)
78 : INTEGER DIVER(4)
79 : INTEGER LOG10(4)
80 : C
81 : DOUBLE PRECISION DMACH(5)
82 : SAVE DMACH
83 : C
84 : EQUIVALENCE (DMACH(1),SMALL(1))
85 : EQUIVALENCE (DMACH(2),LARGE(1))
86 : EQUIVALENCE (DMACH(3),RIGHT(1))
87 : EQUIVALENCE (DMACH(4),DIVER(1))
88 : EQUIVALENCE (DMACH(5),LOG10(1))
89 : C
90 : C MACHINE CONSTANTS FOR THE AMIGA
91 : C ABSOFT FORTRAN COMPILER USING THE 68020/68881 COMPILER OPTION
92 : C
93 : C DATA SMALL(1), SMALL(2) / Z'00100000', Z'00000000' /
94 : C DATA LARGE(1), LARGE(2) / Z'7FEFFFFF', Z'FFFFFFFF' /
95 : C DATA RIGHT(1), RIGHT(2) / Z'3CA00000', Z'00000000' /
96 : C DATA DIVER(1), DIVER(2) / Z'3CB00000', Z'00000000' /
97 : C DATA LOG10(1), LOG10(2) / Z'3FD34413', Z'509F79FF' /
98 : C
99 : C MACHINE CONSTANTS FOR THE AMIGA
100 : C ABSOFT FORTRAN COMPILER USING SOFTWARE FLOATING POINT
101 : C
102 : C DATA SMALL(1), SMALL(2) / Z'00100000', Z'00000000' /
103 : C DATA LARGE(1), LARGE(2) / Z'7FDFFFFF', Z'FFFFFFFF' /
104 : C DATA RIGHT(1), RIGHT(2) / Z'3CA00000', Z'00000000' /
105 : C DATA DIVER(1), DIVER(2) / Z'3CB00000', Z'00000000' /
106 : C DATA LOG10(1), LOG10(2) / Z'3FD34413', Z'509F79FF' /
107 : C
108 : C MACHINE CONSTANTS FOR THE APOLLO
109 : C
110 : C DATA SMALL(1), SMALL(2) / 16#00100000, 16#00000000 /
111 : C DATA LARGE(1), LARGE(2) / 16#7FFFFFFF, 16#FFFFFFFF /
112 : C DATA RIGHT(1), RIGHT(2) / 16#3CA00000, 16#00000000 /
113 : C DATA DIVER(1), DIVER(2) / 16#3CB00000, 16#00000000 /
114 : C DATA LOG10(1), LOG10(2) / 16#3FD34413, 16#509F79FF /
115 : C
116 : C MACHINE CONSTANTS FOR THE BURROUGHS 1700 SYSTEM
117 : C
118 : C DATA SMALL(1) / ZC00800000 /
119 : C DATA SMALL(2) / Z000000000 /
120 : C DATA LARGE(1) / ZDFFFFFFFF /
121 : C DATA LARGE(2) / ZFFFFFFFFF /
122 : C DATA RIGHT(1) / ZCC5800000 /
123 : C DATA RIGHT(2) / Z000000000 /
124 : C DATA DIVER(1) / ZCC6800000 /
125 : C DATA DIVER(2) / Z000000000 /
126 : C DATA LOG10(1) / ZD00E730E7 /
127 : C DATA LOG10(2) / ZC77800DC0 /
128 : C
129 : C MACHINE CONSTANTS FOR THE BURROUGHS 5700 SYSTEM
130 : C
131 : C DATA SMALL(1) / O1771000000000000 /
132 : C DATA SMALL(2) / O0000000000000000 /
133 : C DATA LARGE(1) / O0777777777777777 /
134 : C DATA LARGE(2) / O0007777777777777 /
135 : C DATA RIGHT(1) / O1461000000000000 /
136 : C DATA RIGHT(2) / O0000000000000000 /
137 : C DATA DIVER(1) / O1451000000000000 /
138 : C DATA DIVER(2) / O0000000000000000 /
139 : C DATA LOG10(1) / O1157163034761674 /
140 : C DATA LOG10(2) / O0006677466732724 /
141 : C
142 : C MACHINE CONSTANTS FOR THE BURROUGHS 6700/7700 SYSTEMS
143 : C
144 : C DATA SMALL(1) / O1771000000000000 /
145 : C DATA SMALL(2) / O7770000000000000 /
146 : C DATA LARGE(1) / O0777777777777777 /
147 : C DATA LARGE(2) / O7777777777777777 /
148 : C DATA RIGHT(1) / O1461000000000000 /
149 : C DATA RIGHT(2) / O0000000000000000 /
150 : C DATA DIVER(1) / O1451000000000000 /
151 : C DATA DIVER(2) / O0000000000000000 /
152 : C DATA LOG10(1) / O1157163034761674 /
153 : C DATA LOG10(2) / O0006677466732724 /
154 : C
155 : C MACHINE CONSTANTS FOR THE CDC 170/180 SERIES USING NOS/VE
156 : C
157 : C DATA SMALL(1) / Z"3001800000000000" /
158 : C DATA SMALL(2) / Z"3001000000000000" /
159 : C DATA LARGE(1) / Z"4FFEFFFFFFFFFFFE" /
160 : C DATA LARGE(2) / Z"4FFE000000000000" /
161 : C DATA RIGHT(1) / Z"3FD2800000000000" /
162 : C DATA RIGHT(2) / Z"3FD2000000000000" /
163 : C DATA DIVER(1) / Z"3FD3800000000000" /
164 : C DATA DIVER(2) / Z"3FD3000000000000" /
165 : C DATA LOG10(1) / Z"3FFF9A209A84FBCF" /
166 : C DATA LOG10(2) / Z"3FFFF7988F8959AC" /
167 : C
168 : C MACHINE CONSTANTS FOR THE CDC 6000/7000 SERIES
169 : C
170 : C DATA SMALL(1) / 00564000000000000000B /
171 : C DATA SMALL(2) / 00000000000000000000B /
172 : C DATA LARGE(1) / 37757777777777777777B /
173 : C DATA LARGE(2) / 37157777777777777777B /
174 : C DATA RIGHT(1) / 15624000000000000000B /
175 : C DATA RIGHT(2) / 00000000000000000000B /
176 : C DATA DIVER(1) / 15634000000000000000B /
177 : C DATA DIVER(2) / 00000000000000000000B /
178 : C DATA LOG10(1) / 17164642023241175717B /
179 : C DATA LOG10(2) / 16367571421742254654B /
180 : C
181 : C MACHINE CONSTANTS FOR THE CELERITY C1260
182 : C
183 : C DATA SMALL(1), SMALL(2) / Z'00100000', Z'00000000' /
184 : C DATA LARGE(1), LARGE(2) / Z'7FEFFFFF', Z'FFFFFFFF' /
185 : C DATA RIGHT(1), RIGHT(2) / Z'3CA00000', Z'00000000' /
186 : C DATA DIVER(1), DIVER(2) / Z'3CB00000', Z'00000000' /
187 : C DATA LOG10(1), LOG10(2) / Z'3FD34413', Z'509F79FF' /
188 : C
189 : C MACHINE CONSTANTS FOR THE CONVEX
190 : C USING THE -fn OR -pd8 COMPILER OPTION
191 : C
192 : C DATA DMACH(1) / Z'0010000000000000' /
193 : C DATA DMACH(2) / Z'7FFFFFFFFFFFFFFF' /
194 : C DATA DMACH(3) / Z'3CC0000000000000' /
195 : C DATA DMACH(4) / Z'3CD0000000000000' /
196 : C DATA DMACH(5) / Z'3FF34413509F79FF' /
197 : C
198 : C MACHINE CONSTANTS FOR THE CONVEX
199 : C USING THE -fi COMPILER OPTION
200 : C
201 : C DATA DMACH(1) / Z'0010000000000000' /
202 : C DATA DMACH(2) / Z'7FEFFFFFFFFFFFFF' /
203 : C DATA DMACH(3) / Z'3CA0000000000000' /
204 : C DATA DMACH(4) / Z'3CB0000000000000' /
205 : C DATA DMACH(5) / Z'3FD34413509F79FF' /
206 : C
207 : C MACHINE CONSTANTS FOR THE CONVEX
208 : C USING THE -p8 COMPILER OPTION
209 : C
210 : C DATA DMACH(1) / Z'00010000000000000000000000000000' /
211 : C DATA DMACH(2) / Z'7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF' /
212 : C DATA DMACH(3) / Z'3F900000000000000000000000000000' /
213 : C DATA DMACH(4) / Z'3F910000000000000000000000000000' /
214 : C DATA DMACH(5) / Z'3FFF34413509F79FEF311F12B35816F9' /
215 : C
216 : C MACHINE CONSTANTS FOR THE CRAY
217 : C
218 : C DATA SMALL(1) / 201354000000000000000B /
219 : C DATA SMALL(2) / 000000000000000000000B /
220 : C DATA LARGE(1) / 577767777777777777777B /
221 : C DATA LARGE(2) / 000007777777777777774B /
222 : C DATA RIGHT(1) / 376434000000000000000B /
223 : C DATA RIGHT(2) / 000000000000000000000B /
224 : C DATA DIVER(1) / 376444000000000000000B /
225 : C DATA DIVER(2) / 000000000000000000000B /
226 : C DATA LOG10(1) / 377774642023241175717B /
227 : C DATA LOG10(2) / 000007571421742254654B /
228 : C
229 : C MACHINE CONSTANTS FOR THE DATA GENERAL ECLIPSE S/200
230 : C NOTE - IT MAY BE APPROPRIATE TO INCLUDE THE FOLLOWING CARD -
231 : C STATIC DMACH(5)
232 : C
233 : C DATA SMALL / 20K, 3*0 /
234 : C DATA LARGE / 77777K, 3*177777K /
235 : C DATA RIGHT / 31420K, 3*0 /
236 : C DATA DIVER / 32020K, 3*0 /
237 : C DATA LOG10 / 40423K, 42023K, 50237K, 74776K /
238 : C
239 : C MACHINE CONSTANTS FOR THE DEC ALPHA
240 : C USING G_FLOAT
241 : C
242 : C DATA DMACH(1) / '0000000000000010'X /
243 : C DATA DMACH(2) / 'FFFFFFFFFFFF7FFF'X /
244 : C DATA DMACH(3) / '0000000000003CC0'X /
245 : C DATA DMACH(4) / '0000000000003CD0'X /
246 : C DATA DMACH(5) / '79FF509F44133FF3'X /
247 : C
248 : C MACHINE CONSTANTS FOR THE DEC ALPHA
249 : C USING IEEE_FORMAT
250 : C
251 : C DATA DMACH(1) / '0010000000000000'X /
252 : C DATA DMACH(2) / '7FEFFFFFFFFFFFFF'X /
253 : C DATA DMACH(3) / '3CA0000000000000'X /
254 : C DATA DMACH(4) / '3CB0000000000000'X /
255 : C DATA DMACH(5) / '3FD34413509F79FF'X /
256 : C
257 : C MACHINE CONSTANTS FOR THE DEC RISC
258 : C
259 : C DATA SMALL(1), SMALL(2) / Z'00000000', Z'00100000'/
260 : C DATA LARGE(1), LARGE(2) / Z'FFFFFFFF', Z'7FEFFFFF'/
261 : C DATA RIGHT(1), RIGHT(2) / Z'00000000', Z'3CA00000'/
262 : C DATA DIVER(1), DIVER(2) / Z'00000000', Z'3CB00000'/
263 : C DATA LOG10(1), LOG10(2) / Z'509F79FF', Z'3FD34413'/
264 : C
265 : C MACHINE CONSTANTS FOR THE DEC VAX
266 : C USING D_FLOATING
267 : C (EXPRESSED IN INTEGER AND HEXADECIMAL)
268 : C THE HEX FORMAT BELOW MAY NOT BE SUITABLE FOR UNIX SYSTEMS
269 : C THE INTEGER FORMAT SHOULD BE OK FOR UNIX SYSTEMS
270 : C
271 : C DATA SMALL(1), SMALL(2) / 128, 0 /
272 : C DATA LARGE(1), LARGE(2) / -32769, -1 /
273 : C DATA RIGHT(1), RIGHT(2) / 9344, 0 /
274 : C DATA DIVER(1), DIVER(2) / 9472, 0 /
275 : C DATA LOG10(1), LOG10(2) / 546979738, -805796613 /
276 : C
277 : C DATA SMALL(1), SMALL(2) / Z00000080, Z00000000 /
278 : C DATA LARGE(1), LARGE(2) / ZFFFF7FFF, ZFFFFFFFF /
279 : C DATA RIGHT(1), RIGHT(2) / Z00002480, Z00000000 /
280 : C DATA DIVER(1), DIVER(2) / Z00002500, Z00000000 /
281 : C DATA LOG10(1), LOG10(2) / Z209A3F9A, ZCFF884FB /
282 : C
283 : C MACHINE CONSTANTS FOR THE DEC VAX
284 : C USING G_FLOATING
285 : C (EXPRESSED IN INTEGER AND HEXADECIMAL)
286 : C THE HEX FORMAT BELOW MAY NOT BE SUITABLE FOR UNIX SYSTEMS
287 : C THE INTEGER FORMAT SHOULD BE OK FOR UNIX SYSTEMS
288 : C
289 : C DATA SMALL(1), SMALL(2) / 16, 0 /
290 : C DATA LARGE(1), LARGE(2) / -32769, -1 /
291 : C DATA RIGHT(1), RIGHT(2) / 15552, 0 /
292 : C DATA DIVER(1), DIVER(2) / 15568, 0 /
293 : C DATA LOG10(1), LOG10(2) / 1142112243, 2046775455 /
294 : C
295 : C DATA SMALL(1), SMALL(2) / Z00000010, Z00000000 /
296 : C DATA LARGE(1), LARGE(2) / ZFFFF7FFF, ZFFFFFFFF /
297 : C DATA RIGHT(1), RIGHT(2) / Z00003CC0, Z00000000 /
298 : C DATA DIVER(1), DIVER(2) / Z00003CD0, Z00000000 /
299 : C DATA LOG10(1), LOG10(2) / Z44133FF3, Z79FF509F /
300 : C
301 : C MACHINE CONSTANTS FOR THE ELXSI 6400
302 : C (ASSUMING REAL*8 IS THE DEFAULT DOUBLE PRECISION)
303 : C
304 : C DATA SMALL(1), SMALL(2) / '00100000'X,'00000000'X /
305 : C DATA LARGE(1), LARGE(2) / '7FEFFFFF'X,'FFFFFFFF'X /
306 : C DATA RIGHT(1), RIGHT(2) / '3CB00000'X,'00000000'X /
307 : C DATA DIVER(1), DIVER(2) / '3CC00000'X,'00000000'X /
308 : C DATA LOG10(1), LOG10(2) / '3FD34413'X,'509F79FF'X /
309 : C
310 : C MACHINE CONSTANTS FOR THE HARRIS 220
311 : C
312 : C DATA SMALL(1), SMALL(2) / '20000000, '00000201 /
313 : C DATA LARGE(1), LARGE(2) / '37777777, '37777577 /
314 : C DATA RIGHT(1), RIGHT(2) / '20000000, '00000333 /
315 : C DATA DIVER(1), DIVER(2) / '20000000, '00000334 /
316 : C DATA LOG10(1), LOG10(2) / '23210115, '10237777 /
317 : C
318 : C MACHINE CONSTANTS FOR THE HONEYWELL 600/6000 SERIES
319 : C
320 : C DATA SMALL(1), SMALL(2) / O402400000000, O000000000000 /
321 : C DATA LARGE(1), LARGE(2) / O376777777777, O777777777777 /
322 : C DATA RIGHT(1), RIGHT(2) / O604400000000, O000000000000 /
323 : C DATA DIVER(1), DIVER(2) / O606400000000, O000000000000 /
324 : C DATA LOG10(1), LOG10(2) / O776464202324, O117571775714 /
325 : C
326 : C MACHINE CONSTANTS FOR THE HP 730
327 : C
328 : C DATA DMACH(1) / Z'0010000000000000' /
329 : C DATA DMACH(2) / Z'7FEFFFFFFFFFFFFF' /
330 : C DATA DMACH(3) / Z'3CA0000000000000' /
331 : C DATA DMACH(4) / Z'3CB0000000000000' /
332 : C DATA DMACH(5) / Z'3FD34413509F79FF' /
333 : C
334 : C MACHINE CONSTANTS FOR THE HP 2100
335 : C THREE WORD DOUBLE PRECISION OPTION WITH FTN4
336 : C
337 : C DATA SMALL(1), SMALL(2), SMALL(3) / 40000B, 0, 1 /
338 : C DATA LARGE(1), LARGE(2), LARGE(3) / 77777B, 177777B, 177776B /
339 : C DATA RIGHT(1), RIGHT(2), RIGHT(3) / 40000B, 0, 265B /
340 : C DATA DIVER(1), DIVER(2), DIVER(3) / 40000B, 0, 276B /
341 : C DATA LOG10(1), LOG10(2), LOG10(3) / 46420B, 46502B, 77777B /
342 : C
343 : C MACHINE CONSTANTS FOR THE HP 2100
344 : C FOUR WORD DOUBLE PRECISION OPTION WITH FTN4
345 : C
346 : C DATA SMALL(1), SMALL(2) / 40000B, 0 /
347 : C DATA SMALL(3), SMALL(4) / 0, 1 /
348 : C DATA LARGE(1), LARGE(2) / 77777B, 177777B /
349 : C DATA LARGE(3), LARGE(4) / 177777B, 177776B /
350 : C DATA RIGHT(1), RIGHT(2) / 40000B, 0 /
351 : C DATA RIGHT(3), RIGHT(4) / 0, 225B /
352 : C DATA DIVER(1), DIVER(2) / 40000B, 0 /
353 : C DATA DIVER(3), DIVER(4) / 0, 227B /
354 : C DATA LOG10(1), LOG10(2) / 46420B, 46502B /
355 : C DATA LOG10(3), LOG10(4) / 76747B, 176377B /
356 : C
357 : C MACHINE CONSTANTS FOR THE HP 9000
358 : C
359 : C DATA SMALL(1), SMALL(2) / 00040000000B, 00000000000B /
360 : C DATA LARGE(1), LARGE(2) / 17737777777B, 37777777777B /
361 : C DATA RIGHT(1), RIGHT(2) / 07454000000B, 00000000000B /
362 : C DATA DIVER(1), DIVER(2) / 07460000000B, 00000000000B /
363 : C DATA LOG10(1), LOG10(2) / 07764642023B, 12047674777B /
364 : C
365 : C MACHINE CONSTANTS FOR THE IBM 360/370 SERIES,
366 : C THE XEROX SIGMA 5/7/9, THE SEL SYSTEMS 85/86, AND
367 : C THE PERKIN ELMER (INTERDATA) 7/32.
368 : C
369 : C DATA SMALL(1), SMALL(2) / Z00100000, Z00000000 /
370 : C DATA LARGE(1), LARGE(2) / Z7FFFFFFF, ZFFFFFFFF /
371 : C DATA RIGHT(1), RIGHT(2) / Z33100000, Z00000000 /
372 : C DATA DIVER(1), DIVER(2) / Z34100000, Z00000000 /
373 : C DATA LOG10(1), LOG10(2) / Z41134413, Z509F79FF /
374 : C
375 : C MACHINE CONSTANTS FOR THE IBM PC
376 : C ASSUMES THAT ALL ARITHMETIC IS DONE IN DOUBLE PRECISION
377 : C ON 8088, I.E., NOT IN 80 BIT FORM FOR THE 8087.
378 : C
379 : C DATA SMALL(1) / 2.23D-308 /
380 : C DATA LARGE(1) / 1.79D+308 /
381 : C DATA RIGHT(1) / 1.11D-16 /
382 : C DATA DIVER(1) / 2.22D-16 /
383 : C DATA LOG10(1) / 0.301029995663981195D0 /
384 : C
385 : C MACHINE CONSTANTS FOR THE IBM RS 6000
386 : C
387 : C DATA DMACH(1) / Z'0010000000000000' /
388 : C DATA DMACH(2) / Z'7FEFFFFFFFFFFFFF' /
389 : C DATA DMACH(3) / Z'3CA0000000000000' /
390 : C DATA DMACH(4) / Z'3CB0000000000000' /
391 : C DATA DMACH(5) / Z'3FD34413509F79FF' /
392 : C
393 : C MACHINE CONSTANTS FOR THE INTEL i860
394 : C
395 : C DATA DMACH(1) / Z'0010000000000000' /
396 : C DATA DMACH(2) / Z'7FEFFFFFFFFFFFFF' /
397 : C DATA DMACH(3) / Z'3CA0000000000000' /
398 : C DATA DMACH(4) / Z'3CB0000000000000' /
399 : C DATA DMACH(5) / Z'3FD34413509F79FF' /
400 : C
401 : C MACHINE CONSTANTS FOR THE PDP-10 (KA PROCESSOR)
402 : C
403 : C DATA SMALL(1), SMALL(2) / "033400000000, "000000000000 /
404 : C DATA LARGE(1), LARGE(2) / "377777777777, "344777777777 /
405 : C DATA RIGHT(1), RIGHT(2) / "113400000000, "000000000000 /
406 : C DATA DIVER(1), DIVER(2) / "114400000000, "000000000000 /
407 : C DATA LOG10(1), LOG10(2) / "177464202324, "144117571776 /
408 : C
409 : C MACHINE CONSTANTS FOR THE PDP-10 (KI PROCESSOR)
410 : C
411 : C DATA SMALL(1), SMALL(2) / "000400000000, "000000000000 /
412 : C DATA LARGE(1), LARGE(2) / "377777777777, "377777777777 /
413 : C DATA RIGHT(1), RIGHT(2) / "103400000000, "000000000000 /
414 : C DATA DIVER(1), DIVER(2) / "104400000000, "000000000000 /
415 : C DATA LOG10(1), LOG10(2) / "177464202324, "476747767461 /
416 : C
417 : C MACHINE CONSTANTS FOR PDP-11 FORTRAN SUPPORTING
418 : C 32-BIT INTEGERS (EXPRESSED IN INTEGER AND OCTAL).
419 : C
420 : C DATA SMALL(1), SMALL(2) / 8388608, 0 /
421 : C DATA LARGE(1), LARGE(2) / 2147483647, -1 /
422 : C DATA RIGHT(1), RIGHT(2) / 612368384, 0 /
423 : C DATA DIVER(1), DIVER(2) / 620756992, 0 /
424 : C DATA LOG10(1), LOG10(2) / 1067065498, -2063872008 /
425 : C
426 : C DATA SMALL(1), SMALL(2) / O00040000000, O00000000000 /
427 : C DATA LARGE(1), LARGE(2) / O17777777777, O37777777777 /
428 : C DATA RIGHT(1), RIGHT(2) / O04440000000, O00000000000 /
429 : C DATA DIVER(1), DIVER(2) / O04500000000, O00000000000 /
430 : C DATA LOG10(1), LOG10(2) / O07746420232, O20476747770 /
431 : C
432 : C MACHINE CONSTANTS FOR PDP-11 FORTRAN SUPPORTING
433 : C 16-BIT INTEGERS (EXPRESSED IN INTEGER AND OCTAL).
434 : C
435 : C DATA SMALL(1), SMALL(2) / 128, 0 /
436 : C DATA SMALL(3), SMALL(4) / 0, 0 /
437 : C DATA LARGE(1), LARGE(2) / 32767, -1 /
438 : C DATA LARGE(3), LARGE(4) / -1, -1 /
439 : C DATA RIGHT(1), RIGHT(2) / 9344, 0 /
440 : C DATA RIGHT(3), RIGHT(4) / 0, 0 /
441 : C DATA DIVER(1), DIVER(2) / 9472, 0 /
442 : C DATA DIVER(3), DIVER(4) / 0, 0 /
443 : C DATA LOG10(1), LOG10(2) / 16282, 8346 /
444 : C DATA LOG10(3), LOG10(4) / -31493, -12296 /
445 : C
446 : C DATA SMALL(1), SMALL(2) / O000200, O000000 /
447 : C DATA SMALL(3), SMALL(4) / O000000, O000000 /
448 : C DATA LARGE(1), LARGE(2) / O077777, O177777 /
449 : C DATA LARGE(3), LARGE(4) / O177777, O177777 /
450 : C DATA RIGHT(1), RIGHT(2) / O022200, O000000 /
451 : C DATA RIGHT(3), RIGHT(4) / O000000, O000000 /
452 : C DATA DIVER(1), DIVER(2) / O022400, O000000 /
453 : C DATA DIVER(3), DIVER(4) / O000000, O000000 /
454 : C DATA LOG10(1), LOG10(2) / O037632, O020232 /
455 : C DATA LOG10(3), LOG10(4) / O102373, O147770 /
456 : C
457 : C MACHINE CONSTANTS FOR THE SILICON GRAPHICS
458 : C
459 : C DATA SMALL(1), SMALL(2) / Z'00100000', Z'00000000' /
460 : C DATA LARGE(1), LARGE(2) / Z'7FEFFFFF', Z'FFFFFFFF' /
461 : C DATA RIGHT(1), RIGHT(2) / Z'3CA00000', Z'00000000' /
462 : C DATA DIVER(1), DIVER(2) / Z'3CB00000', Z'00000000' /
463 : C DATA LOG10(1), LOG10(2) / Z'3FD34413', Z'509F79FF' /
464 : C
465 : C MACHINE CONSTANTS FOR THE SUN
466 : C
467 : C DATA DMACH(1) / Z'0010000000000000' /
468 : C DATA DMACH(2) / Z'7FEFFFFFFFFFFFFF' /
469 : C DATA DMACH(3) / Z'3CA0000000000000' /
470 : C DATA DMACH(4) / Z'3CB0000000000000' /
471 : C DATA DMACH(5) / Z'3FD34413509F79FF' /
472 : C
473 : C MACHINE CONSTANTS FOR THE SUN
474 : C USING THE -r8 COMPILER OPTION
475 : C
476 : C DATA DMACH(1) / Z'00010000000000000000000000000000' /
477 : C DATA DMACH(2) / Z'7FFEFFFFFFFFFFFFFFFFFFFFFFFFFFFF' /
478 : C DATA DMACH(3) / Z'3F8E0000000000000000000000000000' /
479 : C DATA DMACH(4) / Z'3F8F0000000000000000000000000000' /
480 : C DATA DMACH(5) / Z'3FFD34413509F79FEF311F12B35816F9' /
481 : C
482 : C MACHINE CONSTANTS FOR THE SUN 386i
483 : C
484 : C DATA SMALL(1), SMALL(2) / Z'FFFFFFFD', Z'000FFFFF' /
485 : C DATA LARGE(1), LARGE(2) / Z'FFFFFFB0', Z'7FEFFFFF' /
486 : C DATA RIGHT(1), RIGHT(2) / Z'000000B0', Z'3CA00000' /
487 : C DATA DIVER(1), DIVER(2) / Z'FFFFFFCB', Z'3CAFFFFF'
488 : C DATA LOG10(1), LOG10(2) / Z'509F79E9', Z'3FD34413' /
489 : C
490 : C MACHINE CONSTANTS FOR THE UNIVAC 1100 SERIES FTN COMPILER
491 : C
492 : C DATA SMALL(1), SMALL(2) / O000040000000, O000000000000 /
493 : C DATA LARGE(1), LARGE(2) / O377777777777, O777777777777 /
494 : C DATA RIGHT(1), RIGHT(2) / O170540000000, O000000000000 /
495 : C DATA DIVER(1), DIVER(2) / O170640000000, O000000000000 /
496 : C DATA LOG10(1), LOG10(2) / O177746420232, O411757177572 /
497 : C
498 : C MACHINE CONSTANTS FOR THE IX86 RUNNING LINUX
499 : C
500 : DATA SMALL(1), SMALL(2) / Z'00000000', Z'00100000'/
501 : DATA LARGE(1), LARGE(2) / Z'FFFFFFFF', Z'7FEFFFFF'/
502 : DATA RIGHT(1), RIGHT(2) / Z'00000000', Z'3CA00000'/
503 : DATA DIVER(1), DIVER(2) / Z'00000000', Z'3CB00000'/
504 : DATA LOG10(1), LOG10(2) / Z'509F79FF', Z'3FD34413'/
505 : C
506 : C
507 : C***FIRST EXECUTABLE STATEMENT PDA_D1MACH
508 0 : IF ( I .LT. 1 .OR. I .GT. 5 ) THEN
509 0 : PDA_D1MACH = 0D0
510 : ELSE
511 0 : PDA_D1MACH = DMACH(I)
512 : END IF
513 : C
514 0 : RETURN
515 : END
|