Improve fix from PR3924 (#3941)
* compare denominator against DBL_MIN rather than a somewhat arbitrary small number near it
This commit is contained in:
parent
8d6813ec41
commit
f3d21039ce
|
@ -37,6 +37,7 @@
|
|||
/*********************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <float.h>
|
||||
#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) {
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
/*********************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <float.h>
|
||||
#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,
|
||||
|
|
Loading…
Reference in New Issue