We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 22fbadb commit b57a608Copy full SHA for b57a608
lib/node_modules/@stdlib/math/base/special/minmaxn/benchmark/c/native/benchmark.c
@@ -93,7 +93,6 @@ static double benchmark( void ) {
93
double elapsed;
94
double x1[ 100 ];
95
double x2[ 100 ];
96
- double args[ 2 ];
97
double out[ 2 ];
98
double t;
99
int i;
@@ -105,9 +104,8 @@ static double benchmark( void ) {
105
104
106
t = tic();
107
for ( i = 0; i < ITERATIONS; i++ ) {
108
- args[ 0 ] = x1[ i % 100 ];
109
- args[ 1 ] = x2[ i % 100 ];
110
- stdlib_base_minmaxn( args, out, 2 );
+ const double args[ 2 ] = { x1[ i % 100 ], x2[ i % 100 ]};
+ stdlib_base_minmaxn( out, args, 2 );
111
if ( out[ 0 ] != out[ 0 ] || out[ 1 ] != out[ 1 ] ) {
112
printf( "should not return NaN\n" );
113
break;
0 commit comments