Skip to content

Commit

Permalink
Add NaN tests
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-frbg authored Aug 14, 2023
1 parent f986829 commit 2e68d92
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions kernel/riscv64/iamin.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,15 @@ BLASLONG CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
BLASLONG min=0;

if (n <= 0 || inc_x <= 0) return(min);

minf=ABS(x[0]);
if (n==1) return(1);
if (x[0]!=x[0]) return(1);
minf=ABS(x[0]);
ix += inc_x;
i++;

while(i < n)
{
if (x[ix]!=x[ix]) return(i+1);
if( ABS(x[ix]) < ABS(minf) )
{
min = i;
Expand Down

0 comments on commit 2e68d92

Please sign in to comment.