| 1 | /* blas/slamch.f -- translated by f2c (version 20050501). |
| 2 | You must link the resulting object file with libf2c: |
| 3 | on Microsoft Windows system, link with libf2c.lib; |
| 4 | on Linux or Unix systems, link with .../path/to/libf2c.a -lm |
| 5 | or, if you install libf2c.a in a standard place, with -lf2c -lm |
| 6 | -- in that order, at the end of the command line, as in |
| 7 | cc *.o -lf2c -lm |
| 8 | Source for libf2c is in /netlib/f2c/libf2c.zip, e.g., |
| 9 | |
| 10 | http://www.netlib.org/f2c/libf2c.zip |
| 11 | */ |
| 12 | |
| 13 | /* This code expects correct IEEE rounding behaviour which is not |
| 14 | always provided. The source should be built with -ffloat-store. |
| 15 | A note from the GCC man page: |
| 16 | |
| 17 | -ffloat-store |
| 18 | Do not store floating point variables in registers. This pre- |
| 19 | vents undesirable excess precision on machines such as the 68000 |
| 20 | where the floating registers (of the 68881) keep more precision |
| 21 | than a double is supposed to have. |
| 22 | |
| 23 | For most programs, the excess precision does only good, but a |
| 24 | few programs rely on the precise definition of IEEE floating |
| 25 | point. Use `-ffloat-store' for such programs. */ |
| 26 | |
| 27 | /* Disable "global optimizations" to avoid optimizer bugs in this file. |
| 28 | For GCC the file should be compiled with the -fno-gcse option. Here |
| 29 | is a note from the GCC man page: |
| 30 | |
| 31 | Note: When compiling a program using computed gotos, a GCC exten- |
| 32 | sion, you may get better runtime performance if you disable the |
| 33 | global common subexpression elimination pass by adding -fno-gcse to |
| 34 | the command line. |
| 35 | */ |
| 36 | #ifdef _MSC_VER |
| 37 | # pragma optimize ("g",off) |
| 38 | #endif |
| 39 | |
| 40 | #ifdef __cplusplus |
| 41 | extern "C" { |
| 42 | #endif |
| 43 | #include "v3p_netlib.h"cxx . . $ `<file>/Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib.h`/ |
| 44 | |
| 45 | #include <stdio.h> |
| 46 | |
| 47 | /* Initialization function just calls the function once so that its |
| 48 | runtime-initialized constants are initialized. After the first |
| 49 | call it is safe to call the function from multiple threads at |
| 50 | once. */ |
| 51 | void v3p_netlib_slamch_initcxx . . $ v3p_netlib_slamch_init(d878ad36e69247c7).() |
| 52 | { |
| 53 | slamch_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:253:9`!(" ", 1); |
| 54 | } |
| 55 | |
| 56 | /* Table of constant values */ |
| 57 | |
| 58 | static realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! c_b32cxx . . $ c_b32. = (float)0.; |
| 59 | |
| 60 | /*< REAL FUNCTION SLAMCH( CMACH ) >*/ |
| 61 | doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! slamch_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:253:9`!(char *cmach, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`! cmach_len) |
| 62 | { |
| 63 | /* Initialized data */ |
| 64 | |
| 65 | static logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! first = TRUE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:29:9`!; /* runtime-initialized constant */ |
| 66 | |
| 67 | /* System generated locals */ |
| 68 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! i__1; |
| 69 | realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! ret_val; |
| 70 | |
| 71 | /* Builtin functions */ |
| 72 | double pow_ricxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:20:9`!(realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *); |
| 73 | |
| 74 | /* Local variables */ |
| 75 | static realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! t; /* runtime-initialized constant */ |
| 76 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! it; |
| 77 | static realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! rnd, eps, base; /* runtime-initialized constant */ |
| 78 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! beta; |
| 79 | static realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! emin, prec, emax; /* runtime-initialized constant */ |
| 80 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! imin, imax; |
| 81 | logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! lrnd; |
| 82 | static realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! rmin, rmax; /* runtime-initialized constant */ |
| 83 | realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! rmach=0; |
| 84 | extern logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(const char *, const char *, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!); |
| 85 | realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! small; |
| 86 | static realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! sfmin; /* runtime-initialized constant */ |
| 87 | extern /* Subroutine */ int slamc2_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:249:9`!(integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! *, realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! |
| 88 | *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! *); |
| 89 | (void)cmach_len; |
| 90 | |
| 91 | /* -- LAPACK auxiliary routine (version 1.1) -- */ |
| 92 | /* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., */ |
| 93 | /* Courant Institute, Argonne National Lab, and Rice University */ |
| 94 | /* October 31, 1992 */ |
| 95 | |
| 96 | /* .. Scalar Arguments .. */ |
| 97 | /*< CHARACTER CMACH >*/ |
| 98 | /* .. */ |
| 99 | |
| 100 | /* Purpose */ |
| 101 | /* ======= */ |
| 102 | |
| 103 | /* SLAMCH determines single precision machine parameters. */ |
| 104 | |
| 105 | /* Arguments */ |
| 106 | /* ========= */ |
| 107 | |
| 108 | /* CMACH (input) CHARACTER*1 */ |
| 109 | /* Specifies the value to be returned by SLAMCH: */ |
| 110 | /* = 'E' or 'e', SLAMCH := eps */ |
| 111 | /* = 'S' or 's , SLAMCH := sfmin */ |
| 112 | /* = 'B' or 'b', SLAMCH := base */ |
| 113 | /* = 'P' or 'p', SLAMCH := eps*base */ |
| 114 | /* = 'N' or 'n', SLAMCH := t */ |
| 115 | /* = 'R' or 'r', SLAMCH := rnd */ |
| 116 | /* = 'M' or 'm', SLAMCH := emin */ |
| 117 | /* = 'U' or 'u', SLAMCH := rmin */ |
| 118 | /* = 'L' or 'l', SLAMCH := emax */ |
| 119 | /* = 'O' or 'o', SLAMCH := rmax */ |
| 120 | |
| 121 | /* where */ |
| 122 | |
| 123 | /* eps = relative machine precision */ |
| 124 | /* sfmin = safe minimum, such that 1/sfmin does not overflow */ |
| 125 | /* base = base of the machine */ |
| 126 | /* prec = eps*base */ |
| 127 | /* t = number of (base) digits in the mantissa */ |
| 128 | /* rnd = 1.0 when rounding occurs in addition, 0.0 otherwise */ |
| 129 | /* emin = minimum exponent before (gradual) underflow */ |
| 130 | /* rmin = underflow threshold - base**(emin-1) */ |
| 131 | /* emax = largest exponent before overflow */ |
| 132 | /* rmax = overflow threshold - (base**emax)*(1-eps) */ |
| 133 | |
| 134 | /* ===================================================================== */ |
| 135 | |
| 136 | /* .. Parameters .. */ |
| 137 | /*< REAL ONE, ZERO >*/ |
| 138 | /*< PARAMETER ( ONE = 1.0E+0, ZERO = 0.0E+0 ) >*/ |
| 139 | /* .. */ |
| 140 | /* .. Local Scalars .. */ |
| 141 | /*< LOGICAL FIRST, LRND >*/ |
| 142 | /*< INTEGER BETA, IMAX, IMIN, IT >*/ |
| 143 | /*< >*/ |
| 144 | /* .. */ |
| 145 | /* .. External Functions .. */ |
| 146 | /*< LOGICAL LSAME >*/ |
| 147 | /*< EXTERNAL LSAME >*/ |
| 148 | /* .. */ |
| 149 | /* .. External Subroutines .. */ |
| 150 | /*< EXTERNAL SLAMC2 >*/ |
| 151 | /* .. */ |
| 152 | /* .. Save statement .. */ |
| 153 | /*< >*/ |
| 154 | /* .. */ |
| 155 | /* .. Data statements .. */ |
| 156 | /*< DATA FIRST / .TRUE. / >*/ |
| 157 | /* .. */ |
| 158 | /* .. Executable Statements .. */ |
| 159 | |
| 160 | /*< IF( FIRST ) THEN >*/ |
| 161 | if (first) { |
| 162 | /*< FIRST = .FALSE. >*/ |
| 163 | first = FALSE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:30:9`!; |
| 164 | /*< CALL SLAMC2( BETA, IT, LRND, EPS, IMIN, RMIN, IMAX, RMAX ) >*/ |
| 165 | slamc2_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:249:9`!(&beta, &it, &lrnd, &eps, &imin, &rmin, &imax, &rmax); |
| 166 | /*< BASE = BETA >*/ |
| 167 | base = (realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`!) beta; |
| 168 | /*< T = IT >*/ |
| 169 | t = (realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`!) it; |
| 170 | /*< IF( LRND ) THEN >*/ |
| 171 | if (lrnd) { |
| 172 | /*< RND = ONE >*/ |
| 173 | rnd = (float)1.; |
| 174 | /*< EPS = ( BASE**( 1-IT ) ) / 2 >*/ |
| 175 | i__1 = 1 - it; |
| 176 | eps = pow_ricxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:20:9`!(&base, &i__1) / 2; |
| 177 | /*< ELSE >*/ |
| 178 | } else { |
| 179 | /*< RND = ZERO >*/ |
| 180 | rnd = (float)0.; |
| 181 | /*< EPS = BASE**( 1-IT ) >*/ |
| 182 | i__1 = 1 - it; |
| 183 | eps = pow_ricxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:20:9`!(&base, &i__1); |
| 184 | /*< END IF >*/ |
| 185 | } |
| 186 | /*< PREC = EPS*BASE >*/ |
| 187 | prec = eps * base; |
| 188 | /*< EMIN = IMIN >*/ |
| 189 | emin = (realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`!) imin; |
| 190 | /*< EMAX = IMAX >*/ |
| 191 | emax = (realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`!) imax; |
| 192 | /*< SFMIN = RMIN >*/ |
| 193 | sfmin = rmin; |
| 194 | /*< SMALL = ONE / RMAX >*/ |
| 195 | small = (float)1. / rmax; |
| 196 | /*< IF( SMALL.GE.SFMIN ) THEN >*/ |
| 197 | if (small >= sfmin) { |
| 198 | |
| 199 | /* Use SMALL plus a bit, to avoid the possibility of rounding */ |
| 200 | /* causing overflow when computing 1/sfmin. */ |
| 201 | |
| 202 | /*< SFMIN = SMALL*( ONE+EPS ) >*/ |
| 203 | sfmin = small * (eps + (float)1.); |
| 204 | /*< END IF >*/ |
| 205 | } |
| 206 | /*< END IF >*/ |
| 207 | } |
| 208 | |
| 209 | /*< IF( LSAME( CMACH, 'E' ) ) THEN >*/ |
| 210 | if (lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(cmach, "E", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1)) { |
| 211 | /*< RMACH = EPS >*/ |
| 212 | rmach = eps; |
| 213 | /*< ELSE IF( LSAME( CMACH, 'S' ) ) THEN >*/ |
| 214 | } else if (lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(cmach, "S", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1)) { |
| 215 | /*< RMACH = SFMIN >*/ |
| 216 | rmach = sfmin; |
| 217 | /*< ELSE IF( LSAME( CMACH, 'B' ) ) THEN >*/ |
| 218 | } else if (lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(cmach, "B", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1)) { |
| 219 | /*< RMACH = BASE >*/ |
| 220 | rmach = base; |
| 221 | /*< ELSE IF( LSAME( CMACH, 'P' ) ) THEN >*/ |
| 222 | } else if (lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(cmach, "P", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1)) { |
| 223 | /*< RMACH = PREC >*/ |
| 224 | rmach = prec; |
| 225 | /*< ELSE IF( LSAME( CMACH, 'N' ) ) THEN >*/ |
| 226 | } else if (lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(cmach, "N", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1)) { |
| 227 | /*< RMACH = T >*/ |
| 228 | rmach = t; |
| 229 | /*< ELSE IF( LSAME( CMACH, 'R' ) ) THEN >*/ |
| 230 | } else if (lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(cmach, "R", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1)) { |
| 231 | /*< RMACH = RND >*/ |
| 232 | rmach = rnd; |
| 233 | /*< ELSE IF( LSAME( CMACH, 'M' ) ) THEN >*/ |
| 234 | } else if (lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(cmach, "M", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1)) { |
| 235 | /*< RMACH = EMIN >*/ |
| 236 | rmach = emin; |
| 237 | /*< ELSE IF( LSAME( CMACH, 'U' ) ) THEN >*/ |
| 238 | } else if (lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(cmach, "U", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1)) { |
| 239 | /*< RMACH = RMIN >*/ |
| 240 | rmach = rmin; |
| 241 | /*< ELSE IF( LSAME( CMACH, 'L' ) ) THEN >*/ |
| 242 | } else if (lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(cmach, "L", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1)) { |
| 243 | /*< RMACH = EMAX >*/ |
| 244 | rmach = emax; |
| 245 | /*< ELSE IF( LSAME( CMACH, 'O' ) ) THEN >*/ |
| 246 | } else if (lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(cmach, "O", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1)) { |
| 247 | /*< RMACH = RMAX >*/ |
| 248 | rmach = rmax; |
| 249 | /*< END IF >*/ |
| 250 | } |
| 251 | |
| 252 | /*< SLAMCH = RMACH >*/ |
| 253 | ret_val = rmach; |
| 254 | /*< RETURN >*/ |
| 255 | return ret_val; |
| 256 | |
| 257 | /* End of SLAMCH */ |
| 258 | |
| 259 | /*< END >*/ |
| 260 | } /* slamch_ */ |
| 261 | |
| 262 | |
| 263 | /* *********************************************************************** */ |
| 264 | |
| 265 | /*< SUBROUTINE SLAMC1( BETA, T, RND, IEEE1 ) >*/ |
| 266 | /* Subroutine */ int slamc1_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:248:9`!(integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *beta, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *t, logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! *rnd, logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! |
| 267 | *ieee1) |
| 268 | { |
| 269 | /* Initialized data */ |
| 270 | |
| 271 | static logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! first = TRUE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:29:9`!; /* runtime-initialized constant */ |
| 272 | |
| 273 | /* System generated locals */ |
| 274 | realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! r__1, r__2; |
| 275 | |
| 276 | /* Local variables */ |
| 277 | realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! a, b, c__, f, t1, t2; |
| 278 | static integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! lt; /* runtime-initialized constant */ |
| 279 | realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! one, qtr; |
| 280 | static logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! lrnd; /* runtime-initialized constant */ |
| 281 | static integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! lbeta; /* runtime-initialized constant */ |
| 282 | realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! savec; |
| 283 | static logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! lieee1; /* runtime-initialized constant */ |
| 284 | extern doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! *, realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! *); |
| 285 | |
| 286 | |
| 287 | /* -- LAPACK auxiliary routine (version 1.1) -- */ |
| 288 | /* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., */ |
| 289 | /* Courant Institute, Argonne National Lab, and Rice University */ |
| 290 | /* October 31, 1992 */ |
| 291 | |
| 292 | /* .. Scalar Arguments .. */ |
| 293 | /*< LOGICAL IEEE1, RND >*/ |
| 294 | /*< INTEGER BETA, T >*/ |
| 295 | /* .. */ |
| 296 | |
| 297 | /* Purpose */ |
| 298 | /* ======= */ |
| 299 | |
| 300 | /* SLAMC1 determines the machine parameters given by BETA, T, RND, and */ |
| 301 | /* IEEE1. */ |
| 302 | |
| 303 | /* Arguments */ |
| 304 | /* ========= */ |
| 305 | |
| 306 | /* BETA (output) INTEGER */ |
| 307 | /* The base of the machine. */ |
| 308 | |
| 309 | /* T (output) INTEGER */ |
| 310 | /* The number of ( BETA ) digits in the mantissa. */ |
| 311 | |
| 312 | /* RND (output) LOGICAL */ |
| 313 | /* Specifies whether proper rounding ( RND = .TRUE. ) or */ |
| 314 | /* chopping ( RND = .FALSE. ) occurs in addition. This may not */ |
| 315 | /* be a reliable guide to the way in which the machine performs */ |
| 316 | /* its arithmetic. */ |
| 317 | |
| 318 | /* IEEE1 (output) LOGICAL */ |
| 319 | /* Specifies whether rounding appears to be done in the IEEE */ |
| 320 | /* 'round to nearest' style. */ |
| 321 | |
| 322 | /* Further Details */ |
| 323 | /* =============== */ |
| 324 | |
| 325 | /* The routine is based on the routine ENVRON by Malcolm and */ |
| 326 | /* incorporates suggestions by Gentleman and Marovich. See */ |
| 327 | |
| 328 | /* Malcolm M. A. (1972) Algorithms to reveal properties of */ |
| 329 | /* floating-point arithmetic. Comms. of the ACM, 15, 949-951. */ |
| 330 | |
| 331 | /* Gentleman W. M. and Marovich S. B. (1974) More on algorithms */ |
| 332 | /* that reveal properties of floating point arithmetic units. */ |
| 333 | /* Comms. of the ACM, 17, 276-277. */ |
| 334 | |
| 335 | /* ===================================================================== */ |
| 336 | |
| 337 | /* .. Local Scalars .. */ |
| 338 | /*< LOGICAL FIRST, LIEEE1, LRND >*/ |
| 339 | /*< INTEGER LBETA, LT >*/ |
| 340 | /*< REAL A, B, C, F, ONE, QTR, SAVEC, T1, T2 >*/ |
| 341 | /* .. */ |
| 342 | /* .. External Functions .. */ |
| 343 | /*< REAL SLAMC3 >*/ |
| 344 | /*< EXTERNAL SLAMC3 >*/ |
| 345 | /* .. */ |
| 346 | /* .. Save statement .. */ |
| 347 | /*< SAVE FIRST, LIEEE1, LBETA, LRND, LT >*/ |
| 348 | /* .. */ |
| 349 | /* .. Data statements .. */ |
| 350 | /*< DATA FIRST / .TRUE. / >*/ |
| 351 | /* .. */ |
| 352 | /* .. Executable Statements .. */ |
| 353 | |
| 354 | /*< IF( FIRST ) THEN >*/ |
| 355 | if (first) { |
| 356 | /*< FIRST = .FALSE. >*/ |
| 357 | first = FALSE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:30:9`!; |
| 358 | /*< ONE = 1 >*/ |
| 359 | one = (float)1.; |
| 360 | |
| 361 | /* LBETA, LIEEE1, LT and LRND are the local values of BETA, */ |
| 362 | /* IEEE1, T and RND. */ |
| 363 | |
| 364 | /* Throughout this routine we use the function SLAMC3 to ensure */ |
| 365 | /* that relevant values are stored and not held in registers, or */ |
| 366 | /* are not affected by optimizers. */ |
| 367 | |
| 368 | /* Compute a = 2.0**m with the smallest positive integer m such */ |
| 369 | /* that */ |
| 370 | |
| 371 | /* fl( a + 1.0 ) = a. */ |
| 372 | |
| 373 | /*< A = 1 >*/ |
| 374 | a = (float)1.; |
| 375 | /*< C = 1 >*/ |
| 376 | c__ = (float)1.; |
| 377 | |
| 378 | /* + WHILE( C.EQ.ONE )LOOP */ |
| 379 | /*< 10 CONTINUE >*/ |
| 380 | L10: |
| 381 | /*< IF( C.EQ.ONE ) THEN >*/ |
| 382 | if (c__ == one) { |
| 383 | /*< A = 2*A >*/ |
| 384 | a *= 2; |
| 385 | /*< C = SLAMC3( A, ONE ) >*/ |
| 386 | c__ = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&a, &one); |
| 387 | /*< C = SLAMC3( C, -A ) >*/ |
| 388 | r__1 = -a; |
| 389 | c__ = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&c__, &r__1); |
| 390 | /*< GO TO 10 >*/ |
| 391 | goto L10; |
| 392 | /*< END IF >*/ |
| 393 | } |
| 394 | /* + END WHILE */ |
| 395 | |
| 396 | /* Now compute b = 2.0**m with the smallest positive integer m */ |
| 397 | /* such that */ |
| 398 | |
| 399 | /* fl( a + b ) .gt. a. */ |
| 400 | |
| 401 | /*< B = 1 >*/ |
| 402 | b = (float)1.; |
| 403 | /*< C = SLAMC3( A, B ) >*/ |
| 404 | c__ = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&a, &b); |
| 405 | |
| 406 | /* + WHILE( C.EQ.A )LOOP */ |
| 407 | /*< 20 CONTINUE >*/ |
| 408 | L20: |
| 409 | /*< IF( C.EQ.A ) THEN >*/ |
| 410 | if (c__ == a) { |
| 411 | /*< B = 2*B >*/ |
| 412 | b *= 2; |
| 413 | /*< C = SLAMC3( A, B ) >*/ |
| 414 | c__ = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&a, &b); |
| 415 | /*< GO TO 20 >*/ |
| 416 | goto L20; |
| 417 | /*< END IF >*/ |
| 418 | } |
| 419 | /* + END WHILE */ |
| 420 | |
| 421 | /* Now compute the base. a and c are neighbouring floating point */ |
| 422 | /* numbers in the interval ( beta**t, beta**( t + 1 ) ) and so */ |
| 423 | /* their difference is beta. Adding 0.25 to c is to ensure that it */ |
| 424 | /* is truncated to beta and not ( beta - 1 ). */ |
| 425 | |
| 426 | /*< QTR = ONE / 4 >*/ |
| 427 | qtr = one / 4; |
| 428 | /*< SAVEC = C >*/ |
| 429 | savec = c__; |
| 430 | /*< C = SLAMC3( C, -A ) >*/ |
| 431 | r__1 = -a; |
| 432 | c__ = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&c__, &r__1); |
| 433 | /*< LBETA = C + QTR >*/ |
| 434 | lbeta = c__ + qtr; |
| 435 | |
| 436 | /* Now determine whether rounding or chopping occurs, by adding a */ |
| 437 | /* bit less than beta/2 and a bit more than beta/2 to a. */ |
| 438 | |
| 439 | /*< B = LBETA >*/ |
| 440 | b = (realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`!) lbeta; |
| 441 | /*< F = SLAMC3( B / 2, -B / 100 ) >*/ |
| 442 | r__1 = b / 2; |
| 443 | r__2 = -b / 100; |
| 444 | f = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&r__1, &r__2); |
| 445 | /*< C = SLAMC3( F, A ) >*/ |
| 446 | c__ = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&f, &a); |
| 447 | /*< IF( C.EQ.A ) THEN >*/ |
| 448 | if (c__ == a) { |
| 449 | /*< LRND = .TRUE. >*/ |
| 450 | lrnd = TRUE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:29:9`!; |
| 451 | /*< ELSE >*/ |
| 452 | } else { |
| 453 | /*< LRND = .FALSE. >*/ |
| 454 | lrnd = FALSE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:30:9`!; |
| 455 | /*< END IF >*/ |
| 456 | } |
| 457 | /*< F = SLAMC3( B / 2, B / 100 ) >*/ |
| 458 | r__1 = b / 2; |
| 459 | r__2 = b / 100; |
| 460 | f = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&r__1, &r__2); |
| 461 | /*< C = SLAMC3( F, A ) >*/ |
| 462 | c__ = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&f, &a); |
| 463 | /*< >*/ |
| 464 | if (lrnd && c__ == a) { |
| 465 | lrnd = FALSE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:30:9`!; |
| 466 | } |
| 467 | |
| 468 | /* Try and decide whether rounding is done in the IEEE 'round to */ |
| 469 | /* nearest' style. B/2 is half a unit in the last place of the two */ |
| 470 | /* numbers A and SAVEC. Furthermore, A is even, i.e. has last bit */ |
| 471 | /* zero, and SAVEC is odd. Thus adding B/2 to A should not change */ |
| 472 | /* A, but adding B/2 to SAVEC should change SAVEC. */ |
| 473 | |
| 474 | /*< T1 = SLAMC3( B / 2, A ) >*/ |
| 475 | r__1 = b / 2; |
| 476 | t1 = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&r__1, &a); |
| 477 | /*< T2 = SLAMC3( B / 2, SAVEC ) >*/ |
| 478 | r__1 = b / 2; |
| 479 | t2 = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&r__1, &savec); |
| 480 | /*< LIEEE1 = ( T1.EQ.A ) .AND. ( T2.GT.SAVEC ) .AND. LRND >*/ |
| 481 | lieee1 = t1 == a && t2 > savec && lrnd; |
| 482 | |
| 483 | /* Now find the mantissa, t. It should be the integer part of */ |
| 484 | /* log to the base beta of a, however it is safer to determine t */ |
| 485 | /* by powering. So we find t as the smallest positive integer for */ |
| 486 | /* which */ |
| 487 | |
| 488 | /* fl( beta**t + 1.0 ) = 1.0. */ |
| 489 | |
| 490 | /*< LT = 0 >*/ |
| 491 | lt = 0; |
| 492 | /*< A = 1 >*/ |
| 493 | a = (float)1.; |
| 494 | /*< C = 1 >*/ |
| 495 | c__ = (float)1.; |
| 496 | |
| 497 | /* + WHILE( C.EQ.ONE )LOOP */ |
| 498 | /*< 30 CONTINUE >*/ |
| 499 | L30: |
| 500 | /*< IF( C.EQ.ONE ) THEN >*/ |
| 501 | if (c__ == one) { |
| 502 | /*< LT = LT + 1 >*/ |
| 503 | ++lt; |
| 504 | /*< A = A*LBETA >*/ |
| 505 | a *= lbeta; |
| 506 | /*< C = SLAMC3( A, ONE ) >*/ |
| 507 | c__ = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&a, &one); |
| 508 | /*< C = SLAMC3( C, -A ) >*/ |
| 509 | r__1 = -a; |
| 510 | c__ = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&c__, &r__1); |
| 511 | /*< GO TO 30 >*/ |
| 512 | goto L30; |
| 513 | /*< END IF >*/ |
| 514 | } |
| 515 | /* + END WHILE */ |
| 516 | |
| 517 | /*< END IF >*/ |
| 518 | } |
| 519 | |
| 520 | /*< BETA = LBETA >*/ |
| 521 | *beta = lbeta; |
| 522 | /*< T = LT >*/ |
| 523 | *t = lt; |
| 524 | /*< RND = LRND >*/ |
| 525 | *rnd = lrnd; |
| 526 | /*< IEEE1 = LIEEE1 >*/ |
| 527 | *ieee1 = lieee1; |
| 528 | /*< RETURN >*/ |
| 529 | return 0; |
| 530 | |
| 531 | /* End of SLAMC1 */ |
| 532 | |
| 533 | /*< END >*/ |
| 534 | } /* slamc1_ */ |
| 535 | |
| 536 | |
| 537 | /* *********************************************************************** */ |
| 538 | |
| 539 | /*< SUBROUTINE SLAMC2( BETA, T, RND, EPS, EMIN, RMIN, EMAX, RMAX ) >*/ |
| 540 | /* Subroutine */ int slamc2_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:249:9`!(integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *beta, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *t, logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! *rnd, realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! * |
| 541 | eps, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *emin, realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! *rmin, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *emax, realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! *rmax) |
| 542 | { |
| 543 | /* Initialized data */ |
| 544 | |
| 545 | static logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! first = TRUE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:29:9`!; /* runtime-initialized constant */ |
| 546 | static logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! iwarn = FALSE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:30:9`!; /* runtime-initialized constant */ |
| 547 | |
| 548 | /* System generated locals */ |
| 549 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! i__1; |
| 550 | realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! r__1, r__2, r__3, r__4, r__5; |
| 551 | |
| 552 | /* Builtin functions */ |
| 553 | double pow_ricxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:20:9`!(realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *); |
| 554 | |
| 555 | /* Local variables */ |
| 556 | realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! a, b, c__; |
| 557 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! i__; |
| 558 | static integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! lt; /* runtime-initialized constant */ |
| 559 | realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! one, two; |
| 560 | logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! ieee; |
| 561 | realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! half; |
| 562 | logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! lrnd = 0; //variable 'lrnd' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] |
| 563 | static realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! leps; /* runtime-initialized constant */ |
| 564 | realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! zero; |
| 565 | static integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! lbeta; /* runtime-initialized constant */ |
| 566 | realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! rbase; |
| 567 | static integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! lemin, lemax; /* runtime-initialized constant */ |
| 568 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! gnmin; |
| 569 | realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! small; |
| 570 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! gpmin; |
| 571 | realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! third; |
| 572 | static realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! lrmin, lrmax; /* runtime-initialized constant */ |
| 573 | realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! sixth; |
| 574 | logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! lieee1; |
| 575 | extern /* Subroutine */ int slamc1_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:248:9`!(integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! *, |
| 576 | logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! *); |
| 577 | extern doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! *, realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! *); |
| 578 | extern /* Subroutine */ int slamc4_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:251:9`!(integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *), |
| 579 | slamc5_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:252:9`!(integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, |
| 580 | realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! *); |
| 581 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! ngnmin, ngpmin; |
| 582 | |
| 583 | /* -- LAPACK auxiliary routine (version 1.1) -- */ |
| 584 | /* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., */ |
| 585 | /* Courant Institute, Argonne National Lab, and Rice University */ |
| 586 | /* October 31, 1992 */ |
| 587 | |
| 588 | /* .. Scalar Arguments .. */ |
| 589 | /*< LOGICAL RND >*/ |
| 590 | /*< INTEGER BETA, EMAX, EMIN, T >*/ |
| 591 | /*< REAL EPS, RMAX, RMIN >*/ |
| 592 | /* .. */ |
| 593 | |
| 594 | /* Purpose */ |
| 595 | /* ======= */ |
| 596 | |
| 597 | /* SLAMC2 determines the machine parameters specified in its argument */ |
| 598 | /* list. */ |
| 599 | |
| 600 | /* Arguments */ |
| 601 | /* ========= */ |
| 602 | |
| 603 | /* BETA (output) INTEGER */ |
| 604 | /* The base of the machine. */ |
| 605 | |
| 606 | /* T (output) INTEGER */ |
| 607 | /* The number of ( BETA ) digits in the mantissa. */ |
| 608 | |
| 609 | /* RND (output) LOGICAL */ |
| 610 | /* Specifies whether proper rounding ( RND = .TRUE. ) or */ |
| 611 | /* chopping ( RND = .FALSE. ) occurs in addition. This may not */ |
| 612 | /* be a reliable guide to the way in which the machine performs */ |
| 613 | /* its arithmetic. */ |
| 614 | |
| 615 | /* EPS (output) REAL */ |
| 616 | /* The smallest positive number such that */ |
| 617 | |
| 618 | /* fl( 1.0 - EPS ) .LT. 1.0, */ |
| 619 | |
| 620 | /* where fl denotes the computed value. */ |
| 621 | |
| 622 | /* EMIN (output) INTEGER */ |
| 623 | /* The minimum exponent before (gradual) underflow occurs. */ |
| 624 | |
| 625 | /* RMIN (output) REAL */ |
| 626 | /* The smallest normalized number for the machine, given by */ |
| 627 | /* BASE**( EMIN - 1 ), where BASE is the floating point value */ |
| 628 | /* of BETA. */ |
| 629 | |
| 630 | /* EMAX (output) INTEGER */ |
| 631 | /* The maximum exponent before overflow occurs. */ |
| 632 | |
| 633 | /* RMAX (output) REAL */ |
| 634 | /* The largest positive number for the machine, given by */ |
| 635 | /* BASE**EMAX * ( 1 - EPS ), where BASE is the floating point */ |
| 636 | /* value of BETA. */ |
| 637 | |
| 638 | /* Further Details */ |
| 639 | /* =============== */ |
| 640 | |
| 641 | /* The computation of EPS is based on a routine PARANOIA by */ |
| 642 | /* W. Kahan of the University of California at Berkeley. */ |
| 643 | |
| 644 | /* ===================================================================== */ |
| 645 | |
| 646 | /* .. Local Scalars .. */ |
| 647 | /*< LOGICAL FIRST, IEEE, IWARN, LIEEE1, LRND >*/ |
| 648 | /*< >*/ |
| 649 | /*< >*/ |
| 650 | /* .. */ |
| 651 | /* .. External Functions .. */ |
| 652 | /*< REAL SLAMC3 >*/ |
| 653 | /*< EXTERNAL SLAMC3 >*/ |
| 654 | /* .. */ |
| 655 | /* .. External Subroutines .. */ |
| 656 | /*< EXTERNAL SLAMC1, SLAMC4, SLAMC5 >*/ |
| 657 | /* .. */ |
| 658 | /* .. Intrinsic Functions .. */ |
| 659 | /*< INTRINSIC ABS, MAX, MIN >*/ |
| 660 | /* .. */ |
| 661 | /* .. Save statement .. */ |
| 662 | /*< >*/ |
| 663 | /* .. */ |
| 664 | /* .. Data statements .. */ |
| 665 | /*< DATA FIRST / .TRUE. / , IWARN / .FALSE. / >*/ |
| 666 | /* .. */ |
| 667 | /* .. Executable Statements .. */ |
| 668 | |
| 669 | /*< IF( FIRST ) THEN >*/ |
| 670 | if (first) { |
| 671 | /*< FIRST = .FALSE. >*/ |
| 672 | first = FALSE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:30:9`!; |
| 673 | /*< ZERO = 0 >*/ |
| 674 | zero = (float)0.; |
| 675 | /*< ONE = 1 >*/ |
| 676 | one = (float)1.; |
| 677 | /*< TWO = 2 >*/ |
| 678 | two = (float)2.; |
| 679 | |
| 680 | /* LBETA, LT, LRND, LEPS, LEMIN and LRMIN are the local values of */ |
| 681 | /* BETA, T, RND, EPS, EMIN and RMIN. */ |
| 682 | |
| 683 | /* Throughout this routine we use the function SLAMC3 to ensure */ |
| 684 | /* that relevant values are stored and not held in registers, or */ |
| 685 | /* are not affected by optimizers. */ |
| 686 | |
| 687 | /* SLAMC1 returns the parameters LBETA, LT, LRND and LIEEE1. */ |
| 688 | |
| 689 | /*< CALL SLAMC1( LBETA, LT, LRND, LIEEE1 ) >*/ |
| 690 | slamc1_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:248:9`!(&lbeta, <, &lrnd, &lieee1); |
| 691 | |
| 692 | /* Start to find EPS. */ |
| 693 | |
| 694 | /*< B = LBETA >*/ |
| 695 | b = (realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`!) lbeta; |
| 696 | /*< A = B**( -LT ) >*/ |
| 697 | i__1 = -lt; |
| 698 | a = pow_ricxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:20:9`!(&b, &i__1); |
| 699 | /*< LEPS = A >*/ |
| 700 | leps = a; |
| 701 | |
| 702 | /* Try some tricks to see whether or not this is the correct EPS. */ |
| 703 | |
| 704 | /*< B = TWO / 3 >*/ |
| 705 | b = two / 3; |
| 706 | /*< HALF = ONE / 2 >*/ |
| 707 | half = one / 2; |
| 708 | /*< SIXTH = SLAMC3( B, -HALF ) >*/ |
| 709 | r__1 = -half; |
| 710 | sixth = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&b, &r__1); |
| 711 | /*< THIRD = SLAMC3( SIXTH, SIXTH ) >*/ |
| 712 | third = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&sixth, &sixth); |
| 713 | /*< B = SLAMC3( THIRD, -HALF ) >*/ |
| 714 | r__1 = -half; |
| 715 | b = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&third, &r__1); |
| 716 | /*< B = SLAMC3( B, SIXTH ) >*/ |
| 717 | b = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&b, &sixth); |
| 718 | /*< B = ABS( B ) >*/ |
| 719 | b = dabscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:158:9`!(b); |
| 720 | /*< >*/ |
| 721 | if (b < leps) { |
| 722 | b = leps; |
| 723 | } |
| 724 | |
| 725 | /*< LEPS = 1 >*/ |
| 726 | leps = (float)1.; |
| 727 | |
| 728 | /* + WHILE( ( LEPS.GT.B ).AND.( B.GT.ZERO ) )LOOP */ |
| 729 | /*< 10 CONTINUE >*/ |
| 730 | L10: |
| 731 | /*< IF( ( LEPS.GT.B ) .AND. ( B.GT.ZERO ) ) THEN >*/ |
| 732 | if (leps > b && b > zero) { |
| 733 | /*< LEPS = B >*/ |
| 734 | leps = b; |
| 735 | /*< C = SLAMC3( HALF*LEPS, ( TWO**5 )*( LEPS**2 ) ) >*/ |
| 736 | r__1 = half * leps; |
| 737 | /* Computing 5th power */ |
| 738 | r__3 = two, r__4 = r__3, r__3 *= r__3; |
| 739 | /* Computing 2nd power */ |
| 740 | r__5 = leps; |
| 741 | r__2 = r__4 * (r__3 * r__3) * (r__5 * r__5); |
| 742 | c__ = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&r__1, &r__2); |
| 743 | /*< C = SLAMC3( HALF, -C ) >*/ |
| 744 | r__1 = -c__; |
| 745 | c__ = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&half, &r__1); |
| 746 | /*< B = SLAMC3( HALF, C ) >*/ |
| 747 | b = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&half, &c__); |
| 748 | /*< C = SLAMC3( HALF, -B ) >*/ |
| 749 | r__1 = -b; |
| 750 | c__ = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&half, &r__1); |
| 751 | /*< B = SLAMC3( HALF, C ) >*/ |
| 752 | b = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&half, &c__); |
| 753 | /*< GO TO 10 >*/ |
| 754 | goto L10; |
| 755 | /*< END IF >*/ |
| 756 | } |
| 757 | /* + END WHILE */ |
| 758 | |
| 759 | /*< >*/ |
| 760 | if (a < leps) { |
| 761 | leps = a; |
| 762 | } |
| 763 | |
| 764 | /* Computation of EPS complete. */ |
| 765 | |
| 766 | /* Now find EMIN. Let A = + or - 1, and + or - (1 + BASE**(-3)). */ |
| 767 | /* Keep dividing A by BETA until (gradual) underflow occurs. This */ |
| 768 | /* is detected when we cannot recover the previous A. */ |
| 769 | |
| 770 | /*< RBASE = ONE / LBETA >*/ |
| 771 | rbase = one / lbeta; |
| 772 | /*< SMALL = ONE >*/ |
| 773 | small = one; |
| 774 | /*< DO 20 I = 1, 3 >*/ |
| 775 | for (i__ = 1; i__ <= 3; ++i__) { |
| 776 | /*< SMALL = SLAMC3( SMALL*RBASE, ZERO ) >*/ |
| 777 | r__1 = small * rbase; |
| 778 | small = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&r__1, &zero); |
| 779 | /*< 20 CONTINUE >*/ |
| 780 | /* L20: */ |
| 781 | } |
| 782 | /*< A = SLAMC3( ONE, SMALL ) >*/ |
| 783 | a = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&one, &small); |
| 784 | /*< CALL SLAMC4( NGPMIN, ONE, LBETA ) >*/ |
| 785 | slamc4_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:251:9`!(&ngpmin, &one, &lbeta); |
| 786 | /*< CALL SLAMC4( NGNMIN, -ONE, LBETA ) >*/ |
| 787 | r__1 = -one; |
| 788 | slamc4_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:251:9`!(&ngnmin, &r__1, &lbeta); |
| 789 | /*< CALL SLAMC4( GPMIN, A, LBETA ) >*/ |
| 790 | slamc4_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:251:9`!(&gpmin, &a, &lbeta); |
| 791 | /*< CALL SLAMC4( GNMIN, -A, LBETA ) >*/ |
| 792 | r__1 = -a; |
| 793 | slamc4_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:251:9`!(&gnmin, &r__1, &lbeta); |
| 794 | /*< IEEE = .FALSE. >*/ |
| 795 | ieee = FALSE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:30:9`!; |
| 796 | |
| 797 | /*< IF( ( NGPMIN.EQ.NGNMIN ) .AND. ( GPMIN.EQ.GNMIN ) ) THEN >*/ |
| 798 | if (ngpmin == ngnmin && gpmin == gnmin) { |
| 799 | /*< IF( NGPMIN.EQ.GPMIN ) THEN >*/ |
| 800 | if (ngpmin == gpmin) { |
| 801 | /*< LEMIN = NGPMIN >*/ |
| 802 | lemin = ngpmin; |
| 803 | /* ( Non twos-complement machines, no gradual underflow; */ |
| 804 | /* e.g., VAX ) */ |
| 805 | /*< ELSE IF( ( GPMIN-NGPMIN ).EQ.3 ) THEN >*/ |
| 806 | } else if (gpmin - ngpmin == 3) { |
| 807 | /*< LEMIN = NGPMIN - 1 + LT >*/ |
| 808 | lemin = ngpmin - 1 + lt; |
| 809 | /*< IEEE = .TRUE. >*/ |
| 810 | ieee = TRUE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:29:9`!; |
| 811 | /* ( Non twos-complement machines, with gradual underflow; */ |
| 812 | /* e.g., IEEE standard followers ) */ |
| 813 | /*< ELSE >*/ |
| 814 | } else { |
| 815 | /*< LEMIN = MIN( NGPMIN, GPMIN ) >*/ |
| 816 | lemin = mincxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:159:9`!(ngpmin,gpmin); |
| 817 | /* ( A guess; no known machine ) */ |
| 818 | /*< IWARN = .TRUE. >*/ |
| 819 | iwarn = TRUE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:29:9`!; |
| 820 | /*< END IF >*/ |
| 821 | } |
| 822 | |
| 823 | /*< ELSE IF( ( NGPMIN.EQ.GPMIN ) .AND. ( NGNMIN.EQ.GNMIN ) ) THEN >*/ |
| 824 | } else if (ngpmin == gpmin && ngnmin == gnmin) { |
| 825 | /*< IF( ABS( NGPMIN-NGNMIN ).EQ.1 ) THEN >*/ |
| 826 | if ((i__1 = ngpmin - ngnmin, abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(i__1)) == 1) { |
| 827 | /*< LEMIN = MAX( NGPMIN, NGNMIN ) >*/ |
| 828 | lemin = maxcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:160:9`!(ngpmin,ngnmin); |
| 829 | /* ( Twos-complement machines, no gradual underflow; */ |
| 830 | /* e.g., CYBER 205 ) */ |
| 831 | /*< ELSE >*/ |
| 832 | } else { |
| 833 | /*< LEMIN = MIN( NGPMIN, NGNMIN ) >*/ |
| 834 | lemin = mincxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:159:9`!(ngpmin,ngnmin); |
| 835 | /* ( A guess; no known machine ) */ |
| 836 | /*< IWARN = .TRUE. >*/ |
| 837 | iwarn = TRUE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:29:9`!; |
| 838 | /*< END IF >*/ |
| 839 | } |
| 840 | |
| 841 | /*< >*/ |
| 842 | } else if ((i__1 = ngpmin - ngnmin, abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(i__1)) == 1 && gpmin == gnmin) |
| 843 | { |
| 844 | /*< IF( ( GPMIN-MIN( NGPMIN, NGNMIN ) ).EQ.3 ) THEN >*/ |
| 845 | if (gpmin - mincxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:159:9`!(ngpmin,ngnmin) == 3) { |
| 846 | /*< LEMIN = MAX( NGPMIN, NGNMIN ) - 1 + LT >*/ |
| 847 | lemin = maxcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:160:9`!(ngpmin,ngnmin) - 1 + lt; |
| 848 | /* ( Twos-complement machines with gradual underflow; */ |
| 849 | /* no known machine ) */ |
| 850 | /*< ELSE >*/ |
| 851 | } else { |
| 852 | /*< LEMIN = MIN( NGPMIN, NGNMIN ) >*/ |
| 853 | lemin = mincxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:159:9`!(ngpmin,ngnmin); |
| 854 | /* ( A guess; no known machine ) */ |
| 855 | /*< IWARN = .TRUE. >*/ |
| 856 | iwarn = TRUE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:29:9`!; |
| 857 | /*< END IF >*/ |
| 858 | } |
| 859 | |
| 860 | /*< ELSE >*/ |
| 861 | } else { |
| 862 | /*< LEMIN = MIN( NGPMIN, NGNMIN, GPMIN, GNMIN ) >*/ |
| 863 | /* Computing MIN */ |
| 864 | i__1 = mincxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:159:9`!(ngpmin,ngnmin), i__1 = mincxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:159:9`!(i__1,gpmin); |
| 865 | lemin = mincxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:159:9`!(i__1,gnmin); |
| 866 | /* ( A guess; no known machine ) */ |
| 867 | /*< IWARN = .TRUE. >*/ |
| 868 | iwarn = TRUE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:29:9`!; |
| 869 | /*< END IF >*/ |
| 870 | } |
| 871 | /* ** */ |
| 872 | /* Comment out this if block if EMIN is ok */ |
| 873 | /*< IF( IWARN ) THEN >*/ |
| 874 | if (iwarn) { |
| 875 | /*< FIRST = .TRUE. >*/ |
| 876 | first = TRUE_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:29:9`!; |
| 877 | /*< WRITE( 6, FMT = 9999 )LEMIN >*/ |
| 878 | printfcxx . . $ printf(581fddd72a8db8fc).("\n\n WARNING. The value EMIN may be incorrect: - "); |
| 879 | printfcxx . . $ printf(581fddd72a8db8fc).("EMIN = %8li\n",lemin); |
| 880 | printfcxx . . $ printf(581fddd72a8db8fc).("If, after inspection, the value EMIN looks acceptable"); |
| 881 | printfcxx . . $ printf(581fddd72a8db8fc).(" please comment out\n the IF block as marked within the"); |
| 882 | printfcxx . . $ printf(581fddd72a8db8fc).(" code of routine SLAMC2,\n otherwise supply EMIN"); |
| 883 | printfcxx . . $ printf(581fddd72a8db8fc).(" explicitly.\n"); |
| 884 | /*< END IF >*/ |
| 885 | } |
| 886 | /* ** */ |
| 887 | |
| 888 | /* Assume IEEE arithmetic if we found denormalised numbers above, */ |
| 889 | /* or if arithmetic seems to round in the IEEE style, determined */ |
| 890 | /* in routine SLAMC1. A true IEEE machine should have both things */ |
| 891 | /* true; however, faulty machines may have one or the other. */ |
| 892 | |
| 893 | /*< IEEE = IEEE .OR. LIEEE1 >*/ |
| 894 | ieee = ieee || lieee1; |
| 895 | |
| 896 | /* Compute RMIN by successive division by BETA. We could compute */ |
| 897 | /* RMIN as BASE**( EMIN - 1 ), but some machines underflow during */ |
| 898 | /* this computation. */ |
| 899 | |
| 900 | /*< LRMIN = 1 >*/ |
| 901 | lrmin = (float)1.; |
| 902 | /*< DO 30 I = 1, 1 - LEMIN >*/ |
| 903 | i__1 = 1 - lemin; |
| 904 | for (i__ = 1; i__ <= i__1; ++i__) { |
| 905 | /*< LRMIN = SLAMC3( LRMIN*RBASE, ZERO ) >*/ |
| 906 | r__1 = lrmin * rbase; |
| 907 | lrmin = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&r__1, &zero); |
| 908 | /*< 30 CONTINUE >*/ |
| 909 | /* L30: */ |
| 910 | } |
| 911 | |
| 912 | /* Finally, call SLAMC5 to compute EMAX and RMAX. */ |
| 913 | |
| 914 | /*< CALL SLAMC5( LBETA, LT, LEMIN, IEEE, LEMAX, LRMAX ) >*/ |
| 915 | slamc5_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:252:9`!(&lbeta, <, &lemin, &ieee, &lemax, &lrmax); |
| 916 | /*< END IF >*/ |
| 917 | } |
| 918 | |
| 919 | /*< BETA = LBETA >*/ |
| 920 | *beta = lbeta; |
| 921 | /*< T = LT >*/ |
| 922 | *t = lt; |
| 923 | /*< RND = LRND >*/ |
| 924 | *rnd = lrnd; |
| 925 | /*< EPS = LEPS >*/ |
| 926 | *eps = leps; |
| 927 | /*< EMIN = LEMIN >*/ |
| 928 | *emin = lemin; |
| 929 | /*< RMIN = LRMIN >*/ |
| 930 | *rmin = lrmin; |
| 931 | /*< EMAX = LEMAX >*/ |
| 932 | *emax = lemax; |
| 933 | /*< RMAX = LRMAX >*/ |
| 934 | *rmax = lrmax; |
| 935 | |
| 936 | /*< RETURN >*/ |
| 937 | return 0; |
| 938 | |
| 939 | /*< 9 >*/ |
| 940 | |
| 941 | /* End of SLAMC2 */ |
| 942 | |
| 943 | /*< END >*/ |
| 944 | } /* slamc2_ */ |
| 945 | |
| 946 | |
| 947 | /* *********************************************************************** */ |
| 948 | |
| 949 | /*< REAL FUNCTION SLAMC3( A, B ) >*/ |
| 950 | doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! *a, realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! *b) |
| 951 | { |
| 952 | /* System generated locals */ |
| 953 | realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! ret_val; |
| 954 | |
| 955 | |
| 956 | /* -- LAPACK auxiliary routine (version 1.1) -- */ |
| 957 | /* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., */ |
| 958 | /* Courant Institute, Argonne National Lab, and Rice University */ |
| 959 | /* October 31, 1992 */ |
| 960 | |
| 961 | /* .. Scalar Arguments .. */ |
| 962 | /*< REAL A, B >*/ |
| 963 | /* .. */ |
| 964 | |
| 965 | /* Purpose */ |
| 966 | /* ======= */ |
| 967 | |
| 968 | /* SLAMC3 is intended to force A and B to be stored prior to doing */ |
| 969 | /* the addition of A and B , for use in situations where optimizers */ |
| 970 | /* might hold one of these in a register. */ |
| 971 | |
| 972 | /* Arguments */ |
| 973 | /* ========= */ |
| 974 | |
| 975 | /* A, B (input) REAL */ |
| 976 | /* The values A and B. */ |
| 977 | |
| 978 | /* ===================================================================== */ |
| 979 | |
| 980 | /* .. Executable Statements .. */ |
| 981 | |
| 982 | /*< SLAMC3 = A + B >*/ |
| 983 | ret_val = *a + *b; |
| 984 | |
| 985 | /*< RETURN >*/ |
| 986 | return ret_val; |
| 987 | |
| 988 | /* End of SLAMC3 */ |
| 989 | |
| 990 | /*< END >*/ |
| 991 | } /* slamc3_ */ |
| 992 | |
| 993 | |
| 994 | /* *********************************************************************** */ |
| 995 | |
| 996 | /*< SUBROUTINE SLAMC4( EMIN, START, BASE ) >*/ |
| 997 | /* Subroutine */ int slamc4_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:251:9`!(integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *emin, realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! *start, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *base) |
| 998 | { |
| 999 | /* System generated locals */ |
| 1000 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! i__1; |
| 1001 | realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! r__1; |
| 1002 | |
| 1003 | /* Local variables */ |
| 1004 | realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! a; |
| 1005 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! i__; |
| 1006 | realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! b1, b2, c1, c2, d1, d2, one, zero, rbase; |
| 1007 | extern doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! *, realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! *); |
| 1008 | |
| 1009 | |
| 1010 | /* -- LAPACK auxiliary routine (version 1.1) -- */ |
| 1011 | /* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., */ |
| 1012 | /* Courant Institute, Argonne National Lab, and Rice University */ |
| 1013 | /* October 31, 1992 */ |
| 1014 | |
| 1015 | /* .. Scalar Arguments .. */ |
| 1016 | /*< INTEGER BASE, EMIN >*/ |
| 1017 | /*< REAL START >*/ |
| 1018 | /* .. */ |
| 1019 | |
| 1020 | /* Purpose */ |
| 1021 | /* ======= */ |
| 1022 | |
| 1023 | /* SLAMC4 is a service routine for SLAMC2. */ |
| 1024 | |
| 1025 | /* Arguments */ |
| 1026 | /* ========= */ |
| 1027 | |
| 1028 | /* EMIN (output) EMIN */ |
| 1029 | /* The minimum exponent before (gradual) underflow, computed by */ |
| 1030 | /* setting A = START and dividing by BASE until the previous A */ |
| 1031 | /* can not be recovered. */ |
| 1032 | |
| 1033 | /* START (input) REAL */ |
| 1034 | /* The starting point for determining EMIN. */ |
| 1035 | |
| 1036 | /* BASE (input) INTEGER */ |
| 1037 | /* The base of the machine. */ |
| 1038 | |
| 1039 | /* ===================================================================== */ |
| 1040 | |
| 1041 | /* .. Local Scalars .. */ |
| 1042 | /*< INTEGER I >*/ |
| 1043 | /*< REAL A, B1, B2, C1, C2, D1, D2, ONE, RBASE, ZERO >*/ |
| 1044 | /* .. */ |
| 1045 | /* .. External Functions .. */ |
| 1046 | /*< REAL SLAMC3 >*/ |
| 1047 | /*< EXTERNAL SLAMC3 >*/ |
| 1048 | /* .. */ |
| 1049 | /* .. Executable Statements .. */ |
| 1050 | |
| 1051 | /*< A = START >*/ |
| 1052 | a = *start; |
| 1053 | /*< ONE = 1 >*/ |
| 1054 | one = (float)1.; |
| 1055 | /*< RBASE = ONE / BASE >*/ |
| 1056 | rbase = one / *base; |
| 1057 | /*< ZERO = 0 >*/ |
| 1058 | zero = (float)0.; |
| 1059 | /*< EMIN = 1 >*/ |
| 1060 | *emin = 1; |
| 1061 | /*< B1 = SLAMC3( A*RBASE, ZERO ) >*/ |
| 1062 | r__1 = a * rbase; |
| 1063 | b1 = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&r__1, &zero); |
| 1064 | /*< C1 = A >*/ |
| 1065 | c1 = a; |
| 1066 | /*< C2 = A >*/ |
| 1067 | c2 = a; |
| 1068 | /*< D1 = A >*/ |
| 1069 | d1 = a; |
| 1070 | /*< D2 = A >*/ |
| 1071 | d2 = a; |
| 1072 | /* + WHILE( ( C1.EQ.A ).AND.( C2.EQ.A ).AND. */ |
| 1073 | /* $ ( D1.EQ.A ).AND.( D2.EQ.A ) )LOOP */ |
| 1074 | /*< 10 CONTINUE >*/ |
| 1075 | L10: |
| 1076 | /*< >*/ |
| 1077 | if (c1 == a && c2 == a && d1 == a && d2 == a) { |
| 1078 | /*< EMIN = EMIN - 1 >*/ |
| 1079 | --(*emin); |
| 1080 | /*< A = B1 >*/ |
| 1081 | a = b1; |
| 1082 | /*< B1 = SLAMC3( A / BASE, ZERO ) >*/ |
| 1083 | r__1 = a / *base; |
| 1084 | b1 = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&r__1, &zero); |
| 1085 | /*< C1 = SLAMC3( B1*BASE, ZERO ) >*/ |
| 1086 | r__1 = b1 * *base; |
| 1087 | c1 = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&r__1, &zero); |
| 1088 | /*< D1 = ZERO >*/ |
| 1089 | d1 = zero; |
| 1090 | /*< DO 20 I = 1, BASE >*/ |
| 1091 | i__1 = *base; |
| 1092 | for (i__ = 1; i__ <= i__1; ++i__) { |
| 1093 | /*< D1 = D1 + B1 >*/ |
| 1094 | d1 += b1; |
| 1095 | /*< 20 CONTINUE >*/ |
| 1096 | /* L20: */ |
| 1097 | } |
| 1098 | /*< B2 = SLAMC3( A*RBASE, ZERO ) >*/ |
| 1099 | r__1 = a * rbase; |
| 1100 | b2 = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&r__1, &zero); |
| 1101 | /*< C2 = SLAMC3( B2 / RBASE, ZERO ) >*/ |
| 1102 | r__1 = b2 / rbase; |
| 1103 | c2 = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&r__1, &zero); |
| 1104 | /*< D2 = ZERO >*/ |
| 1105 | d2 = zero; |
| 1106 | /*< DO 30 I = 1, BASE >*/ |
| 1107 | i__1 = *base; |
| 1108 | for (i__ = 1; i__ <= i__1; ++i__) { |
| 1109 | /*< D2 = D2 + B2 >*/ |
| 1110 | d2 += b2; |
| 1111 | /*< 30 CONTINUE >*/ |
| 1112 | /* L30: */ |
| 1113 | } |
| 1114 | /*< GO TO 10 >*/ |
| 1115 | goto L10; |
| 1116 | /*< END IF >*/ |
| 1117 | } |
| 1118 | /* + END WHILE */ |
| 1119 | |
| 1120 | /*< RETURN >*/ |
| 1121 | return 0; |
| 1122 | |
| 1123 | /* End of SLAMC4 */ |
| 1124 | |
| 1125 | /*< END >*/ |
| 1126 | } /* slamc4_ */ |
| 1127 | |
| 1128 | |
| 1129 | /* *********************************************************************** */ |
| 1130 | |
| 1131 | /*< SUBROUTINE SLAMC5( BETA, P, EMIN, IEEE, EMAX, RMAX ) >*/ |
| 1132 | /* Subroutine */ int slamc5_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:252:9`!(integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *beta, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *p, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *emin, |
| 1133 | logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! *ieee, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *emax, realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! *rmax) |
| 1134 | { |
| 1135 | /* System generated locals */ |
| 1136 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! i__1; |
| 1137 | realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! r__1; |
| 1138 | |
| 1139 | /* Local variables */ |
| 1140 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! i__; |
| 1141 | realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! y, z__; |
| 1142 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! try__, lexp; |
| 1143 | realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! oldy=0; |
| 1144 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! uexp, nbits; |
| 1145 | extern doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! *, realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! *); |
| 1146 | realcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:69:9`! recbas; |
| 1147 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! exbits, expsum; |
| 1148 | |
| 1149 | |
| 1150 | /* -- LAPACK auxiliary routine (version 1.1) -- */ |
| 1151 | /* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., */ |
| 1152 | /* Courant Institute, Argonne National Lab, and Rice University */ |
| 1153 | /* October 31, 1992 */ |
| 1154 | |
| 1155 | /* .. Scalar Arguments .. */ |
| 1156 | /*< LOGICAL IEEE >*/ |
| 1157 | /*< INTEGER BETA, EMAX, EMIN, P >*/ |
| 1158 | /*< REAL RMAX >*/ |
| 1159 | /* .. */ |
| 1160 | |
| 1161 | /* Purpose */ |
| 1162 | /* ======= */ |
| 1163 | |
| 1164 | /* SLAMC5 attempts to compute RMAX, the largest machine floating-point */ |
| 1165 | /* number, without overflow. It assumes that EMAX + abs(EMIN) sum */ |
| 1166 | /* approximately to a power of 2. It will fail on machines where this */ |
| 1167 | /* assumption does not hold, for example, the Cyber 205 (EMIN = -28625, */ |
| 1168 | /* EMAX = 28718). It will also fail if the value supplied for EMIN is */ |
| 1169 | /* too large (i.e. too close to zero), probably with overflow. */ |
| 1170 | |
| 1171 | /* Arguments */ |
| 1172 | /* ========= */ |
| 1173 | |
| 1174 | /* BETA (input) INTEGER */ |
| 1175 | /* The base of floating-point arithmetic. */ |
| 1176 | |
| 1177 | /* P (input) INTEGER */ |
| 1178 | /* The number of base BETA digits in the mantissa of a */ |
| 1179 | /* floating-point value. */ |
| 1180 | |
| 1181 | /* EMIN (input) INTEGER */ |
| 1182 | /* The minimum exponent before (gradual) underflow. */ |
| 1183 | |
| 1184 | /* IEEE (input) LOGICAL */ |
| 1185 | /* A logical flag specifying whether or not the arithmetic */ |
| 1186 | /* system is thought to comply with the IEEE standard. */ |
| 1187 | |
| 1188 | /* EMAX (output) INTEGER */ |
| 1189 | /* The largest exponent before overflow */ |
| 1190 | |
| 1191 | /* RMAX (output) REAL */ |
| 1192 | /* The largest machine floating-point number. */ |
| 1193 | |
| 1194 | /* ===================================================================== */ |
| 1195 | |
| 1196 | /* .. Parameters .. */ |
| 1197 | /*< REAL ZERO, ONE >*/ |
| 1198 | /*< PARAMETER ( ZERO = 0.0E0, ONE = 1.0E0 ) >*/ |
| 1199 | /* .. */ |
| 1200 | /* .. Local Scalars .. */ |
| 1201 | /*< INTEGER EXBITS, EXPSUM, I, LEXP, NBITS, TRY, UEXP >*/ |
| 1202 | /*< REAL OLDY, RECBAS, Y, Z >*/ |
| 1203 | /* .. */ |
| 1204 | /* .. External Functions .. */ |
| 1205 | /*< REAL SLAMC3 >*/ |
| 1206 | /*< EXTERNAL SLAMC3 >*/ |
| 1207 | /* .. */ |
| 1208 | /* .. Intrinsic Functions .. */ |
| 1209 | /*< INTRINSIC MOD >*/ |
| 1210 | /* .. */ |
| 1211 | /* .. Executable Statements .. */ |
| 1212 | |
| 1213 | /* First compute LEXP and UEXP, two powers of 2 that bound */ |
| 1214 | /* abs(EMIN). We then assume that EMAX + abs(EMIN) will sum */ |
| 1215 | /* approximately to the bound that is closest to abs(EMIN). */ |
| 1216 | /* (EMAX is the exponent of the required number RMAX). */ |
| 1217 | |
| 1218 | /*< LEXP = 1 >*/ |
| 1219 | lexp = 1; |
| 1220 | /*< EXBITS = 1 >*/ |
| 1221 | exbits = 1; |
| 1222 | /*< 10 CONTINUE >*/ |
| 1223 | L10: |
| 1224 | /*< TRY = LEXP*2 >*/ |
| 1225 | try__ = lexp << 1; |
| 1226 | /*< IF( TRY.LE.( -EMIN ) ) THEN >*/ |
| 1227 | if (try__ <= -(*emin)) { |
| 1228 | /*< LEXP = TRY >*/ |
| 1229 | lexp = try__; |
| 1230 | /*< EXBITS = EXBITS + 1 >*/ |
| 1231 | ++exbits; |
| 1232 | /*< GO TO 10 >*/ |
| 1233 | goto L10; |
| 1234 | /*< END IF >*/ |
| 1235 | } |
| 1236 | /*< IF( LEXP.EQ.-EMIN ) THEN >*/ |
| 1237 | if (lexp == -(*emin)) { |
| 1238 | /*< UEXP = LEXP >*/ |
| 1239 | uexp = lexp; |
| 1240 | /*< ELSE >*/ |
| 1241 | } else { |
| 1242 | /*< UEXP = TRY >*/ |
| 1243 | uexp = try__; |
| 1244 | /*< EXBITS = EXBITS + 1 >*/ |
| 1245 | ++exbits; |
| 1246 | /*< END IF >*/ |
| 1247 | } |
| 1248 | |
| 1249 | /* Now -LEXP is less than or equal to EMIN, and -UEXP is greater */ |
| 1250 | /* than or equal to EMIN. EXBITS is the number of bits needed to */ |
| 1251 | /* store the exponent. */ |
| 1252 | |
| 1253 | /*< IF( ( UEXP+EMIN ).GT.( -LEXP-EMIN ) ) THEN >*/ |
| 1254 | if (uexp + *emin > -lexp - *emin) { |
| 1255 | /*< EXPSUM = 2*LEXP >*/ |
| 1256 | expsum = lexp << 1; |
| 1257 | /*< ELSE >*/ |
| 1258 | } else { |
| 1259 | /*< EXPSUM = 2*UEXP >*/ |
| 1260 | expsum = uexp << 1; |
| 1261 | /*< END IF >*/ |
| 1262 | } |
| 1263 | |
| 1264 | /* EXPSUM is the exponent range, approximately equal to */ |
| 1265 | /* EMAX - EMIN + 1 . */ |
| 1266 | |
| 1267 | /*< EMAX = EXPSUM + EMIN - 1 >*/ |
| 1268 | *emax = expsum + *emin - 1; |
| 1269 | /*< NBITS = 1 + EXBITS + P >*/ |
| 1270 | nbits = exbits + 1 + *p; |
| 1271 | |
| 1272 | /* NBITS is the total number of bits needed to store a */ |
| 1273 | /* floating-point number. */ |
| 1274 | |
| 1275 | /*< IF( ( MOD( NBITS, 2 ).EQ.1 ) .AND. ( BETA.EQ.2 ) ) THEN >*/ |
| 1276 | if (nbits % 2 == 1 && *beta == 2) { |
| 1277 | |
| 1278 | /* Either there are an odd number of bits used to store a */ |
| 1279 | /* floating-point number, which is unlikely, or some bits are */ |
| 1280 | /* not used in the representation of numbers, which is possible, */ |
| 1281 | /* (e.g. Cray machines) or the mantissa has an implicit bit, */ |
| 1282 | /* (e.g. IEEE machines, Dec Vax machines), which is perhaps the */ |
| 1283 | /* most likely. We have to assume the last alternative. */ |
| 1284 | /* If this is true, then we need to reduce EMAX by one because */ |
| 1285 | /* there must be some way of representing zero in an implicit-bit */ |
| 1286 | /* system. On machines like Cray, we are reducing EMAX by one */ |
| 1287 | /* unnecessarily. */ |
| 1288 | |
| 1289 | /*< EMAX = EMAX - 1 >*/ |
| 1290 | --(*emax); |
| 1291 | /*< END IF >*/ |
| 1292 | } |
| 1293 | |
| 1294 | /*< IF( IEEE ) THEN >*/ |
| 1295 | if (*ieee) { |
| 1296 | |
| 1297 | /* Assume we are on an IEEE machine which reserves one exponent */ |
| 1298 | /* for infinity and NaN. */ |
| 1299 | |
| 1300 | /*< EMAX = EMAX - 1 >*/ |
| 1301 | --(*emax); |
| 1302 | /*< END IF >*/ |
| 1303 | } |
| 1304 | |
| 1305 | /* Now create RMAX, the largest machine number, which should */ |
| 1306 | /* be equal to (1.0 - BETA**(-P)) * BETA**EMAX . */ |
| 1307 | |
| 1308 | /* First compute 1.0 - BETA**(-P), being careful that the */ |
| 1309 | /* result is less than 1.0 . */ |
| 1310 | |
| 1311 | /*< RECBAS = ONE / BETA >*/ |
| 1312 | recbas = (float)1. / *beta; |
| 1313 | /*< Z = BETA - ONE >*/ |
| 1314 | z__ = *beta - (float)1.; |
| 1315 | /*< Y = ZERO >*/ |
| 1316 | y = (float)0.; |
| 1317 | /*< DO 20 I = 1, P >*/ |
| 1318 | i__1 = *p; |
| 1319 | for (i__ = 1; i__ <= i__1; ++i__) { |
| 1320 | /*< Z = Z*RECBAS >*/ |
| 1321 | z__ *= recbas; |
| 1322 | /*< >*/ |
| 1323 | if (y < (float)1.) { |
| 1324 | oldy = y; |
| 1325 | } |
| 1326 | /*< Y = SLAMC3( Y, Z ) >*/ |
| 1327 | y = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&y, &z__); |
| 1328 | /*< 20 CONTINUE >*/ |
| 1329 | /* L20: */ |
| 1330 | } |
| 1331 | /*< >*/ |
| 1332 | if (y >= (float)1.) { |
| 1333 | y = oldy; |
| 1334 | } |
| 1335 | |
| 1336 | /* Now multiply by BETA**EMAX to get RMAX. */ |
| 1337 | |
| 1338 | /*< DO 30 I = 1, EMAX >*/ |
| 1339 | i__1 = *emax; |
| 1340 | for (i__ = 1; i__ <= i__1; ++i__) { |
| 1341 | /*< Y = SLAMC3( Y*BETA, ZERO ) >*/ |
| 1342 | r__1 = y * *beta; |
| 1343 | y = slamc3_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:250:9`!(&r__1, &c_b32cxx . . $ c_b32.); |
| 1344 | /*< 30 CONTINUE >*/ |
| 1345 | /* L30: */ |
| 1346 | } |
| 1347 | |
| 1348 | /*< RMAX = Y >*/ |
| 1349 | *rmax = y; |
| 1350 | /*< RETURN >*/ |
| 1351 | return 0; |
| 1352 | |
| 1353 | /* End of SLAMC5 */ |
| 1354 | |
| 1355 | /*< END >*/ |
| 1356 | } /* slamc5_ */ |
| 1357 | |
| 1358 | #ifdef __cplusplus |
| 1359 | } |
| 1360 | #endif |