Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Signed-off-by: Athan <[email protected]>
  • Loading branch information
kgryte authored Mar 23, 2024
1 parent c8c1cde commit a6891ef
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ double benchmark() {
for ( i = 0; i < ITERATIONS; i++ ) {
x = (uint32_t)rand();
y = stdlib_base_fast_uint32_log2( x );
if ( y != y ) {
printf( "should not return NaN\n" );
if ( y > x ) {
printf( "unexpected result\n" );
break;
}
}
elapsed = tic() - t;
if ( y != y ) {
printf( "should not return NaN\n" );
if ( y > x ) {
printf( "unexpected result\n" );
}
return elapsed;
}
Expand Down

0 comments on commit a6891ef

Please sign in to comment.