From 8ee9b69aff2d75755d3dc59c4017ab75b3353e08 Mon Sep 17 00:00:00 2001 From: Arjan Date: Sat, 1 Aug 2026 08:37:58 +0530 Subject: [PATCH] chore: replace `pow` with `powf` in `fibonaccif/benchmark/benchmark.js` --- 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_pkg_readmes status: na - task: lint_markdown_docs status: na - 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: passed - 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: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../math/base/special/fibonaccif/benchmark/benchmark.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/node_modules/@stdlib/math/base/special/fibonaccif/benchmark/benchmark.js b/lib/node_modules/@stdlib/math/base/special/fibonaccif/benchmark/benchmark.js index 5839e8f0b163..f110c055ffbf 100644 --- a/lib/node_modules/@stdlib/math/base/special/fibonaccif/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/math/base/special/fibonaccif/benchmark/benchmark.js @@ -23,12 +23,11 @@ var bench = require( '@stdlib/bench' ); var Int32Array = require( '@stdlib/array/int32' ); var discreteUniform = require( '@stdlib/random/array/discrete-uniform' ); +var powf = require( '@stdlib/math/base/special/powf' ); var roundf = require( '@stdlib/math/base/special/roundf' ); var sqrtf = require( '@stdlib/math/base/special/sqrtf' ); -var pow = require( '@stdlib/math/base/special/pow' ); var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); var PHI = require( '@stdlib/constants/float32/phi' ); -var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' ); var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; var FIBONACCI = require( './../lib/fibonacci.json' ); @@ -70,8 +69,7 @@ bench( format( '%s::analytic', pkg ), function benchmark( b ) { var i; function fibonaccif( n ) { - // TODO: replace with powf once implemented - return roundf( float64ToFloat32( pow( PHI, n ) ) / SQRT_5 ); + return roundf( powf( PHI, n ) / SQRT_5 ); } x = discreteUniform( 100, 0, 36 );