35 #ifndef TEMPLATE_LAPACK_LAMCH_HEADER 36 #define TEMPLATE_LAPACK_LAMCH_HEADER 49 x = (*a >= 0 ? *a : - *a);
50 return( *b >= 0 ? x : -x);
55 #define log10e 0.43429448190325182765 71 Treal *scale, Treal *sumsq)
135 i__1 = (*n - 1) * *incx + 1;
137 for (ix = 1; i__2 < 0 ? ix >= i__1 : ix <= i__1; ix += i__2) {
139 absxi = (d__1 = x[ix],
absMACRO(d__1));
140 if (*scale < absxi) {
142 d__1 = *scale / absxi;
143 *sumsq = *sumsq * (d__1 * d__1) + 1;
147 d__1 = absxi / *scale;
148 *sumsq += d__1 * d__1;
164 template<
class Treal>
198 template<
class Treal>
245 Treal rmach, ret_val;
250 rmach = std::numeric_limits<Treal>::epsilon();
258 rmach = 2.0 * std::numeric_limits<Treal>::epsilon();
260 std::cout <<
"ERROR in template_lapack_lamch: case N not implemented." << std::endl;
261 throw "ERROR in template_lapack_lamch: case N not implemented.";
263 std::cout <<
"ERROR in template_lapack_lamch: case R not implemented." << std::endl;
264 throw "ERROR in template_lapack_lamch: case R not implemented.";
266 std::cout <<
"ERROR in template_lapack_lamch: case M not implemented." << std::endl;
267 throw "ERROR in template_lapack_lamch: case M not implemented.";
269 std::cout <<
"ERROR in template_lapack_lamch: case U not implemented." << std::endl;
270 throw "ERROR in template_lapack_lamch: case U not implemented.";
272 std::cout <<
"ERROR in template_lapack_lamch: case L not implemented." << std::endl;
273 throw "ERROR in template_lapack_lamch: case L not implemented.";
275 std::cout <<
"ERROR in template_lapack_lamch: case O not implemented." << std::endl;
276 throw "ERROR in template_lapack_lamch: case O not implemented.";
#define absMACRO(x)
Definition: template_blas_common.h:45
int integer
Definition: template_blas_common.h:38
Treal template_blas_lg10(Treal *x)
Definition: template_lapack_lamch.h:57
Treal template_lapack_d_sign(const Treal *a, const Treal *b)
Definition: template_lapack_lamch.h:46
Treal template_blas_log(Treal x)
#define log10e
Definition: template_lapack_lamch.h:55
int min(int a, int b)
Definition: lin_trans.cc:61
Treal template_lapack_lamch(const char *cmach, Treal dummyReal)
Definition: template_lapack_lamch.h:199
double template_lapack_pow_di(Treal *ap, integer *bp)
Definition: template_lapack_lamch.h:165
int template_lapack_lassq(const integer *n, const Treal *x, const integer *incx, Treal *scale, Treal *sumsq)
Definition: template_lapack_lamch.h:70
logical template_blas_lsame(const char *ca, const char *cb)
Definition: template_blas_common.cc:44