1 /*- 2 * Copyright (c) 1980 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.proprietary.c% 6 */ 7 8 #ifndef lint 9 static char sccsid[] = "@(#)range.c 5.5 (Berkeley) 04/12/91"; 10 #endif /* not lint */ 11 12 /* 13 * routines to return extreme values 14 * VERY MACHINE DEPENDENT 15 */ 16 17 union fi 18 { float f; 19 long i; 20 } ; 21 22 union dj 23 { double d; 24 long j[2]; 25 } ; 26 27 float 28 flmax_() 29 { 30 union fi n; 31 #if pdp11 32 n.i = 0x7fffffffL; 33 #else pdp11 34 #if vax 35 n.i = 0xffff7fff; 36 #else vax 37 #if tahoe 38 n.i = 0x7fffffffL; 39 #else tahoe 40 #if hp300 41 n.i = 0x7fffffffL; 42 #else hp300 43 UNKNOWN MACHINE! 44 #endif hp300 45 #endif tahoe 46 #endif vax 47 #endif pdp11 48 return(n.f); 49 } 50 51 double 52 dflmax_() 53 { 54 union dj n; 55 #if pdp11 56 n.j[0] = 0x7fffffffL; 57 n.j[1] = 0xffffffffL; 58 #else pdp11 59 #if vax 60 n.j[0] = 0xffff7fff; 61 n.j[1] = 0xffffffff; 62 #else vax 63 #if tahoe 64 n.j[0] = 0x7fffffffL; 65 n.j[1] = 0xffffffffL; 66 #else tahoe 67 #if hp300 68 n.j[0] = 0x7fffffffL; 69 n.j[1] = 0xffffffffL; 70 #else hp300 71 UNKNOWN MACHINE! 72 #endif hp300 73 #endif tahoe 74 #endif vax 75 #endif pdp11 76 return(n.d); 77 } 78 79 float 80 flmin_() 81 { 82 union fi n; 83 #if pdp11 84 n.i = 0x00800000L; 85 #else pdp11 86 #if vax 87 n.i = 0x00000080; 88 #else vax 89 #if tahoe 90 n.i = 0x00800000L; 91 #else tahoe 92 #if hp300 93 n.i = 0x00800000L; 94 #else hp300 95 UNKNOWN MACHINE! 96 #endif hp300 97 #endif tahoe 98 #endif vax 99 #endif pdp11 100 return(n.f); 101 } 102 103 double 104 dflmin_() 105 { 106 union dj n; 107 #if pdp11 108 n.j[0] = 0x00800000L; 109 n.j[1] = 0; 110 #else pdp11 111 #if vax 112 n.j[0] = 0x00000080; 113 n.j[1] = 0; 114 #else vax 115 #if tahoe 116 n.j[0] = 0x00800000L; 117 n.j[1] = 0; 118 #else tahoe 119 #if hp300 120 n.j[0] = 0x00800000L; 121 n.j[1] = 0; 122 #else hp300 123 UNKNOWN MACHINE! 124 #endif hp300 125 #endif tahoe 126 #endif vax 127 #endif pdp11 128 return(n.d); 129 } 130 131 long int 132 inmax_() 133 { 134 return(0x7fffffffL); 135 } 136 137 138 float 139 ffrac_() 140 { 141 union fi n; 142 #if pdp11 143 n.i = 0x35000000L; 144 #else pdp11 145 #if vax 146 n.i = 0x00003500; 147 #else vax 148 #if tahoe 149 n.i = 0x35000000L; 150 #else tahoe 151 #if hp300 152 n.i = 0x35000000L; 153 #else hp300 154 UNKNOWN MACHINE! 155 #endif hp300 156 #endif tahoe 157 #endif vax 158 #endif pdp11 159 return(n.f); 160 } 161 162 double 163 dffrac_() 164 { 165 union dj n; 166 #if pdp11 167 n.j[0] = 0x25000000L; 168 n.j[1] = 0; 169 #else pdp11 170 #if vax 171 n.j[0] = 0x00002500; 172 n.j[1] = 0; 173 #else vax 174 #if tahoe 175 n.j[0] = 0x25000000L; 176 n.j[1] = 0; 177 #else tahoe 178 #if hp300 179 n.j[0] = 0x25000000L; 180 n.j[1] = 0; 181 #else hp300 182 UNKNOWN MACHINE! 183 #endif hp300 184 #endif tahoe 185 #endif vax 186 #endif pdp11 187 return(n.d); 188 } 189