Add NaN tests
This commit is contained in:
parent
43f5e4251b
commit
9a8d090eaa
|
@ -56,13 +56,15 @@ BLASLONG CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
|
||||||
BLASLONG max=0;
|
BLASLONG max=0;
|
||||||
|
|
||||||
if (n <= 0 || inc_x <= 0) return(max);
|
if (n <= 0 || inc_x <= 0) return(max);
|
||||||
|
if (n==1) return(1);
|
||||||
|
if (x[0]!=x[0]) return(1);
|
||||||
maxf=ABS(x[0]);
|
maxf=ABS(x[0]);
|
||||||
ix += inc_x;
|
ix += inc_x;
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
while(i < n)
|
while(i < n)
|
||||||
{
|
{
|
||||||
|
if (x[ix]!=x[ix]) return(i+1);
|
||||||
if( ABS(x[ix]) > maxf )
|
if( ABS(x[ix]) > maxf )
|
||||||
{
|
{
|
||||||
max = i;
|
max = i;
|
||||||
|
|
Loading…
Reference in New Issue