Skip to content

Commit 343035d

Browse files
authored
Discard changes to lib/node_modules/@stdlib/math/base/special/cfloorn/benchmark/c/benchmark.c
1 parent 92a42a6 commit 343035d

File tree

1 file changed

+3
-6
lines changed
  • lib/node_modules/@stdlib/math/base/special/cfloorn/benchmark/c

1 file changed

+3
-6
lines changed

lib/node_modules/@stdlib/math/base/special/cfloorn/benchmark/c/benchmark.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,21 +90,18 @@ static double rand_double( void ) {
9090
* @return elapsed time in seconds
9191
*/
9292
static double benchmark( void ) {
93-
double v[ 100 ];
9493
double elapsed;
94+
double v;
9595
double t;
9696
int i;
9797

9898
double complex x;
9999
double complex z;
100100

101-
for ( i = 0; i < 100; i++ ) {
102-
v[ i ] = ( 1000.0*rand_double() ) - 500.0;
103-
}
104-
105101
t = tic();
106102
for ( i = 0; i < ITERATIONS; i++ ) {
107-
x = v[ i%100 ] + v[ i%100 ]*I;
103+
v = ( 1000.0*rand_double() ) - 500.0;
104+
x = v + v*I;
108105
z = stdlib_base_floorn( creal( x ), -2 ) + stdlib_base_floorn( cimag( x ), -2 )*I;
109106
if ( z != z ) {
110107
printf( "should not return NaN\n" );

0 commit comments

Comments
 (0)