37 #ifndef TEMPLATE_LAPACK_LAMCH_HEADER 38 #define TEMPLATE_LAPACK_LAMCH_HEADER 51 x = (*a >= 0 ? *a : - *a);
52 return( *b >= 0 ? x : -x);
58 #define log10e 0.43429448190325182765 74 Treal *scale, Treal *sumsq)
138 i__1 = (*n - 1) * *incx + 1;
140 for (ix = 1; i__2 < 0 ? ix >= i__1 : ix <= i__1; ix += i__2) {
142 absxi = (d__1 = x[ix],
absMACRO(d__1));
143 if (*scale < absxi) {
145 d__1 = *scale / absxi;
146 *sumsq = *sumsq * (d__1 * d__1) + 1;
150 d__1 = absxi / *scale;
151 *sumsq += d__1 * d__1;
167 template<
class Treal>
201 template<
class Treal>
248 Treal rmach, ret_val;
253 rmach = template_blas_get_machine_epsilon<Treal>();
255 rmach = template_blas_get_num_limit_min<Treal>();
261 rmach = 2.0 * template_blas_get_machine_epsilon<Treal>();
263 std::cout <<
"ERROR in template_lapack_lamch: case N not implemented." << std::endl;
264 throw "ERROR in template_lapack_lamch: case N not implemented.";
266 std::cout <<
"ERROR in template_lapack_lamch: case R not implemented." << std::endl;
267 throw "ERROR in template_lapack_lamch: case R not implemented.";
269 std::cout <<
"ERROR in template_lapack_lamch: case M not implemented." << std::endl;
270 throw "ERROR in template_lapack_lamch: case M not implemented.";
272 std::cout <<
"ERROR in template_lapack_lamch: case U not implemented." << std::endl;
273 throw "ERROR in template_lapack_lamch: case U not implemented.";
275 std::cout <<
"ERROR in template_lapack_lamch: case L not implemented." << std::endl;
276 throw "ERROR in template_lapack_lamch: case L not implemented.";
278 std::cout <<
"ERROR in template_lapack_lamch: case O not implemented." << std::endl;
279 throw "ERROR in template_lapack_lamch: case O not implemented.";
#define absMACRO(x)
Definition: template_blas_common.h:47
int integer
Definition: template_blas_common.h:40
Treal template_blas_lg10(Treal *x)
Definition: template_lapack_lamch.h:60
Treal template_lapack_d_sign(const Treal *a, const Treal *b)
Definition: template_lapack_lamch.h:48
Treal template_blas_log(Treal x)
#define log10e
Definition: template_lapack_lamch.h:58
Treal template_lapack_lamch(const char *cmach, Treal dummyReal)
Definition: template_lapack_lamch.h:202
double template_lapack_pow_di(Treal *ap, integer *bp)
Definition: template_lapack_lamch.h:168
int template_lapack_lassq(const integer *n, const Treal *x, const integer *incx, Treal *scale, Treal *sumsq)
Definition: template_lapack_lamch.h:73
logical template_blas_lsame(const char *ca, const char *cb)
Definition: template_blas_common.cc:46