diff --git a/lapack/getf2/getf2_k.c b/lapack/getf2/getf2_k.c index 5d3b4fdc2..d29ed588e 100644 --- a/lapack/getf2/getf2_k.c +++ b/lapack/getf2/getf2_k.c @@ -37,6 +37,7 @@ /*********************************************************************/ #include +#include #include "common.h" static FLOAT dp1 = 1.; @@ -100,7 +101,7 @@ blasint CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa, temp1 = *(b + jp); //if (temp1 != ZERO) { - if (fabs(temp1) > 1.e-305) { + if (fabs(temp1) >= DBL_MIN ) { temp1 = dp1 / temp1; if (jp != j) { diff --git a/lapack/getf2/zgetf2_k.c b/lapack/getf2/zgetf2_k.c index 466b66e26..f3412f52f 100644 --- a/lapack/getf2/zgetf2_k.c +++ b/lapack/getf2/zgetf2_k.c @@ -37,6 +37,7 @@ /*********************************************************************/ #include +#include #include "common.h" double fabs(double); @@ -106,7 +107,7 @@ blasint CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa, temp2 = *(b + jp * 2 + 1); // if ((temp1 != ZERO) || (temp2 != ZERO)) { - if ((fabs(temp1) > 1.e-305) || (fabs(temp2) > 1.e-305)) { + if ((fabs(temp1) >= DBL_MIN) && (fabs(temp2) >= DBL_MIN)) { if (jp != j) { SWAP_K(j + 1, 0, 0, ZERO, ZERO, a + j * 2, lda,