Skip to content

Commit df59f4c

Browse files
committed
bench: update benchmarks
1 parent 51be29d commit df59f4c

File tree

1 file changed

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

1 file changed

+3
-6
lines changed

lib/node_modules/@stdlib/math/base/special/riemann-zeta/benchmark/c/cephes/benchmark.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,18 +95,15 @@ static double rand_double( void ) {
9595
*/
9696
static double benchmark( void ) {
9797
double elapsed;
98-
double x[ 100 ];
98+
double x;
9999
double y;
100100
double t;
101101
int i;
102102

103-
for ( i = 0; i < 100; i++ ) {
104-
x[ i ] = ( 56.0 * rand_double() ) + 1.1;
105-
}
106-
107103
t = tic();
108104
for ( i = 0; i < ITERATIONS; i++ ) {
109-
y = zeta( x[ i % 100 ], 1.0 );
105+
x = ( 56.0*rand_double() ) + 1.1;
106+
y = zeta( x, 1.0 );
110107
if ( y != y ) {
111108
printf( "should not return NaN\n" );
112109
break;

0 commit comments

Comments
 (0)