From a6891ef18e9e26308ede73b8eac81aad19157c89 Mon Sep 17 00:00:00 2001 From: Athan Date: Fri, 22 Mar 2024 20:41:26 -0700 Subject: [PATCH] Apply suggestions from code review Signed-off-by: Athan --- .../fast/uint32-log2/benchmark/c/native/benchmark.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/node_modules/@stdlib/math/base/special/fast/uint32-log2/benchmark/c/native/benchmark.c b/lib/node_modules/@stdlib/math/base/special/fast/uint32-log2/benchmark/c/native/benchmark.c index 137884a5372..fd96b3ad721 100644 --- a/lib/node_modules/@stdlib/math/base/special/fast/uint32-log2/benchmark/c/native/benchmark.c +++ b/lib/node_modules/@stdlib/math/base/special/fast/uint32-log2/benchmark/c/native/benchmark.c @@ -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; }