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 7560ab3 commit eb938ffCopy full SHA for eb938ff
lib/node_modules/@stdlib/complex/float64/base/mul-add/benchmark/c/benchmark.c
@@ -115,8 +115,8 @@ static double benchmark( void ) {
115
116
t = tic();
117
for ( i = 0; i < ITERATIONS; i++ ) {
118
- re = ( creal(z1)*creal(z2) ) - ( cimag(z1)*cimag(z2) ) + creal(z3);
119
- im = ( creal(z1)*cimag(z2) ) + ( cimag(z1)*creal(z2) ) + cimag(z3);
+ re = ( creal(z1[i%100])*creal(z2[i%100]) ) - ( cimag(z1[i%100])*cimag(z2[i%100]) ) + creal(z3[i%100]);
+ im = ( creal(z1[i%100])*cimag(z2[i%100]) ) + ( cimag(z1[i%100])*creal(z2[i%100]) ) + cimag(z3[i%100]);
120
z4 = re + im*I;
121
if ( z4 != z4 ) {
122
printf( "should not return NaN\n" );
0 commit comments