Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add NaN tests
  • Loading branch information
martin-frbg authored Aug 14, 2023
commit f9868296983556dfb7455ba340d3ff8d894d520f
17 changes: 14 additions & 3 deletions kernel/mips/iamin.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/***************************************************************************
Copyright (c) 2016, The OpenBLAS Project
Copyright (c) 2013, The OpenBLAS Project
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
Expand All @@ -25,6 +25,15 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/

/**************************************************************************************
* 2013/09/14 Saar
* BLASTEST float : NoTest
* BLASTEST double : NoTest
* CTEST : NoTest
* TEST : NoTest
*
**************************************************************************************/

#include "common.h"
#include <math.h>

Expand All @@ -47,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