Browse Source

Add NaN tests

pull/4191/head
Martin Kroeker GitHub 2 years ago
parent
commit
9a8d090eaa
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      kernel/arm/iamax.c

+ 3
- 1
kernel/arm/iamax.c View File

@@ -56,13 +56,15 @@ BLASLONG CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
BLASLONG max=0;

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

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

while(i < n)
{
if (x[ix]!=x[ix]) return(i+1);
if( ABS(x[ix]) > maxf )
{
max = i;


Loading…
Cancel
Save