Skip to content

Commit fde9348

Browse files
authored
Discard changes to lib/node_modules/@stdlib/math/base/special/cidentityf/benchmark/c/native/benchmark.c
1 parent da6370e commit fde9348

File tree

1 file changed

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

1 file changed

+3
-6
lines changed

lib/node_modules/@stdlib/math/base/special/cidentityf/benchmark/c/native/benchmark.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,20 +91,17 @@ static float rand_float( void ) {
9191
* @return elapsed time in seconds
9292
*/
9393
static double benchmark( void ) {
94-
float v[ 100 ];
9594
float complex x;
9695
float complex y;
9796
double elapsed;
9897
double t;
98+
float v;
9999
int i;
100100

101-
for ( i = 0; i < 100; i++ ) {
102-
v[ i ] = ( 1000.0f*rand_float() ) - 500.0f;
103-
}
104-
105101
t = tic();
106102
for ( i = 0; i < ITERATIONS; i++ ) {
107-
x = v[ i%100 ] + v[ i%100 ]*I;
103+
v = ( 1000.0f*rand_float() ) - 500.0f;
104+
x = v + v*I;
108105
y = stdlib_base_cidentityf( x );
109106
if ( crealf( y ) != v ) {
110107
printf( "unexpected result\n" );

0 commit comments

Comments
 (0)