Skip to content

Commit 27c7679

Browse files
jalajk3004kgryte
andauthored
chore: address commit comment
PR-URL: #5943 Closes: #5898 Co-authored-by: Athan Reines <[email protected]> Reviewed-by: Athan Reines <[email protected]> Signed-off-by: Athan Reines <[email protected]>
1 parent 5a2afad commit 27c7679

File tree

1 file changed

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

1 file changed

+8
-6
lines changed

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

+8-6
Original file line numberDiff line numberDiff line change
@@ -92,26 +92,28 @@ static double rand_double( void ) {
9292
* @return elapsed time in seconds
9393
*/
9494
static double benchmark( void ) {
95-
double re[ 100 ];
96-
double im[ 100 ];
95+
double are[ 100 ];
96+
double aim[ 100 ];
9797
double elapsed;
98+
double re;
99+
double im;
98100
double t;
99101
int i;
100102

101103
stdlib_complex128_t z1;
102104
stdlib_complex128_t z2;
103105

104106
for ( i = 0; i < 100; i++ ) {
105-
re[ i ] = ( 1000.0*rand_double() ) - 500.0;
106-
im[ i ] = ( 1000.0*rand_double() ) - 500.0;
107+
are[ i ] = ( 1000.0*rand_double() ) - 500.0;
108+
aim[ i ] = ( 1000.0*rand_double() ) - 500.0;
107109
}
108110

109111
t = tic();
110112
for ( i = 0; i < ITERATIONS; i++ ) {
111-
z1 = stdlib_complex128( re[ i%100 ], im[ i%100 ] );
113+
z1 = stdlib_complex128( are[ i%100 ], aim[ i%100 ] );
112114

113115
z2 = stdlib_base_ccis( z1 );
114-
stdlib_complex128_reim( z2, &re[ i%100 ], &im[ i%100 ] );
116+
stdlib_complex128_reim( z2, &re, &im );
115117
if ( re != re ) {
116118
printf( "should not return NaN\n" );
117119
break;

0 commit comments

Comments
 (0)