make NAN handling depend on dummy2 parameter

This commit is contained in:
Martin Kroeker
2024-07-17 23:41:26 +02:00
committed by GitHub
parent b9bfc8ce09
commit 73751218a4

View File

@@ -43,9 +43,22 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x, BLAS
if ( (n <= 0) || (inc_x <= 0))
return(0);
if (dummy2 == 0)
while(j < n)
{
while(j < n)
{
if ( da == 0.0 )
x[i]=0.0;
else
x[i] = da * x[i] ;
i += inc_x ;
j++;
}
} else {
while(j < n)
{
if ( da == 0.0 )
if (!isnan(x[i]) && !isinf(x[i])) {
@@ -59,6 +72,7 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x, BLAS
i += inc_x ;
j++;
}
}
return 0;