Skip to content

Commit eb555e4

Browse files
committed
chore: clean-up
--- 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: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: passed - 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent c4ed64c commit eb555e4

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

lib/node_modules/@stdlib/stats/base/dists/lognormal/mode/lib/native.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var addon = require( './../src/addon.node' );
2626
// MAIN //
2727

2828
/**
29-
* Returns the mode for a lognormal distribution with location `mu` and scale `sigma`.
29+
* Returns the mode for a lognormal distribution with location `mu` and scale `sigma`.
3030
*
3131
* @private
3232
* @param {number} mu - location parameter

lib/node_modules/@stdlib/stats/base/dists/lognormal/mode/src/addon.c

-1
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,4 @@
1919
#include "stdlib/stats/base/dists/lognormal/mode.h"
2020
#include "stdlib/math/base/napi/binary.h"
2121

22-
// cppcheck-suppress shadowFunction
2322
STDLIB_MATH_BASE_NAPI_MODULE_DD_D( stdlib_base_dists_lognormal_mode )

lib/node_modules/@stdlib/stats/base/dists/lognormal/mode/src/main.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,5 @@ double stdlib_base_dists_lognormal_mode( const double mu, const double sigma ) {
3939
) {
4040
return 0.0/0.0; // NaN
4141
}
42-
double sigma2 = sigma * sigma;
43-
double exponent = mu - sigma2;
44-
return stdlib_base_exp( exponent );
42+
return stdlib_base_exp( mu - ( sigma*sigma ) );
4543
}

lib/node_modules/@stdlib/stats/base/dists/lognormal/mode/test/test.native.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ tape( 'the function returns the mode of a lognormal distribution', opts, functio
100100
sigma = data.sigma;
101101
for ( i = 0; i < mu.length; i++ ) {
102102
y = mode( mu[i], sigma[i] );
103-
if ( expected[i] !== null) {
103+
if ( expected[i] !== null ) {
104104
if ( y === expected[i] ) {
105105
t.equal( y, expected[i], 'mu:'+mu[i]+', sigma: '+sigma[i]+', y: '+y+', expected: '+expected[i] );
106106
} else {

0 commit comments

Comments
 (0)