mach.hpp 54 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443
  1. #pragma once
  2. #include <float.h>
  3. #include <cassert>
  4. /* dlamch and slamch were sourced from Piotr Luszczek at
  5. * http://icl.cs.utk.edu/lapack-forum/archives/lapack/msg01682.html */
  6. constexpr int FLT_DIGITS = 24;
  7. constexpr int DBL_DIGITS = 53;
  8. constexpr
  9. float
  10. slamch_(char const ch)
  11. {
  12. constexpr float one = 1.0;
  13. constexpr float zero = 0.0;
  14. if ('B' == ch || 'b' == ch) {
  15. return FLT_RADIX;
  16. } else if ('E' == ch || 'e' == ch) {
  17. return FLT_EPSILON;
  18. } else if ('L' == ch || 'l' == ch) {
  19. return FLT_MAX_EXP;
  20. } else if ('M' == ch || 'm' == ch) {
  21. return FLT_MIN_EXP;
  22. } else if ('N' == ch || 'n' == ch) {
  23. return FLT_DIGITS;
  24. } else if ('O' == ch || 'o' == ch) {
  25. return FLT_MAX;
  26. } else if ('P' == ch || 'p' == ch) {
  27. return FLT_EPSILON * FLT_RADIX;
  28. } else if ('R' == ch || 'r' == ch) {
  29. return FLT_ROUNDS < 2 ? one : zero;
  30. } else if ('S' == ch || 's' == ch) {
  31. /* Use SMALL plus a bit, to avoid the possibility of rounding
  32. causing overflow
  33. when computing 1/sfmin. */
  34. float sfmin = FLT_MIN;
  35. float small = one / FLT_MAX;
  36. if (small >= sfmin) sfmin = small * (one + FLT_EPSILON);
  37. return sfmin;
  38. } else if ('U' == ch || 'u' == ch) {
  39. return FLT_MIN;
  40. }
  41. return zero;
  42. }
  43. constexpr
  44. double
  45. dlamch_(char const ch)
  46. {
  47. constexpr double one = 1.0;
  48. constexpr double zero = 0.0;
  49. if ('B' == ch || 'b' == ch) {
  50. return FLT_RADIX;
  51. } else if ('E' == ch || 'e' == ch) {
  52. return DBL_EPSILON;
  53. } else if ('L' == ch || 'l' == ch) {
  54. return DBL_MAX_EXP;
  55. } else if ('M' == ch || 'm' == ch) {
  56. return DBL_MIN_EXP;
  57. } else if ('N' == ch || 'n' == ch) {
  58. return DBL_DIGITS;
  59. } else if ('O' == ch || 'o' == ch) {
  60. return DBL_MAX;
  61. } else if ('P' == ch || 'p' == ch) {
  62. return DBL_EPSILON * FLT_RADIX;
  63. } else if ('R' == ch || 'r' == ch) {
  64. return FLT_ROUNDS < 2 ? one : zero;
  65. } else if ('S' == ch || 's' == ch) {
  66. /* Use SMALL plus a bit, to avoid the possibility of rounding
  67. causing overflow
  68. when computing 1/sfmin. */
  69. double sfmin = DBL_MIN;
  70. double small = one / DBL_MAX;
  71. if (small >= sfmin) sfmin = small * (one + DBL_EPSILON);
  72. return small;
  73. } else if ('U' == ch || 'u' == ch) {
  74. return DBL_MIN;
  75. }
  76. return zero;
  77. }
  78. constexpr
  79. double
  80. d1mach_(int const i__)
  81. {
  82. /* ***BEGIN PROLOGUE D1MACH */
  83. /* ***PURPOSE Return floating point machine dependent constants. */
  84. /* ***LIBRARY SLATEC */
  85. /* ***CATEGORY R1 */
  86. /* ***TYPE DOUBLE PRECISION (R1MACH-S, D1MACH-D) */
  87. /* ***KEYWORDS MACHINE CONSTANTS */
  88. /* ***AUTHOR Fox, P. A., (Bell Labs) */
  89. /* Hall, A. D., (Bell Labs) */
  90. /* Schryer, N. L., (Bell Labs) */
  91. /* ***DESCRIPTION */
  92. /* D1MACH can be used to obtain machine-dependent parameters for the */
  93. /* local machine environment. It is a function subprogram with one */
  94. /* (input) argument, and can be referenced as follows: */
  95. /* D = D1MACH(I) */
  96. /* where I=1,...,5. The (output) value of D above is determined by */
  97. /* the (input) value of I. The results for various values of I are */
  98. /* discussed below. */
  99. /* D1MACH( 1) = B**(EMIN-1), the smallest positive magnitude. */
  100. /* D1MACH( 2) = B**EMAX*(1 - B**(-T)), the largest magnitude. */
  101. /* D1MACH( 3) = B**(-T), the smallest relative spacing. */
  102. /* D1MACH( 4) = B**(1-T), the largest relative spacing. */
  103. /* D1MACH( 5) = LOG10(B) */
  104. /* Assume double precision numbers are represented in the T-digit, */
  105. /* base-B form */
  106. /* sign (B**E)*( (X(1)/B) + ... + (X(T)/B**T) ) */
  107. /* where 0 .LE. X(I) .LT. B for I=1,...,T, 0 .LT. X(1), and */
  108. /* EMIN .LE. E .LE. EMAX. */
  109. /* The values of B, T, EMIN and EMAX are provided in I1MACH as */
  110. /* follows: */
  111. /* I1MACH(10) = B, the base. */
  112. /* I1MACH(14) = T, the number of base-B digits. */
  113. /* I1MACH(15) = EMIN, the smallest exponent E. */
  114. /* I1MACH(16) = EMAX, the largest exponent E. */
  115. /* To alter this function for a particular environment, the desired */
  116. /* set of DATA statements should be activated by removing the C from */
  117. /* column 1. Also, the values of D1MACH(1) - D1MACH(4) should be */
  118. /* checked for consistency with the local operating system. */
  119. /* ***REFERENCES P. A. Fox, A. D. Hall and N. L. Schryer, Framework for */
  120. /* a portable library, ACM Transactions on Mathematical */
  121. /* Software 4, 2 (June 1978), pp. 177-188. */
  122. /* ***ROUTINES CALLED XERMSG */
  123. /* ***REVISION HISTORY (YYMMDD) */
  124. /* 750101 DATE WRITTEN */
  125. /* 890213 REVISION DATE from Version 3.2 */
  126. /* 891214 Prologue converted to Version 4.0 format. (BAB) */
  127. /* 900315 CALLs to XERROR changed to CALLs to XERMSG. (THJ) */
  128. /* 900618 Added DEC RISC constants. (WRB) */
  129. /* 900723 Added IBM RS 6000 constants. (WRB) */
  130. /* 900911 Added SUN 386i constants. (WRB) */
  131. /* 910710 Added HP 730 constants. (SMR) */
  132. /* 911114 Added Convex IEEE constants. (WRB) */
  133. /* 920121 Added SUN -r8 compiler option constants. (WRB) */
  134. /* 920229 Added Touchstone Delta i860 constants. (WRB) */
  135. /* 920501 Reformatted the REFERENCES section. (WRB) */
  136. /* 920625 Added CONVEX -p8 and -pd8 compiler option constants. */
  137. /* (BKS, WRB) */
  138. /* 930201 Added DEC Alpha and SGI constants. (RWC and WRB) */
  139. /* ***END PROLOGUE D1MACH */
  140. /* MACHINE CONSTANTS FOR THE AMIGA */
  141. /* ABSOFT FORTRAN COMPILER USING THE 68020/68881 COMPILER OPTION */
  142. /* DATA SMALL(1), SMALL(2) / Z'00100000', Z'00000000' / */
  143. /* DATA LARGE(1), LARGE(2) / Z'7FEFFFFF', Z'FFFFFFFF' / */
  144. /* DATA RIGHT(1), RIGHT(2) / Z'3CA00000', Z'00000000' / */
  145. /* DATA DIVER(1), DIVER(2) / Z'3CB00000', Z'00000000' / */
  146. /* DATA LOG10(1), LOG10(2) / Z'3FD34413', Z'509F79FF' / */
  147. /* MACHINE CONSTANTS FOR THE AMIGA */
  148. /* ABSOFT FORTRAN COMPILER USING SOFTWARE FLOATING POINT */
  149. /* DATA SMALL(1), SMALL(2) / Z'00100000', Z'00000000' / */
  150. /* DATA LARGE(1), LARGE(2) / Z'7FDFFFFF', Z'FFFFFFFF' / */
  151. /* DATA RIGHT(1), RIGHT(2) / Z'3CA00000', Z'00000000' / */
  152. /* DATA DIVER(1), DIVER(2) / Z'3CB00000', Z'00000000' / */
  153. /* DATA LOG10(1), LOG10(2) / Z'3FD34413', Z'509F79FF' / */
  154. /* MACHINE CONSTANTS FOR THE APOLLO */
  155. /* DATA SMALL(1), SMALL(2) / 16#00100000, 16#00000000 / */
  156. /* DATA LARGE(1), LARGE(2) / 16#7FFFFFFF, 16#FFFFFFFF / */
  157. /* DATA RIGHT(1), RIGHT(2) / 16#3CA00000, 16#00000000 / */
  158. /* DATA DIVER(1), DIVER(2) / 16#3CB00000, 16#00000000 / */
  159. /* DATA LOG10(1), LOG10(2) / 16#3FD34413, 16#509F79FF / */
  160. /* MACHINE CONSTANTS FOR THE BURROUGHS 1700 SYSTEM */
  161. /* DATA SMALL(1) / ZC00800000 / */
  162. /* DATA SMALL(2) / Z000000000 / */
  163. /* DATA LARGE(1) / ZDFFFFFFFF / */
  164. /* DATA LARGE(2) / ZFFFFFFFFF / */
  165. /* DATA RIGHT(1) / ZCC5800000 / */
  166. /* DATA RIGHT(2) / Z000000000 / */
  167. /* DATA DIVER(1) / ZCC6800000 / */
  168. /* DATA DIVER(2) / Z000000000 / */
  169. /* DATA LOG10(1) / ZD00E730E7 / */
  170. /* DATA LOG10(2) / ZC77800DC0 / */
  171. /* MACHINE CONSTANTS FOR THE BURROUGHS 5700 SYSTEM */
  172. /* DATA SMALL(1) / O1771000000000000 / */
  173. /* DATA SMALL(2) / O0000000000000000 / */
  174. /* DATA LARGE(1) / O0777777777777777 / */
  175. /* DATA LARGE(2) / O0007777777777777 / */
  176. /* DATA RIGHT(1) / O1461000000000000 / */
  177. /* DATA RIGHT(2) / O0000000000000000 / */
  178. /* DATA DIVER(1) / O1451000000000000 / */
  179. /* DATA DIVER(2) / O0000000000000000 / */
  180. /* DATA LOG10(1) / O1157163034761674 / */
  181. /* DATA LOG10(2) / O0006677466732724 / */
  182. /* MACHINE CONSTANTS FOR THE BURROUGHS 6700/7700 SYSTEMS */
  183. /* DATA SMALL(1) / O1771000000000000 / */
  184. /* DATA SMALL(2) / O7770000000000000 / */
  185. /* DATA LARGE(1) / O0777777777777777 / */
  186. /* DATA LARGE(2) / O7777777777777777 / */
  187. /* DATA RIGHT(1) / O1461000000000000 / */
  188. /* DATA RIGHT(2) / O0000000000000000 / */
  189. /* DATA DIVER(1) / O1451000000000000 / */
  190. /* DATA DIVER(2) / O0000000000000000 / */
  191. /* DATA LOG10(1) / O1157163034761674 / */
  192. /* DATA LOG10(2) / O0006677466732724 / */
  193. /* MACHINE CONSTANTS FOR THE CDC 170/180 SERIES USING NOS/VE */
  194. /* DATA SMALL(1) / Z"3001800000000000" / */
  195. /* DATA SMALL(2) / Z"3001000000000000" / */
  196. /* DATA LARGE(1) / Z"4FFEFFFFFFFFFFFE" / */
  197. /* DATA LARGE(2) / Z"4FFE000000000000" / */
  198. /* DATA RIGHT(1) / Z"3FD2800000000000" / */
  199. /* DATA RIGHT(2) / Z"3FD2000000000000" / */
  200. /* DATA DIVER(1) / Z"3FD3800000000000" / */
  201. /* DATA DIVER(2) / Z"3FD3000000000000" / */
  202. /* DATA LOG10(1) / Z"3FFF9A209A84FBCF" / */
  203. /* DATA LOG10(2) / Z"3FFFF7988F8959AC" / */
  204. /* MACHINE CONSTANTS FOR THE CDC 6000/7000 SERIES */
  205. /* DATA SMALL(1) / 00564000000000000000B / */
  206. /* DATA SMALL(2) / 00000000000000000000B / */
  207. /* DATA LARGE(1) / 37757777777777777777B / */
  208. /* DATA LARGE(2) / 37157777777777777777B / */
  209. /* DATA RIGHT(1) / 15624000000000000000B / */
  210. /* DATA RIGHT(2) / 00000000000000000000B / */
  211. /* DATA DIVER(1) / 15634000000000000000B / */
  212. /* DATA DIVER(2) / 00000000000000000000B / */
  213. /* DATA LOG10(1) / 17164642023241175717B / */
  214. /* DATA LOG10(2) / 16367571421742254654B / */
  215. /* MACHINE CONSTANTS FOR THE CELERITY C1260 */
  216. /* DATA SMALL(1), SMALL(2) / Z'00100000', Z'00000000' / */
  217. /* DATA LARGE(1), LARGE(2) / Z'7FEFFFFF', Z'FFFFFFFF' / */
  218. /* DATA RIGHT(1), RIGHT(2) / Z'3CA00000', Z'00000000' / */
  219. /* DATA DIVER(1), DIVER(2) / Z'3CB00000', Z'00000000' / */
  220. /* DATA LOG10(1), LOG10(2) / Z'3FD34413', Z'509F79FF' / */
  221. /* MACHINE CONSTANTS FOR THE CONVEX */
  222. /* USING THE -fn OR -pd8 COMPILER OPTION */
  223. /* DATA DMACH(1) / Z'0010000000000000' / */
  224. /* DATA DMACH(2) / Z'7FFFFFFFFFFFFFFF' / */
  225. /* DATA DMACH(3) / Z'3CC0000000000000' / */
  226. /* DATA DMACH(4) / Z'3CD0000000000000' / */
  227. /* DATA DMACH(5) / Z'3FF34413509F79FF' / */
  228. /* MACHINE CONSTANTS FOR THE CONVEX */
  229. /* USING THE -fi COMPILER OPTION */
  230. /* DATA DMACH(1) / Z'0010000000000000' / */
  231. /* DATA DMACH(2) / Z'7FEFFFFFFFFFFFFF' / */
  232. /* DATA DMACH(3) / Z'3CA0000000000000' / */
  233. /* DATA DMACH(4) / Z'3CB0000000000000' / */
  234. /* DATA DMACH(5) / Z'3FD34413509F79FF' / */
  235. /* MACHINE CONSTANTS FOR THE CONVEX */
  236. /* USING THE -p8 COMPILER OPTION */
  237. /* DATA DMACH(1) / Z'00010000000000000000000000000000' / */
  238. /* DATA DMACH(2) / Z'7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF' / */
  239. /* DATA DMACH(3) / Z'3F900000000000000000000000000000' / */
  240. /* DATA DMACH(4) / Z'3F910000000000000000000000000000' / */
  241. /* DATA DMACH(5) / Z'3FFF34413509F79FEF311F12B35816F9' / */
  242. /* MACHINE CONSTANTS FOR THE CRAY */
  243. /* DATA SMALL(1) / 201354000000000000000B / */
  244. /* DATA SMALL(2) / 000000000000000000000B / */
  245. /* DATA LARGE(1) / 577767777777777777777B / */
  246. /* DATA LARGE(2) / 000007777777777777774B / */
  247. /* DATA RIGHT(1) / 376434000000000000000B / */
  248. /* DATA RIGHT(2) / 000000000000000000000B / */
  249. /* DATA DIVER(1) / 376444000000000000000B / */
  250. /* DATA DIVER(2) / 000000000000000000000B / */
  251. /* DATA LOG10(1) / 377774642023241175717B / */
  252. /* DATA LOG10(2) / 000007571421742254654B / */
  253. /* MACHINE CONSTANTS FOR THE DATA GENERAL ECLIPSE S/200 */
  254. /* NOTE - IT MAY BE APPROPRIATE TO INCLUDE THE FOLLOWING CARD - */
  255. /* STATIC DMACH(5) */
  256. /* DATA SMALL / 20K, 3*0 / */
  257. /* DATA LARGE / 77777K, 3*177777K / */
  258. /* DATA RIGHT / 31420K, 3*0 / */
  259. /* DATA DIVER / 32020K, 3*0 / */
  260. /* DATA LOG10 / 40423K, 42023K, 50237K, 74776K / */
  261. /* MACHINE CONSTANTS FOR THE DEC ALPHA */
  262. /* USING G_FLOAT */
  263. /* DATA DMACH(1) / '0000000000000010'X / */
  264. /* DATA DMACH(2) / 'FFFFFFFFFFFF7FFF'X / */
  265. /* DATA DMACH(3) / '0000000000003CC0'X / */
  266. /* DATA DMACH(4) / '0000000000003CD0'X / */
  267. /* DATA DMACH(5) / '79FF509F44133FF3'X / */
  268. /* MACHINE CONSTANTS FOR THE DEC ALPHA */
  269. /* USING IEEE_FORMAT */
  270. /* DATA DMACH(1) / '0010000000000000'X / */
  271. /* DATA DMACH(2) / '7FEFFFFFFFFFFFFF'X / */
  272. /* DATA DMACH(3) / '3CA0000000000000'X / */
  273. /* DATA DMACH(4) / '3CB0000000000000'X / */
  274. /* DATA DMACH(5) / '3FD34413509F79FF'X / */
  275. /* MACHINE CONSTANTS FOR THE DEC RISC */
  276. /* DATA SMALL(1), SMALL(2) / Z'00000000', Z'00100000'/ */
  277. /* DATA LARGE(1), LARGE(2) / Z'FFFFFFFF', Z'7FEFFFFF'/ */
  278. /* DATA RIGHT(1), RIGHT(2) / Z'00000000', Z'3CA00000'/ */
  279. /* DATA DIVER(1), DIVER(2) / Z'00000000', Z'3CB00000'/ */
  280. /* DATA LOG10(1), LOG10(2) / Z'509F79FF', Z'3FD34413'/ */
  281. /* MACHINE CONSTANTS FOR THE DEC VAX */
  282. /* USING D_FLOATING */
  283. /* (EXPRESSED IN INTEGER AND HEXADECIMAL) */
  284. /* THE HEX FORMAT BELOW MAY NOT BE SUITABLE FOR UNIX SYSTEMS */
  285. /* THE INTEGER FORMAT SHOULD BE OK FOR UNIX SYSTEMS */
  286. /* DATA SMALL(1), SMALL(2) / 128, 0 / */
  287. /* DATA LARGE(1), LARGE(2) / -32769, -1 / */
  288. /* DATA RIGHT(1), RIGHT(2) / 9344, 0 / */
  289. /* DATA DIVER(1), DIVER(2) / 9472, 0 / */
  290. /* DATA LOG10(1), LOG10(2) / 546979738, -805796613 / */
  291. /* DATA SMALL(1), SMALL(2) / Z00000080, Z00000000 / */
  292. /* DATA LARGE(1), LARGE(2) / ZFFFF7FFF, ZFFFFFFFF / */
  293. /* DATA RIGHT(1), RIGHT(2) / Z00002480, Z00000000 / */
  294. /* DATA DIVER(1), DIVER(2) / Z00002500, Z00000000 / */
  295. /* DATA LOG10(1), LOG10(2) / Z209A3F9A, ZCFF884FB / */
  296. /* MACHINE CONSTANTS FOR THE DEC VAX */
  297. /* USING G_FLOATING */
  298. /* (EXPRESSED IN INTEGER AND HEXADECIMAL) */
  299. /* THE HEX FORMAT BELOW MAY NOT BE SUITABLE FOR UNIX SYSTEMS */
  300. /* THE INTEGER FORMAT SHOULD BE OK FOR UNIX SYSTEMS */
  301. /* DATA SMALL(1), SMALL(2) / 16, 0 / */
  302. /* DATA LARGE(1), LARGE(2) / -32769, -1 / */
  303. /* DATA RIGHT(1), RIGHT(2) / 15552, 0 / */
  304. /* DATA DIVER(1), DIVER(2) / 15568, 0 / */
  305. /* DATA LOG10(1), LOG10(2) / 1142112243, 2046775455 / */
  306. /* DATA SMALL(1), SMALL(2) / Z00000010, Z00000000 / */
  307. /* DATA LARGE(1), LARGE(2) / ZFFFF7FFF, ZFFFFFFFF / */
  308. /* DATA RIGHT(1), RIGHT(2) / Z00003CC0, Z00000000 / */
  309. /* DATA DIVER(1), DIVER(2) / Z00003CD0, Z00000000 / */
  310. /* DATA LOG10(1), LOG10(2) / Z44133FF3, Z79FF509F / */
  311. /* MACHINE CONSTANTS FOR THE ELXSI 6400 */
  312. /* (ASSUMING REAL*8 IS THE DEFAULT DOUBLE PRECISION) */
  313. /* DATA SMALL(1), SMALL(2) / '00100000'X,'00000000'X / */
  314. /* DATA LARGE(1), LARGE(2) / '7FEFFFFF'X,'FFFFFFFF'X / */
  315. /* DATA RIGHT(1), RIGHT(2) / '3CB00000'X,'00000000'X / */
  316. /* DATA DIVER(1), DIVER(2) / '3CC00000'X,'00000000'X / */
  317. /* DATA LOG10(1), LOG10(2) / '3FD34413'X,'509F79FF'X / */
  318. /* MACHINE CONSTANTS FOR THE HARRIS 220 */
  319. /* DATA SMALL(1), SMALL(2) / '20000000, '00000201 / */
  320. /* DATA LARGE(1), LARGE(2) / '37777777, '37777577 / */
  321. /* DATA RIGHT(1), RIGHT(2) / '20000000, '00000333 / */
  322. /* DATA DIVER(1), DIVER(2) / '20000000, '00000334 / */
  323. /* DATA LOG10(1), LOG10(2) / '23210115, '10237777 / */
  324. /* MACHINE CONSTANTS FOR THE HONEYWELL 600/6000 SERIES */
  325. /* DATA SMALL(1), SMALL(2) / O402400000000, O000000000000 / */
  326. /* DATA LARGE(1), LARGE(2) / O376777777777, O777777777777 / */
  327. /* DATA RIGHT(1), RIGHT(2) / O604400000000, O000000000000 / */
  328. /* DATA DIVER(1), DIVER(2) / O606400000000, O000000000000 / */
  329. /* DATA LOG10(1), LOG10(2) / O776464202324, O117571775714 / */
  330. /* MACHINE CONSTANTS FOR THE HP 730 */
  331. /* DATA DMACH(1) / Z'0010000000000000' / */
  332. /* DATA DMACH(2) / Z'7FEFFFFFFFFFFFFF' / */
  333. /* DATA DMACH(3) / Z'3CA0000000000000' / */
  334. /* DATA DMACH(4) / Z'3CB0000000000000' / */
  335. /* DATA DMACH(5) / Z'3FD34413509F79FF' / */
  336. /* MACHINE CONSTANTS FOR THE HP 2100 */
  337. /* THREE WORD DOUBLE PRECISION OPTION WITH FTN4 */
  338. /* DATA SMALL(1), SMALL(2), SMALL(3) / 40000B, 0, 1 / */
  339. /* DATA LARGE(1), LARGE(2), LARGE(3) / 77777B, 177777B, 177776B / */
  340. /* DATA RIGHT(1), RIGHT(2), RIGHT(3) / 40000B, 0, 265B / */
  341. /* DATA DIVER(1), DIVER(2), DIVER(3) / 40000B, 0, 276B / */
  342. /* DATA LOG10(1), LOG10(2), LOG10(3) / 46420B, 46502B, 77777B / */
  343. /* MACHINE CONSTANTS FOR THE HP 2100 */
  344. /* FOUR WORD DOUBLE PRECISION OPTION WITH FTN4 */
  345. /* DATA SMALL(1), SMALL(2) / 40000B, 0 / */
  346. /* DATA SMALL(3), SMALL(4) / 0, 1 / */
  347. /* DATA LARGE(1), LARGE(2) / 77777B, 177777B / */
  348. /* DATA LARGE(3), LARGE(4) / 177777B, 177776B / */
  349. /* DATA RIGHT(1), RIGHT(2) / 40000B, 0 / */
  350. /* DATA RIGHT(3), RIGHT(4) / 0, 225B / */
  351. /* DATA DIVER(1), DIVER(2) / 40000B, 0 / */
  352. /* DATA DIVER(3), DIVER(4) / 0, 227B / */
  353. /* DATA LOG10(1), LOG10(2) / 46420B, 46502B / */
  354. /* DATA LOG10(3), LOG10(4) / 76747B, 176377B / */
  355. /* MACHINE CONSTANTS FOR THE HP 9000 */
  356. /* DATA SMALL(1), SMALL(2) / 00040000000B, 00000000000B / */
  357. /* DATA LARGE(1), LARGE(2) / 17737777777B, 37777777777B / */
  358. /* DATA RIGHT(1), RIGHT(2) / 07454000000B, 00000000000B / */
  359. /* DATA DIVER(1), DIVER(2) / 07460000000B, 00000000000B / */
  360. /* DATA LOG10(1), LOG10(2) / 07764642023B, 12047674777B / */
  361. /* MACHINE CONSTANTS FOR THE IBM 360/370 SERIES, */
  362. /* THE XEROX SIGMA 5/7/9, THE SEL SYSTEMS 85/86, AND */
  363. /* THE PERKIN ELMER (INTERDATA) 7/32. */
  364. /* DATA SMALL(1), SMALL(2) / Z00100000, Z00000000 / */
  365. /* DATA LARGE(1), LARGE(2) / Z7FFFFFFF, ZFFFFFFFF / */
  366. /* DATA RIGHT(1), RIGHT(2) / Z33100000, Z00000000 / */
  367. /* DATA DIVER(1), DIVER(2) / Z34100000, Z00000000 / */
  368. /* DATA LOG10(1), LOG10(2) / Z41134413, Z509F79FF / */
  369. /* MACHINE CONSTANTS FOR THE IBM PC */
  370. /* ASSUMES THAT ALL ARITHMETIC IS DONE IN DOUBLE PRECISION */
  371. /* ON 8088, I.E., NOT IN 80 BIT FORM FOR THE 8087. */
  372. /* DATA SMALL(1) / 2.23D-308 / */
  373. /* DATA LARGE(1) / 1.79D+308 / */
  374. /* DATA RIGHT(1) / 1.11D-16 / */
  375. /* DATA DIVER(1) / 2.22D-16 / */
  376. /* DATA LOG10(1) / 0.301029995663981195D0 / */
  377. /* MACHINE CONSTANTS FOR THE IBM RS 6000 */
  378. /* DATA DMACH(1) / Z'0010000000000000' / */
  379. /* DATA DMACH(2) / Z'7FEFFFFFFFFFFFFF' / */
  380. /* DATA DMACH(3) / Z'3CA0000000000000' / */
  381. /* DATA DMACH(4) / Z'3CB0000000000000' / */
  382. /* DATA DMACH(5) / Z'3FD34413509F79FF' / */
  383. /* MACHINE CONSTANTS FOR THE INTEL i860 */
  384. /* DATA DMACH(1) / Z'0010000000000000' / */
  385. /* DATA DMACH(2) / Z'7FEFFFFFFFFFFFFF' / */
  386. /* DATA DMACH(3) / Z'3CA0000000000000' / */
  387. /* DATA DMACH(4) / Z'3CB0000000000000' / */
  388. /* DATA DMACH(5) / Z'3FD34413509F79FF' / */
  389. /* MACHINE CONSTANTS FOR THE PDP-10 (KA PROCESSOR) */
  390. /* DATA SMALL(1), SMALL(2) / "033400000000, "000000000000 / */
  391. /* DATA LARGE(1), LARGE(2) / "377777777777, "344777777777 / */
  392. /* DATA RIGHT(1), RIGHT(2) / "113400000000, "000000000000 / */
  393. /* DATA DIVER(1), DIVER(2) / "114400000000, "000000000000 / */
  394. /* DATA LOG10(1), LOG10(2) / "177464202324, "144117571776 / */
  395. /* MACHINE CONSTANTS FOR THE PDP-10 (KI PROCESSOR) */
  396. /* DATA SMALL(1), SMALL(2) / "000400000000, "000000000000 / */
  397. /* DATA LARGE(1), LARGE(2) / "377777777777, "377777777777 / */
  398. /* DATA RIGHT(1), RIGHT(2) / "103400000000, "000000000000 / */
  399. /* DATA DIVER(1), DIVER(2) / "104400000000, "000000000000 / */
  400. /* DATA LOG10(1), LOG10(2) / "177464202324, "476747767461 / */
  401. /* MACHINE CONSTANTS FOR PDP-11 FORTRAN SUPPORTING */
  402. /* 32-BIT INTEGERS (EXPRESSED IN INTEGER AND OCTAL). */
  403. /* DATA SMALL(1), SMALL(2) / 8388608, 0 / */
  404. /* DATA LARGE(1), LARGE(2) / 2147483647, -1 / */
  405. /* DATA RIGHT(1), RIGHT(2) / 612368384, 0 / */
  406. /* DATA DIVER(1), DIVER(2) / 620756992, 0 / */
  407. /* DATA LOG10(1), LOG10(2) / 1067065498, -2063872008 / */
  408. /* DATA SMALL(1), SMALL(2) / O00040000000, O00000000000 / */
  409. /* DATA LARGE(1), LARGE(2) / O17777777777, O37777777777 / */
  410. /* DATA RIGHT(1), RIGHT(2) / O04440000000, O00000000000 / */
  411. /* DATA DIVER(1), DIVER(2) / O04500000000, O00000000000 / */
  412. /* DATA LOG10(1), LOG10(2) / O07746420232, O20476747770 / */
  413. /* MACHINE CONSTANTS FOR PDP-11 FORTRAN SUPPORTING */
  414. /* 16-BIT INTEGERS (EXPRESSED IN INTEGER AND OCTAL). */
  415. /* DATA SMALL(1), SMALL(2) / 128, 0 / */
  416. /* DATA SMALL(3), SMALL(4) / 0, 0 / */
  417. /* DATA LARGE(1), LARGE(2) / 32767, -1 / */
  418. /* DATA LARGE(3), LARGE(4) / -1, -1 / */
  419. /* DATA RIGHT(1), RIGHT(2) / 9344, 0 / */
  420. /* DATA RIGHT(3), RIGHT(4) / 0, 0 / */
  421. /* DATA DIVER(1), DIVER(2) / 9472, 0 / */
  422. /* DATA DIVER(3), DIVER(4) / 0, 0 / */
  423. /* DATA LOG10(1), LOG10(2) / 16282, 8346 / */
  424. /* DATA LOG10(3), LOG10(4) / -31493, -12296 / */
  425. /* DATA SMALL(1), SMALL(2) / O000200, O000000 / */
  426. /* DATA SMALL(3), SMALL(4) / O000000, O000000 / */
  427. /* DATA LARGE(1), LARGE(2) / O077777, O177777 / */
  428. /* DATA LARGE(3), LARGE(4) / O177777, O177777 / */
  429. /* DATA RIGHT(1), RIGHT(2) / O022200, O000000 / */
  430. /* DATA RIGHT(3), RIGHT(4) / O000000, O000000 / */
  431. /* DATA DIVER(1), DIVER(2) / O022400, O000000 / */
  432. /* DATA DIVER(3), DIVER(4) / O000000, O000000 / */
  433. /* DATA LOG10(1), LOG10(2) / O037632, O020232 / */
  434. /* DATA LOG10(3), LOG10(4) / O102373, O147770 / */
  435. /* MACHINE CONSTANTS FOR THE SILICON GRAPHICS */
  436. /* DATA SMALL(1), SMALL(2) / Z'00100000', Z'00000000' / */
  437. /* DATA LARGE(1), LARGE(2) / Z'7FEFFFFF', Z'FFFFFFFF' / */
  438. /* DATA RIGHT(1), RIGHT(2) / Z'3CA00000', Z'00000000' / */
  439. /* DATA DIVER(1), DIVER(2) / Z'3CB00000', Z'00000000' / */
  440. /* DATA LOG10(1), LOG10(2) / Z'3FD34413', Z'509F79FF' / */
  441. /* MACHINE CONSTANTS FOR THE SUN */
  442. /* DATA DMACH(1) / Z'0010000000000000' / */
  443. /* DATA DMACH(2) / Z'7FEFFFFFFFFFFFFF' / */
  444. /* DATA DMACH(3) / Z'3CA0000000000000' / */
  445. /* DATA DMACH(4) / Z'3CB0000000000000' / */
  446. /* DATA DMACH(5) / Z'3FD34413509F79FF' / */
  447. /* MACHINE CONSTANTS FOR THE SUN */
  448. /* USING THE -r8 COMPILER OPTION */
  449. /* DATA DMACH(1) / Z'00010000000000000000000000000000' / */
  450. /* DATA DMACH(2) / Z'7FFEFFFFFFFFFFFFFFFFFFFFFFFFFFFF' / */
  451. /* DATA DMACH(3) / Z'3F8E0000000000000000000000000000' / */
  452. /* DATA DMACH(4) / Z'3F8F0000000000000000000000000000' / */
  453. /* DATA DMACH(5) / Z'3FFD34413509F79FEF311F12B35816F9' / */
  454. /* MACHINE CONSTANTS FOR THE SUN 386i */
  455. /* DATA SMALL(1), SMALL(2) / Z'FFFFFFFD', Z'000FFFFF' / */
  456. /* DATA LARGE(1), LARGE(2) / Z'FFFFFFB0', Z'7FEFFFFF' / */
  457. /* DATA RIGHT(1), RIGHT(2) / Z'000000B0', Z'3CA00000' / */
  458. /* DATA DIVER(1), DIVER(2) / Z'FFFFFFCB', Z'3CAFFFFF' */
  459. /* DATA LOG10(1), LOG10(2) / Z'509F79E9', Z'3FD34413' / */
  460. /* MACHINE CONSTANTS FOR THE UNIVAC 1100 SERIES FTN COMPILER */
  461. /* DATA SMALL(1), SMALL(2) / O000040000000, O000000000000 / */
  462. /* DATA LARGE(1), LARGE(2) / O377777777777, O777777777777 / */
  463. /* DATA RIGHT(1), RIGHT(2) / O170540000000, O000000000000 / */
  464. /* DATA DIVER(1), DIVER(2) / O170640000000, O000000000000 / */
  465. /* DATA LOG10(1), LOG10(2) / O177746420232, O411757177572 / */
  466. /* ***FIRST EXECUTABLE STATEMENT D1MACH */
  467. constexpr double dmach[5] = { dlamch_('u'), dlamch_('o'), dlamch_('e'), dlamch_('p'), log10(dlamch_('b')) };
  468. assert(i__>=1 && i__<=5 && "Bad argument for d1mach");
  469. return dmach[i__ - 1];
  470. }
  471. constexpr
  472. int
  473. i1mach_(int const i__)
  474. {
  475. /* ***BEGIN PROLOGUE I1MACH */
  476. /* ***PURPOSE Return integer machine dependent constants. */
  477. /* ***LIBRARY SLATEC */
  478. /* ***CATEGORY R1 */
  479. /* ***TYPE INTEGER (I1MACH-I) */
  480. /* ***KEYWORDS MACHINE CONSTANTS */
  481. /* ***AUTHOR Fox, P. A., (Bell Labs) */
  482. /* Hall, A. D., (Bell Labs) */
  483. /* Schryer, N. L., (Bell Labs) */
  484. /* ***DESCRIPTION */
  485. /* I1MACH can be used to obtain machine-dependent parameters for the */
  486. /* local machine environment. It is a function subprogram with one */
  487. /* (input) argument and can be referenced as follows: */
  488. /* K = I1MACH(I) */
  489. /* where I=1,...,16. The (output) value of K above is determined by */
  490. /* the (input) value of I. The results for various values of I are */
  491. /* discussed below. */
  492. /* I/O unit numbers: */
  493. /* I1MACH( 1) = the standard input unit. */
  494. /* I1MACH( 2) = the standard output unit. */
  495. /* I1MACH( 3) = the standard punch unit. */
  496. /* I1MACH( 4) = the standard error message unit. */
  497. /* Words: */
  498. /* I1MACH( 5) = the number of bits per integer storage unit. */
  499. /* I1MACH( 6) = the number of characters per integer storage unit. */
  500. /* Integers: */
  501. /* assume integers are represented in the S-digit, base-A form */
  502. /* sign ( X(S-1)*A**(S-1) + ... + X(1)*A + X(0) ) */
  503. /* where 0 .LE. X(I) .LT. A for I=0,...,S-1. */
  504. /* I1MACH( 7) = A, the base. */
  505. /* I1MACH( 8) = S, the number of base-A digits. */
  506. /* I1MACH( 9) = A**S - 1, the largest magnitude. */
  507. /* Floating-Point Numbers: */
  508. /* Assume floating-point numbers are represented in the T-digit, */
  509. /* base-B form */
  510. /* sign (B**E)*( (X(1)/B) + ... + (X(T)/B**T) ) */
  511. /* where 0 .LE. X(I) .LT. B for I=1,...,T, */
  512. /* 0 .LT. X(1), and EMIN .LE. E .LE. EMAX. */
  513. /* I1MACH(10) = B, the base. */
  514. /* Single-Precision: */
  515. /* I1MACH(11) = T, the number of base-B digits. */
  516. /* I1MACH(12) = EMIN, the smallest exponent E. */
  517. /* I1MACH(13) = EMAX, the largest exponent E. */
  518. /* Double-Precision: */
  519. /* I1MACH(14) = T, the number of base-B digits. */
  520. /* I1MACH(15) = EMIN, the smallest exponent E. */
  521. /* I1MACH(16) = EMAX, the largest exponent E. */
  522. /* To alter this function for a particular environment, the desired */
  523. /* set of DATA statements should be activated by removing the C from */
  524. /* column 1. Also, the values of I1MACH(1) - I1MACH(4) should be */
  525. /* checked for consistency with the local operating system. */
  526. /* ***REFERENCES P. A. Fox, A. D. Hall and N. L. Schryer, Framework for */
  527. /* a portable library, ACM Transactions on Mathematical */
  528. /* Software 4, 2 (June 1978), pp. 177-188. */
  529. /* ***ROUTINES CALLED (NONE) */
  530. /* ***REVISION HISTORY (YYMMDD) */
  531. /* 750101 DATE WRITTEN */
  532. /* 891012 Added VAX G-floating constants. (WRB) */
  533. /* 891012 REVISION DATE from Version 3.2 */
  534. /* 891214 Prologue converted to Version 4.0 format. (BAB) */
  535. /* 900618 Added DEC RISC constants. (WRB) */
  536. /* 900723 Added IBM RS 6000 constants. (WRB) */
  537. /* 901009 Correct I1MACH(7) for IBM Mainframes. Should be 2 not 16. */
  538. /* (RWC) */
  539. /* 910710 Added HP 730 constants. (SMR) */
  540. /* 911114 Added Convex IEEE constants. (WRB) */
  541. /* 920121 Added SUN -r8 compiler option constants. (WRB) */
  542. /* 920229 Added Touchstone Delta i860 constants. (WRB) */
  543. /* 920501 Reformatted the REFERENCES section. (WRB) */
  544. /* 920625 Added Convex -p8 and -pd8 compiler option constants. */
  545. /* (BKS, WRB) */
  546. /* 930201 Added DEC Alpha and SGI constants. (RWC and WRB) */
  547. /* 930618 Corrected I1MACH(5) for Convex -p8 and -pd8 compiler */
  548. /* options. (DWL, RWC and WRB). */
  549. /* ***END PROLOGUE I1MACH */
  550. /* MACHINE CONSTANTS FOR THE AMIGA */
  551. /* ABSOFT COMPILER */
  552. /* DATA IMACH( 1) / 5 / */
  553. /* DATA IMACH( 2) / 6 / */
  554. /* DATA IMACH( 3) / 5 / */
  555. /* DATA IMACH( 4) / 6 / */
  556. /* DATA IMACH( 5) / 32 / */
  557. /* DATA IMACH( 6) / 4 / */
  558. /* DATA IMACH( 7) / 2 / */
  559. /* DATA IMACH( 8) / 31 / */
  560. /* DATA IMACH( 9) / 2147483647 / */
  561. /* DATA IMACH(10) / 2 / */
  562. /* DATA IMACH(11) / 24 / */
  563. /* DATA IMACH(12) / -126 / */
  564. /* DATA IMACH(13) / 127 / */
  565. /* DATA IMACH(14) / 53 / */
  566. /* DATA IMACH(15) / -1022 / */
  567. /* DATA IMACH(16) / 1023 / */
  568. /* MACHINE CONSTANTS FOR THE APOLLO */
  569. /* DATA IMACH( 1) / 5 / */
  570. /* DATA IMACH( 2) / 6 / */
  571. /* DATA IMACH( 3) / 6 / */
  572. /* DATA IMACH( 4) / 6 / */
  573. /* DATA IMACH( 5) / 32 / */
  574. /* DATA IMACH( 6) / 4 / */
  575. /* DATA IMACH( 7) / 2 / */
  576. /* DATA IMACH( 8) / 31 / */
  577. /* DATA IMACH( 9) / 2147483647 / */
  578. /* DATA IMACH(10) / 2 / */
  579. /* DATA IMACH(11) / 24 / */
  580. /* DATA IMACH(12) / -125 / */
  581. /* DATA IMACH(13) / 129 / */
  582. /* DATA IMACH(14) / 53 / */
  583. /* DATA IMACH(15) / -1021 / */
  584. /* DATA IMACH(16) / 1025 / */
  585. /* MACHINE CONSTANTS FOR THE BURROUGHS 1700 SYSTEM */
  586. /* DATA IMACH( 1) / 7 / */
  587. /* DATA IMACH( 2) / 2 / */
  588. /* DATA IMACH( 3) / 2 / */
  589. /* DATA IMACH( 4) / 2 / */
  590. /* DATA IMACH( 5) / 36 / */
  591. /* DATA IMACH( 6) / 4 / */
  592. /* DATA IMACH( 7) / 2 / */
  593. /* DATA IMACH( 8) / 33 / */
  594. /* DATA IMACH( 9) / Z1FFFFFFFF / */
  595. /* DATA IMACH(10) / 2 / */
  596. /* DATA IMACH(11) / 24 / */
  597. /* DATA IMACH(12) / -256 / */
  598. /* DATA IMACH(13) / 255 / */
  599. /* DATA IMACH(14) / 60 / */
  600. /* DATA IMACH(15) / -256 / */
  601. /* DATA IMACH(16) / 255 / */
  602. /* MACHINE CONSTANTS FOR THE BURROUGHS 5700 SYSTEM */
  603. /* DATA IMACH( 1) / 5 / */
  604. /* DATA IMACH( 2) / 6 / */
  605. /* DATA IMACH( 3) / 7 / */
  606. /* DATA IMACH( 4) / 6 / */
  607. /* DATA IMACH( 5) / 48 / */
  608. /* DATA IMACH( 6) / 6 / */
  609. /* DATA IMACH( 7) / 2 / */
  610. /* DATA IMACH( 8) / 39 / */
  611. /* DATA IMACH( 9) / O0007777777777777 / */
  612. /* DATA IMACH(10) / 8 / */
  613. /* DATA IMACH(11) / 13 / */
  614. /* DATA IMACH(12) / -50 / */
  615. /* DATA IMACH(13) / 76 / */
  616. /* DATA IMACH(14) / 26 / */
  617. /* DATA IMACH(15) / -50 / */
  618. /* DATA IMACH(16) / 76 / */
  619. /* MACHINE CONSTANTS FOR THE BURROUGHS 6700/7700 SYSTEMS */
  620. /* DATA IMACH( 1) / 5 / */
  621. /* DATA IMACH( 2) / 6 / */
  622. /* DATA IMACH( 3) / 7 / */
  623. /* DATA IMACH( 4) / 6 / */
  624. /* DATA IMACH( 5) / 48 / */
  625. /* DATA IMACH( 6) / 6 / */
  626. /* DATA IMACH( 7) / 2 / */
  627. /* DATA IMACH( 8) / 39 / */
  628. /* DATA IMACH( 9) / O0007777777777777 / */
  629. /* DATA IMACH(10) / 8 / */
  630. /* DATA IMACH(11) / 13 / */
  631. /* DATA IMACH(12) / -50 / */
  632. /* DATA IMACH(13) / 76 / */
  633. /* DATA IMACH(14) / 26 / */
  634. /* DATA IMACH(15) / -32754 / */
  635. /* DATA IMACH(16) / 32780 / */
  636. /* MACHINE CONSTANTS FOR THE CDC 170/180 SERIES USING NOS/VE */
  637. /* DATA IMACH( 1) / 5 / */
  638. /* DATA IMACH( 2) / 6 / */
  639. /* DATA IMACH( 3) / 7 / */
  640. /* DATA IMACH( 4) / 6 / */
  641. /* DATA IMACH( 5) / 64 / */
  642. /* DATA IMACH( 6) / 8 / */
  643. /* DATA IMACH( 7) / 2 / */
  644. /* DATA IMACH( 8) / 63 / */
  645. /* DATA IMACH( 9) / 9223372036854775807 / */
  646. /* DATA IMACH(10) / 2 / */
  647. /* DATA IMACH(11) / 47 / */
  648. /* DATA IMACH(12) / -4095 / */
  649. /* DATA IMACH(13) / 4094 / */
  650. /* DATA IMACH(14) / 94 / */
  651. /* DATA IMACH(15) / -4095 / */
  652. /* DATA IMACH(16) / 4094 / */
  653. /* MACHINE CONSTANTS FOR THE CDC 6000/7000 SERIES */
  654. /* DATA IMACH( 1) / 5 / */
  655. /* DATA IMACH( 2) / 6 / */
  656. /* DATA IMACH( 3) / 7 / */
  657. /* DATA IMACH( 4) / 6LOUTPUT/ */
  658. /* DATA IMACH( 5) / 60 / */
  659. /* DATA IMACH( 6) / 10 / */
  660. /* DATA IMACH( 7) / 2 / */
  661. /* DATA IMACH( 8) / 48 / */
  662. /* DATA IMACH( 9) / 00007777777777777777B / */
  663. /* DATA IMACH(10) / 2 / */
  664. /* DATA IMACH(11) / 47 / */
  665. /* DATA IMACH(12) / -929 / */
  666. /* DATA IMACH(13) / 1070 / */
  667. /* DATA IMACH(14) / 94 / */
  668. /* DATA IMACH(15) / -929 / */
  669. /* DATA IMACH(16) / 1069 / */
  670. /* MACHINE CONSTANTS FOR THE CELERITY C1260 */
  671. /* DATA IMACH( 1) / 5 / */
  672. /* DATA IMACH( 2) / 6 / */
  673. /* DATA IMACH( 3) / 6 / */
  674. /* DATA IMACH( 4) / 0 / */
  675. /* DATA IMACH( 5) / 32 / */
  676. /* DATA IMACH( 6) / 4 / */
  677. /* DATA IMACH( 7) / 2 / */
  678. /* DATA IMACH( 8) / 31 / */
  679. /* DATA IMACH( 9) / Z'7FFFFFFF' / */
  680. /* DATA IMACH(10) / 2 / */
  681. /* DATA IMACH(11) / 24 / */
  682. /* DATA IMACH(12) / -126 / */
  683. /* DATA IMACH(13) / 127 / */
  684. /* DATA IMACH(14) / 53 / */
  685. /* DATA IMACH(15) / -1022 / */
  686. /* DATA IMACH(16) / 1023 / */
  687. /* MACHINE CONSTANTS FOR THE CONVEX */
  688. /* USING THE -fn COMPILER OPTION */
  689. /* DATA IMACH( 1) / 5 / */
  690. /* DATA IMACH( 2) / 6 / */
  691. /* DATA IMACH( 3) / 7 / */
  692. /* DATA IMACH( 4) / 6 / */
  693. /* DATA IMACH( 5) / 32 / */
  694. /* DATA IMACH( 6) / 4 / */
  695. /* DATA IMACH( 7) / 2 / */
  696. /* DATA IMACH( 8) / 31 / */
  697. /* DATA IMACH( 9) / 2147483647 / */
  698. /* DATA IMACH(10) / 2 / */
  699. /* DATA IMACH(11) / 24 / */
  700. /* DATA IMACH(12) / -127 / */
  701. /* DATA IMACH(13) / 127 / */
  702. /* DATA IMACH(14) / 53 / */
  703. /* DATA IMACH(15) / -1023 / */
  704. /* DATA IMACH(16) / 1023 / */
  705. /* MACHINE CONSTANTS FOR THE CONVEX */
  706. /* USING THE -fi COMPILER OPTION */
  707. /* DATA IMACH( 1) / 5 / */
  708. /* DATA IMACH( 2) / 6 / */
  709. /* DATA IMACH( 3) / 7 / */
  710. /* DATA IMACH( 4) / 6 / */
  711. /* DATA IMACH( 5) / 32 / */
  712. /* DATA IMACH( 6) / 4 / */
  713. /* DATA IMACH( 7) / 2 / */
  714. /* DATA IMACH( 8) / 31 / */
  715. /* DATA IMACH( 9) / 2147483647 / */
  716. /* DATA IMACH(10) / 2 / */
  717. /* DATA IMACH(11) / 24 / */
  718. /* DATA IMACH(12) / -125 / */
  719. /* DATA IMACH(13) / 128 / */
  720. /* DATA IMACH(14) / 53 / */
  721. /* DATA IMACH(15) / -1021 / */
  722. /* DATA IMACH(16) / 1024 / */
  723. /* MACHINE CONSTANTS FOR THE CONVEX */
  724. /* USING THE -p8 COMPILER OPTION */
  725. /* DATA IMACH( 1) / 5 / */
  726. /* DATA IMACH( 2) / 6 / */
  727. /* DATA IMACH( 3) / 7 / */
  728. /* DATA IMACH( 4) / 6 / */
  729. /* DATA IMACH( 5) / 64 / */
  730. /* DATA IMACH( 6) / 4 / */
  731. /* DATA IMACH( 7) / 2 / */
  732. /* DATA IMACH( 8) / 63 / */
  733. /* DATA IMACH( 9) / 9223372036854775807 / */
  734. /* DATA IMACH(10) / 2 / */
  735. /* DATA IMACH(11) / 53 / */
  736. /* DATA IMACH(12) / -1023 / */
  737. /* DATA IMACH(13) / 1023 / */
  738. /* DATA IMACH(14) / 113 / */
  739. /* DATA IMACH(15) / -16383 / */
  740. /* DATA IMACH(16) / 16383 / */
  741. /* MACHINE CONSTANTS FOR THE CONVEX */
  742. /* USING THE -pd8 COMPILER OPTION */
  743. /* DATA IMACH( 1) / 5 / */
  744. /* DATA IMACH( 2) / 6 / */
  745. /* DATA IMACH( 3) / 7 / */
  746. /* DATA IMACH( 4) / 6 / */
  747. /* DATA IMACH( 5) / 64 / */
  748. /* DATA IMACH( 6) / 4 / */
  749. /* DATA IMACH( 7) / 2 / */
  750. /* DATA IMACH( 8) / 63 / */
  751. /* DATA IMACH( 9) / 9223372036854775807 / */
  752. /* DATA IMACH(10) / 2 / */
  753. /* DATA IMACH(11) / 53 / */
  754. /* DATA IMACH(12) / -1023 / */
  755. /* DATA IMACH(13) / 1023 / */
  756. /* DATA IMACH(14) / 53 / */
  757. /* DATA IMACH(15) / -1023 / */
  758. /* DATA IMACH(16) / 1023 / */
  759. /* MACHINE CONSTANTS FOR THE CRAY */
  760. /* USING THE 46 BIT INTEGER COMPILER OPTION */
  761. /* DATA IMACH( 1) / 100 / */
  762. /* DATA IMACH( 2) / 101 / */
  763. /* DATA IMACH( 3) / 102 / */
  764. /* DATA IMACH( 4) / 101 / */
  765. /* DATA IMACH( 5) / 64 / */
  766. /* DATA IMACH( 6) / 8 / */
  767. /* DATA IMACH( 7) / 2 / */
  768. /* DATA IMACH( 8) / 46 / */
  769. /* DATA IMACH( 9) / 1777777777777777B / */
  770. /* DATA IMACH(10) / 2 / */
  771. /* DATA IMACH(11) / 47 / */
  772. /* DATA IMACH(12) / -8189 / */
  773. /* DATA IMACH(13) / 8190 / */
  774. /* DATA IMACH(14) / 94 / */
  775. /* DATA IMACH(15) / -8099 / */
  776. /* DATA IMACH(16) / 8190 / */
  777. /* MACHINE CONSTANTS FOR THE CRAY */
  778. /* USING THE 64 BIT INTEGER COMPILER OPTION */
  779. /* DATA IMACH( 1) / 100 / */
  780. /* DATA IMACH( 2) / 101 / */
  781. /* DATA IMACH( 3) / 102 / */
  782. /* DATA IMACH( 4) / 101 / */
  783. /* DATA IMACH( 5) / 64 / */
  784. /* DATA IMACH( 6) / 8 / */
  785. /* DATA IMACH( 7) / 2 / */
  786. /* DATA IMACH( 8) / 63 / */
  787. /* DATA IMACH( 9) / 777777777777777777777B / */
  788. /* DATA IMACH(10) / 2 / */
  789. /* DATA IMACH(11) / 47 / */
  790. /* DATA IMACH(12) / -8189 / */
  791. /* DATA IMACH(13) / 8190 / */
  792. /* DATA IMACH(14) / 94 / */
  793. /* DATA IMACH(15) / -8099 / */
  794. /* DATA IMACH(16) / 8190 / */
  795. /* MACHINE CONSTANTS FOR THE DATA GENERAL ECLIPSE S/200 */
  796. /* DATA IMACH( 1) / 11 / */
  797. /* DATA IMACH( 2) / 12 / */
  798. /* DATA IMACH( 3) / 8 / */
  799. /* DATA IMACH( 4) / 10 / */
  800. /* DATA IMACH( 5) / 16 / */
  801. /* DATA IMACH( 6) / 2 / */
  802. /* DATA IMACH( 7) / 2 / */
  803. /* DATA IMACH( 8) / 15 / */
  804. /* DATA IMACH( 9) / 32767 / */
  805. /* DATA IMACH(10) / 16 / */
  806. /* DATA IMACH(11) / 6 / */
  807. /* DATA IMACH(12) / -64 / */
  808. /* DATA IMACH(13) / 63 / */
  809. /* DATA IMACH(14) / 14 / */
  810. /* DATA IMACH(15) / -64 / */
  811. /* DATA IMACH(16) / 63 / */
  812. /* MACHINE CONSTANTS FOR THE DEC ALPHA */
  813. /* USING G_FLOAT */
  814. /* DATA IMACH( 1) / 5 / */
  815. /* DATA IMACH( 2) / 6 / */
  816. /* DATA IMACH( 3) / 5 / */
  817. /* DATA IMACH( 4) / 6 / */
  818. /* DATA IMACH( 5) / 32 / */
  819. /* DATA IMACH( 6) / 4 / */
  820. /* DATA IMACH( 7) / 2 / */
  821. /* DATA IMACH( 8) / 31 / */
  822. /* DATA IMACH( 9) / 2147483647 / */
  823. /* DATA IMACH(10) / 2 / */
  824. /* DATA IMACH(11) / 24 / */
  825. /* DATA IMACH(12) / -127 / */
  826. /* DATA IMACH(13) / 127 / */
  827. /* DATA IMACH(14) / 53 / */
  828. /* DATA IMACH(15) / -1023 / */
  829. /* DATA IMACH(16) / 1023 / */
  830. /* MACHINE CONSTANTS FOR THE DEC ALPHA */
  831. /* USING IEEE_FLOAT */
  832. /* DATA IMACH( 1) / 5 / */
  833. /* DATA IMACH( 2) / 6 / */
  834. /* DATA IMACH( 3) / 6 / */
  835. /* DATA IMACH( 4) / 6 / */
  836. /* DATA IMACH( 5) / 32 / */
  837. /* DATA IMACH( 6) / 4 / */
  838. /* DATA IMACH( 7) / 2 / */
  839. /* DATA IMACH( 8) / 31 / */
  840. /* DATA IMACH( 9) / 2147483647 / */
  841. /* DATA IMACH(10) / 2 / */
  842. /* DATA IMACH(11) / 24 / */
  843. /* DATA IMACH(12) / -125 / */
  844. /* DATA IMACH(13) / 128 / */
  845. /* DATA IMACH(14) / 53 / */
  846. /* DATA IMACH(15) / -1021 / */
  847. /* DATA IMACH(16) / 1024 / */
  848. /* MACHINE CONSTANTS FOR THE DEC RISC */
  849. /* DATA IMACH( 1) / 5 / */
  850. /* DATA IMACH( 2) / 6 / */
  851. /* DATA IMACH( 3) / 6 / */
  852. /* DATA IMACH( 4) / 6 / */
  853. /* DATA IMACH( 5) / 32 / */
  854. /* DATA IMACH( 6) / 4 / */
  855. /* DATA IMACH( 7) / 2 / */
  856. /* DATA IMACH( 8) / 31 / */
  857. /* DATA IMACH( 9) / 2147483647 / */
  858. /* DATA IMACH(10) / 2 / */
  859. /* DATA IMACH(11) / 24 / */
  860. /* DATA IMACH(12) / -125 / */
  861. /* DATA IMACH(13) / 128 / */
  862. /* DATA IMACH(14) / 53 / */
  863. /* DATA IMACH(15) / -1021 / */
  864. /* DATA IMACH(16) / 1024 / */
  865. /* MACHINE CONSTANTS FOR THE DEC VAX */
  866. /* USING D_FLOATING */
  867. /* DATA IMACH( 1) / 5 / */
  868. /* DATA IMACH( 2) / 6 / */
  869. /* DATA IMACH( 3) / 5 / */
  870. /* DATA IMACH( 4) / 6 / */
  871. /* DATA IMACH( 5) / 32 / */
  872. /* DATA IMACH( 6) / 4 / */
  873. /* DATA IMACH( 7) / 2 / */
  874. /* DATA IMACH( 8) / 31 / */
  875. /* DATA IMACH( 9) / 2147483647 / */
  876. /* DATA IMACH(10) / 2 / */
  877. /* DATA IMACH(11) / 24 / */
  878. /* DATA IMACH(12) / -127 / */
  879. /* DATA IMACH(13) / 127 / */
  880. /* DATA IMACH(14) / 56 / */
  881. /* DATA IMACH(15) / -127 / */
  882. /* DATA IMACH(16) / 127 / */
  883. /* MACHINE CONSTANTS FOR THE DEC VAX */
  884. /* USING G_FLOATING */
  885. /* DATA IMACH( 1) / 5 / */
  886. /* DATA IMACH( 2) / 6 / */
  887. /* DATA IMACH( 3) / 5 / */
  888. /* DATA IMACH( 4) / 6 / */
  889. /* DATA IMACH( 5) / 32 / */
  890. /* DATA IMACH( 6) / 4 / */
  891. /* DATA IMACH( 7) / 2 / */
  892. /* DATA IMACH( 8) / 31 / */
  893. /* DATA IMACH( 9) / 2147483647 / */
  894. /* DATA IMACH(10) / 2 / */
  895. /* DATA IMACH(11) / 24 / */
  896. /* DATA IMACH(12) / -127 / */
  897. /* DATA IMACH(13) / 127 / */
  898. /* DATA IMACH(14) / 53 / */
  899. /* DATA IMACH(15) / -1023 / */
  900. /* DATA IMACH(16) / 1023 / */
  901. /* MACHINE CONSTANTS FOR THE ELXSI 6400 */
  902. /* DATA IMACH( 1) / 5 / */
  903. /* DATA IMACH( 2) / 6 / */
  904. /* DATA IMACH( 3) / 6 / */
  905. /* DATA IMACH( 4) / 6 / */
  906. /* DATA IMACH( 5) / 32 / */
  907. /* DATA IMACH( 6) / 4 / */
  908. /* DATA IMACH( 7) / 2 / */
  909. /* DATA IMACH( 8) / 32 / */
  910. /* DATA IMACH( 9) / 2147483647 / */
  911. /* DATA IMACH(10) / 2 / */
  912. /* DATA IMACH(11) / 24 / */
  913. /* DATA IMACH(12) / -126 / */
  914. /* DATA IMACH(13) / 127 / */
  915. /* DATA IMACH(14) / 53 / */
  916. /* DATA IMACH(15) / -1022 / */
  917. /* DATA IMACH(16) / 1023 / */
  918. /* MACHINE CONSTANTS FOR THE HARRIS 220 */
  919. /* DATA IMACH( 1) / 5 / */
  920. /* DATA IMACH( 2) / 6 / */
  921. /* DATA IMACH( 3) / 0 / */
  922. /* DATA IMACH( 4) / 6 / */
  923. /* DATA IMACH( 5) / 24 / */
  924. /* DATA IMACH( 6) / 3 / */
  925. /* DATA IMACH( 7) / 2 / */
  926. /* DATA IMACH( 8) / 23 / */
  927. /* DATA IMACH( 9) / 8388607 / */
  928. /* DATA IMACH(10) / 2 / */
  929. /* DATA IMACH(11) / 23 / */
  930. /* DATA IMACH(12) / -127 / */
  931. /* DATA IMACH(13) / 127 / */
  932. /* DATA IMACH(14) / 38 / */
  933. /* DATA IMACH(15) / -127 / */
  934. /* DATA IMACH(16) / 127 / */
  935. /* MACHINE CONSTANTS FOR THE HONEYWELL 600/6000 SERIES */
  936. /* DATA IMACH( 1) / 5 / */
  937. /* DATA IMACH( 2) / 6 / */
  938. /* DATA IMACH( 3) / 43 / */
  939. /* DATA IMACH( 4) / 6 / */
  940. /* DATA IMACH( 5) / 36 / */
  941. /* DATA IMACH( 6) / 6 / */
  942. /* DATA IMACH( 7) / 2 / */
  943. /* DATA IMACH( 8) / 35 / */
  944. /* DATA IMACH( 9) / O377777777777 / */
  945. /* DATA IMACH(10) / 2 / */
  946. /* DATA IMACH(11) / 27 / */
  947. /* DATA IMACH(12) / -127 / */
  948. /* DATA IMACH(13) / 127 / */
  949. /* DATA IMACH(14) / 63 / */
  950. /* DATA IMACH(15) / -127 / */
  951. /* DATA IMACH(16) / 127 / */
  952. /* MACHINE CONSTANTS FOR THE HP 730 */
  953. /* DATA IMACH( 1) / 5 / */
  954. /* DATA IMACH( 2) / 6 / */
  955. /* DATA IMACH( 3) / 6 / */
  956. /* DATA IMACH( 4) / 6 / */
  957. /* DATA IMACH( 5) / 32 / */
  958. /* DATA IMACH( 6) / 4 / */
  959. /* DATA IMACH( 7) / 2 / */
  960. /* DATA IMACH( 8) / 31 / */
  961. /* DATA IMACH( 9) / 2147483647 / */
  962. /* DATA IMACH(10) / 2 / */
  963. /* DATA IMACH(11) / 24 / */
  964. /* DATA IMACH(12) / -125 / */
  965. /* DATA IMACH(13) / 128 / */
  966. /* DATA IMACH(14) / 53 / */
  967. /* DATA IMACH(15) / -1021 / */
  968. /* DATA IMACH(16) / 1024 / */
  969. /* MACHINE CONSTANTS FOR THE HP 2100 */
  970. /* 3 WORD DOUBLE PRECISION OPTION WITH FTN4 */
  971. /* DATA IMACH( 1) / 5 / */
  972. /* DATA IMACH( 2) / 6 / */
  973. /* DATA IMACH( 3) / 4 / */
  974. /* DATA IMACH( 4) / 1 / */
  975. /* DATA IMACH( 5) / 16 / */
  976. /* DATA IMACH( 6) / 2 / */
  977. /* DATA IMACH( 7) / 2 / */
  978. /* DATA IMACH( 8) / 15 / */
  979. /* DATA IMACH( 9) / 32767 / */
  980. /* DATA IMACH(10) / 2 / */
  981. /* DATA IMACH(11) / 23 / */
  982. /* DATA IMACH(12) / -128 / */
  983. /* DATA IMACH(13) / 127 / */
  984. /* DATA IMACH(14) / 39 / */
  985. /* DATA IMACH(15) / -128 / */
  986. /* DATA IMACH(16) / 127 / */
  987. /* MACHINE CONSTANTS FOR THE HP 2100 */
  988. /* 4 WORD DOUBLE PRECISION OPTION WITH FTN4 */
  989. /* DATA IMACH( 1) / 5 / */
  990. /* DATA IMACH( 2) / 6 / */
  991. /* DATA IMACH( 3) / 4 / */
  992. /* DATA IMACH( 4) / 1 / */
  993. /* DATA IMACH( 5) / 16 / */
  994. /* DATA IMACH( 6) / 2 / */
  995. /* DATA IMACH( 7) / 2 / */
  996. /* DATA IMACH( 8) / 15 / */
  997. /* DATA IMACH( 9) / 32767 / */
  998. /* DATA IMACH(10) / 2 / */
  999. /* DATA IMACH(11) / 23 / */
  1000. /* DATA IMACH(12) / -128 / */
  1001. /* DATA IMACH(13) / 127 / */
  1002. /* DATA IMACH(14) / 55 / */
  1003. /* DATA IMACH(15) / -128 / */
  1004. /* DATA IMACH(16) / 127 / */
  1005. /* MACHINE CONSTANTS FOR THE HP 9000 */
  1006. /* DATA IMACH( 1) / 5 / */
  1007. /* DATA IMACH( 2) / 6 / */
  1008. /* DATA IMACH( 3) / 6 / */
  1009. /* DATA IMACH( 4) / 7 / */
  1010. /* DATA IMACH( 5) / 32 / */
  1011. /* DATA IMACH( 6) / 4 / */
  1012. /* DATA IMACH( 7) / 2 / */
  1013. /* DATA IMACH( 8) / 32 / */
  1014. /* DATA IMACH( 9) / 2147483647 / */
  1015. /* DATA IMACH(10) / 2 / */
  1016. /* DATA IMACH(11) / 24 / */
  1017. /* DATA IMACH(12) / -126 / */
  1018. /* DATA IMACH(13) / 127 / */
  1019. /* DATA IMACH(14) / 53 / */
  1020. /* DATA IMACH(15) / -1015 / */
  1021. /* DATA IMACH(16) / 1017 / */
  1022. /* MACHINE CONSTANTS FOR THE IBM 360/370 SERIES, */
  1023. /* THE XEROX SIGMA 5/7/9, THE SEL SYSTEMS 85/86, AND */
  1024. /* THE PERKIN ELMER (INTERDATA) 7/32. */
  1025. /* DATA IMACH( 1) / 5 / */
  1026. /* DATA IMACH( 2) / 6 / */
  1027. /* DATA IMACH( 3) / 7 / */
  1028. /* DATA IMACH( 4) / 6 / */
  1029. /* DATA IMACH( 5) / 32 / */
  1030. /* DATA IMACH( 6) / 4 / */
  1031. /* DATA IMACH( 7) / 2 / */
  1032. /* DATA IMACH( 8) / 31 / */
  1033. /* DATA IMACH( 9) / Z7FFFFFFF / */
  1034. /* DATA IMACH(10) / 16 / */
  1035. /* DATA IMACH(11) / 6 / */
  1036. /* DATA IMACH(12) / -64 / */
  1037. /* DATA IMACH(13) / 63 / */
  1038. /* DATA IMACH(14) / 14 / */
  1039. /* DATA IMACH(15) / -64 / */
  1040. /* DATA IMACH(16) / 63 / */
  1041. /* MACHINE CONSTANTS FOR THE IBM PC */
  1042. /* MACHINE CONSTANTS FOR THE IBM RS 6000 */
  1043. /* DATA IMACH( 1) / 5 / */
  1044. /* DATA IMACH( 2) / 6 / */
  1045. /* DATA IMACH( 3) / 6 / */
  1046. /* DATA IMACH( 4) / 0 / */
  1047. /* DATA IMACH( 5) / 32 / */
  1048. /* DATA IMACH( 6) / 4 / */
  1049. /* DATA IMACH( 7) / 2 / */
  1050. /* DATA IMACH( 8) / 31 / */
  1051. /* DATA IMACH( 9) / 2147483647 / */
  1052. /* DATA IMACH(10) / 2 / */
  1053. /* DATA IMACH(11) / 24 / */
  1054. /* DATA IMACH(12) / -125 / */
  1055. /* DATA IMACH(13) / 128 / */
  1056. /* DATA IMACH(14) / 53 / */
  1057. /* DATA IMACH(15) / -1021 / */
  1058. /* DATA IMACH(16) / 1024 / */
  1059. /* MACHINE CONSTANTS FOR THE INTEL i860 */
  1060. /* DATA IMACH( 1) / 5 / */
  1061. /* DATA IMACH( 2) / 6 / */
  1062. /* DATA IMACH( 3) / 6 / */
  1063. /* DATA IMACH( 4) / 6 / */
  1064. /* DATA IMACH( 5) / 32 / */
  1065. /* DATA IMACH( 6) / 4 / */
  1066. /* DATA IMACH( 7) / 2 / */
  1067. /* DATA IMACH( 8) / 31 / */
  1068. /* DATA IMACH( 9) / 2147483647 / */
  1069. /* DATA IMACH(10) / 2 / */
  1070. /* DATA IMACH(11) / 24 / */
  1071. /* DATA IMACH(12) / -125 / */
  1072. /* DATA IMACH(13) / 128 / */
  1073. /* DATA IMACH(14) / 53 / */
  1074. /* DATA IMACH(15) / -1021 / */
  1075. /* DATA IMACH(16) / 1024 / */
  1076. /* MACHINE CONSTANTS FOR THE PDP-10 (KA PROCESSOR) */
  1077. /* DATA IMACH( 1) / 5 / */
  1078. /* DATA IMACH( 2) / 6 / */
  1079. /* DATA IMACH( 3) / 5 / */
  1080. /* DATA IMACH( 4) / 6 / */
  1081. /* DATA IMACH( 5) / 36 / */
  1082. /* DATA IMACH( 6) / 5 / */
  1083. /* DATA IMACH( 7) / 2 / */
  1084. /* DATA IMACH( 8) / 35 / */
  1085. /* DATA IMACH( 9) / "377777777777 / */
  1086. /* DATA IMACH(10) / 2 / */
  1087. /* DATA IMACH(11) / 27 / */
  1088. /* DATA IMACH(12) / -128 / */
  1089. /* DATA IMACH(13) / 127 / */
  1090. /* DATA IMACH(14) / 54 / */
  1091. /* DATA IMACH(15) / -101 / */
  1092. /* DATA IMACH(16) / 127 / */
  1093. /* MACHINE CONSTANTS FOR THE PDP-10 (KI PROCESSOR) */
  1094. /* DATA IMACH( 1) / 5 / */
  1095. /* DATA IMACH( 2) / 6 / */
  1096. /* DATA IMACH( 3) / 5 / */
  1097. /* DATA IMACH( 4) / 6 / */
  1098. /* DATA IMACH( 5) / 36 / */
  1099. /* DATA IMACH( 6) / 5 / */
  1100. /* DATA IMACH( 7) / 2 / */
  1101. /* DATA IMACH( 8) / 35 / */
  1102. /* DATA IMACH( 9) / "377777777777 / */
  1103. /* DATA IMACH(10) / 2 / */
  1104. /* DATA IMACH(11) / 27 / */
  1105. /* DATA IMACH(12) / -128 / */
  1106. /* DATA IMACH(13) / 127 / */
  1107. /* DATA IMACH(14) / 62 / */
  1108. /* DATA IMACH(15) / -128 / */
  1109. /* DATA IMACH(16) / 127 / */
  1110. /* MACHINE CONSTANTS FOR PDP-11 FORTRAN SUPPORTING */
  1111. /* 32-BIT INTEGER ARITHMETIC. */
  1112. /* DATA IMACH( 1) / 5 / */
  1113. /* DATA IMACH( 2) / 6 / */
  1114. /* DATA IMACH( 3) / 5 / */
  1115. /* DATA IMACH( 4) / 6 / */
  1116. /* DATA IMACH( 5) / 32 / */
  1117. /* DATA IMACH( 6) / 4 / */
  1118. /* DATA IMACH( 7) / 2 / */
  1119. /* DATA IMACH( 8) / 31 / */
  1120. /* DATA IMACH( 9) / 2147483647 / */
  1121. /* DATA IMACH(10) / 2 / */
  1122. /* DATA IMACH(11) / 24 / */
  1123. /* DATA IMACH(12) / -127 / */
  1124. /* DATA IMACH(13) / 127 / */
  1125. /* DATA IMACH(14) / 56 / */
  1126. /* DATA IMACH(15) / -127 / */
  1127. /* DATA IMACH(16) / 127 / */
  1128. /* MACHINE CONSTANTS FOR PDP-11 FORTRAN SUPPORTING */
  1129. /* 16-BIT INTEGER ARITHMETIC. */
  1130. /* DATA IMACH( 1) / 5 / */
  1131. /* DATA IMACH( 2) / 6 / */
  1132. /* DATA IMACH( 3) / 5 / */
  1133. /* DATA IMACH( 4) / 6 / */
  1134. /* DATA IMACH( 5) / 16 / */
  1135. /* DATA IMACH( 6) / 2 / */
  1136. /* DATA IMACH( 7) / 2 / */
  1137. /* DATA IMACH( 8) / 15 / */
  1138. /* DATA IMACH( 9) / 32767 / */
  1139. /* DATA IMACH(10) / 2 / */
  1140. /* DATA IMACH(11) / 24 / */
  1141. /* DATA IMACH(12) / -127 / */
  1142. /* DATA IMACH(13) / 127 / */
  1143. /* DATA IMACH(14) / 56 / */
  1144. /* DATA IMACH(15) / -127 / */
  1145. /* DATA IMACH(16) / 127 / */
  1146. /* MACHINE CONSTANTS FOR THE SILICON GRAPHICS */
  1147. /* DATA IMACH( 1) / 5 / */
  1148. /* DATA IMACH( 2) / 6 / */
  1149. /* DATA IMACH( 3) / 6 / */
  1150. /* DATA IMACH( 4) / 6 / */
  1151. /* DATA IMACH( 5) / 32 / */
  1152. /* DATA IMACH( 6) / 4 / */
  1153. /* DATA IMACH( 7) / 2 / */
  1154. /* DATA IMACH( 8) / 31 / */
  1155. /* DATA IMACH( 9) / 2147483647 / */
  1156. /* DATA IMACH(10) / 2 / */
  1157. /* DATA IMACH(11) / 24 / */
  1158. /* DATA IMACH(12) / -125 / */
  1159. /* DATA IMACH(13) / 128 / */
  1160. /* DATA IMACH(14) / 53 / */
  1161. /* DATA IMACH(15) / -1021 / */
  1162. /* DATA IMACH(16) / 1024 / */
  1163. /* MACHINE CONSTANTS FOR THE SUN */
  1164. /* DATA IMACH( 1) / 5 / */
  1165. /* DATA IMACH( 2) / 6 / */
  1166. /* DATA IMACH( 3) / 6 / */
  1167. /* DATA IMACH( 4) / 6 / */
  1168. /* DATA IMACH( 5) / 32 / */
  1169. /* DATA IMACH( 6) / 4 / */
  1170. /* DATA IMACH( 7) / 2 / */
  1171. /* DATA IMACH( 8) / 31 / */
  1172. /* DATA IMACH( 9) / 2147483647 / */
  1173. /* DATA IMACH(10) / 2 / */
  1174. /* DATA IMACH(11) / 24 / */
  1175. /* DATA IMACH(12) / -125 / */
  1176. /* DATA IMACH(13) / 128 / */
  1177. /* DATA IMACH(14) / 53 / */
  1178. /* DATA IMACH(15) / -1021 / */
  1179. /* DATA IMACH(16) / 1024 / */
  1180. /* MACHINE CONSTANTS FOR THE SUN */
  1181. /* USING THE -r8 COMPILER OPTION */
  1182. /* DATA IMACH( 1) / 5 / */
  1183. /* DATA IMACH( 2) / 6 / */
  1184. /* DATA IMACH( 3) / 6 / */
  1185. /* DATA IMACH( 4) / 6 / */
  1186. /* DATA IMACH( 5) / 32 / */
  1187. /* DATA IMACH( 6) / 4 / */
  1188. /* DATA IMACH( 7) / 2 / */
  1189. /* DATA IMACH( 8) / 31 / */
  1190. /* DATA IMACH( 9) / 2147483647 / */
  1191. /* DATA IMACH(10) / 2 / */
  1192. /* DATA IMACH(11) / 53 / */
  1193. /* DATA IMACH(12) / -1021 / */
  1194. /* DATA IMACH(13) / 1024 / */
  1195. /* DATA IMACH(14) / 113 / */
  1196. /* DATA IMACH(15) / -16381 / */
  1197. /* DATA IMACH(16) / 16384 / */
  1198. /* MACHINE CONSTANTS FOR THE UNIVAC 1100 SERIES FTN COMPILER */
  1199. /* DATA IMACH( 1) / 5 / */
  1200. /* DATA IMACH( 2) / 6 / */
  1201. /* DATA IMACH( 3) / 1 / */
  1202. /* DATA IMACH( 4) / 6 / */
  1203. /* DATA IMACH( 5) / 36 / */
  1204. /* DATA IMACH( 6) / 4 / */
  1205. /* DATA IMACH( 7) / 2 / */
  1206. /* DATA IMACH( 8) / 35 / */
  1207. /* DATA IMACH( 9) / O377777777777 / */
  1208. /* DATA IMACH(10) / 2 / */
  1209. /* DATA IMACH(11) / 27 / */
  1210. /* DATA IMACH(12) / -128 / */
  1211. /* DATA IMACH(13) / 127 / */
  1212. /* DATA IMACH(14) / 60 / */
  1213. /* DATA IMACH(15) / -1024 / */
  1214. /* DATA IMACH(16) / 1023 / */
  1215. /* MACHINE CONSTANTS FOR THE Z80 MICROPROCESSOR */
  1216. /* DATA IMACH( 1) / 1 / */
  1217. /* DATA IMACH( 2) / 1 / */
  1218. /* DATA IMACH( 3) / 0 / */
  1219. /* DATA IMACH( 4) / 1 / */
  1220. /* DATA IMACH( 5) / 16 / */
  1221. /* DATA IMACH( 6) / 2 / */
  1222. /* DATA IMACH( 7) / 2 / */
  1223. /* DATA IMACH( 8) / 15 / */
  1224. /* DATA IMACH( 9) / 32767 / */
  1225. /* DATA IMACH(10) / 2 / */
  1226. /* DATA IMACH(11) / 24 / */
  1227. /* DATA IMACH(12) / -127 / */
  1228. /* DATA IMACH(13) / 127 / */
  1229. /* DATA IMACH(14) / 56 / */
  1230. /* DATA IMACH(15) / -127 / */
  1231. /* DATA IMACH(16) / 127 / */
  1232. /* ***FIRST EXECUTABLE STATEMENT I1MACH */
  1233. constexpr int imach[16] = { 5, 6, 0, 0, 32, 4, 2, 31, 2147483647, 2, 24, -125, 127,
  1234. 53, -1021, 1023 };
  1235. assert(i__>=1 && i__<=16);
  1236. return imach[i__ - 1];
  1237. }