Skip to content

Commit 536200b

Browse files
authored
fix handling of INF or NAN
1 parent b422742 commit 536200b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

kernel/arm/scal.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x, BLAS
4848
{
4949

5050
if ( da == 0.0 )
51+
if (!isnan(x[i] && !isinf(x[i])) {
5152
x[i]=0.0;
53+
} else {
54+
x[i]=NAN;
55+
}
5256
else
5357
x[i] = da * x[i] ;
5458

0 commit comments

Comments
 (0)