Skip to content

Commit 27e7f1c

Browse files
committed
feat: update C benchmarks
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: passed - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 6567162 commit 27e7f1c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/node_modules/@stdlib/math/base/special/exp2f/benchmark/c/benchmark.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ static double tic( void ) {
7878
*
7979
* @return random number
8080
*/
81-
static double rand_float( void ) {
81+
static float rand_float( void ) {
8282
int r = rand();
8383
return (float)r / ( (float)RAND_MAX + 1.0f );
8484
}
@@ -91,12 +91,12 @@ static double rand_float( void ) {
9191
static double benchmark( void ) {
9292
double elapsed;
9393
float x[ 10 ];
94-
double y;
9594
double t;
95+
float y;
9696
int i;
9797

9898
for ( i = 0; i < 10; i++ ) {
99-
x[ i ] = ( 240.0 * rand_float() ) - 120.0;
99+
x[ i ] = ( 240.0f * rand_float() ) - 120.0f;
100100
}
101101
t = tic();
102102
for ( i = 0; i < ITERATIONS; i++ ) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ static float rand_float( void ) {
9292
static double benchmark( void ) {
9393
double elapsed;
9494
float x[ 10 ];
95-
float y;
9695
double t;
96+
float y;
9797
int i;
9898

9999
for ( i = 0; i < 10; i++ ) {

0 commit comments

Comments
 (0)