fix handling of INF or NAN
This commit is contained in:
parent
b422742899
commit
536200bc9e
|
@ -48,7 +48,11 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x, BLAS
|
|||
{
|
||||
|
||||
if ( da == 0.0 )
|
||||
if (!isnan(x[i] && !isinf(x[i])) {
|
||||
x[i]=0.0;
|
||||
} else {
|
||||
x[i]=NAN;
|
||||
}
|
||||
else
|
||||
x[i] = da * x[i] ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue