Skip to content

Commit a967fdb

Browse files
committed
bench: use powf in negafibonaccif
--- 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: 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 ---
1 parent d6a86bb commit a967fdb

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

  • lib/node_modules/@stdlib/math/base/special/negafibonaccif/benchmark

lib/node_modules/@stdlib/math/base/special/negafibonaccif/benchmark/benchmark.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var bench = require( '@stdlib/bench' );
2424
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
2525
var roundf = require( '@stdlib/math/base/special/roundf' );
2626
var sqrtf = require( '@stdlib/math/base/special/sqrtf' );
27-
var pow = require( '@stdlib/math/base/special/pow' );
27+
var powf = require( '@stdlib/math/base/special/powf' );
2828
var absf = require( '@stdlib/math/base/special/absf' );
2929
var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
3030
var Float32Array = require( '@stdlib/array/float32' );
@@ -71,8 +71,7 @@ bench( pkg+'::analytic', function benchmark( b ) {
7171
function negafibonaccif( n ) {
7272
var an = absf( n );
7373

74-
// TODO: replace with `powf` when available
75-
return pow( -1.0, an+1 ) * roundf( pow( PHI, an ) / SQRT_5 );
74+
return powf( -1.0, an + 1.0 ) * roundf( powf( PHI, an ) / SQRT_5 );
7675
}
7776

7877
x = discreteUniform( 100, -36, 0 );

0 commit comments

Comments
 (0)