handle corner cases involving NAN and/or INF

This commit is contained in:
Martin Kroeker
2024-06-06 23:59:43 +02:00
committed by GitHub
parent ffc1ab3f6e
commit 1abafcd9b2
3 changed files with 76 additions and 32 deletions

View File

@@ -234,6 +234,11 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x, BLAS
else x[i] = 0.0;
}
}
else if (isinf(da)){
for ( i=n1 ; i<n; i++)
if (x[i]==0.) x[i]=NAN;
else x[i] *=da;
}
else
{