avoid overflow in division

This commit is contained in:
Martin Kroeker 2023-02-26 23:42:20 +01:00 committed by GitHub
parent 039e27545f
commit a39ced0551
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -105,8 +105,9 @@ blasint CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa,
temp1 = *(b + jp * 2 + 0);
temp2 = *(b + jp * 2 + 1);
if ((temp1 != ZERO) || (temp2 != ZERO)) {
// if ((temp1 != ZERO) || (temp2 != ZERO)) {
if ((fabs(temp1) > 1.e-305) || (fabs(temp2) > 1.e-305)) {
if (jp != j) {
SWAP_K(j + 1, 0, 0, ZERO, ZERO, a + j * 2, lda,
a + jp * 2, lda, NULL, 0);