Skip to content

Commit

Permalink
Update zscal.c
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-frbg authored Jul 30, 2024
1 parent bde5b90 commit 2c36a48
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions kernel/zarch/zscal.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da_r, FLOAT da_i,
j = n1;
}

if (da_r == 0.0 || isnan(da_r)) {
if (da_r == 0.0 || da_r != da_r) {

if (da_i == 0.0) {
double res= 0.0;
Expand All @@ -362,11 +362,18 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da_r, FLOAT da_i,

}

} else if (isinf(da_r)) {
while (j < n) {
x[i] = NAN;
x[i + 1] = da_r;
i += 2;
j++
}
} else {

while (j < n) {

if (isnan(x[i]) || isinf(x[i]))
if (isinf(x[i]))
temp0 = NAN;
else
temp0 = -da_i * x[i + 1];
Expand Down

0 comments on commit 2c36a48

Please sign in to comment.