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 51be29d commit df59f4cCopy full SHA for df59f4c
lib/node_modules/@stdlib/math/base/special/riemann-zeta/benchmark/c/cephes/benchmark.c
@@ -95,18 +95,15 @@ static double rand_double( void ) {
95
*/
96
static double benchmark( void ) {
97
double elapsed;
98
- double x[ 100 ];
+ double x;
99
double y;
100
double t;
101
int i;
102
103
- for ( i = 0; i < 100; i++ ) {
104
- x[ i ] = ( 56.0 * rand_double() ) + 1.1;
105
- }
106
-
107
t = tic();
108
for ( i = 0; i < ITERATIONS; i++ ) {
109
- y = zeta( x[ i % 100 ], 1.0 );
+ x = ( 56.0*rand_double() ) + 1.1;
+ y = zeta( x, 1.0 );
110
if ( y != y ) {
111
printf( "should not return NaN\n" );
112
break;
0 commit comments