Skip to content

Commit 9996a17

Browse files
committed
refactor: use log1p instead of ln
--- 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: 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: passed ---
1 parent f8aa307 commit 9996a17

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

lib/node_modules/@stdlib/stats/base/dists/bradford/pdf/lib/factory.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
var constantFunction = require( '@stdlib/utils/constant-function' );
2424
var isnan = require( '@stdlib/math/base/assert/is-nan' );
25-
var ln = require( '@stdlib/math/base/special/ln' );
25+
var log1p = require( '@stdlib/math/base/special/log1p' );
2626

2727

2828
// MAIN //
@@ -70,7 +70,7 @@ function factory( c ) {
7070
) {
7171
return NaN;
7272
}
73-
k = ln( 1.0 + c );
73+
k = log1p( c );
7474
return c / ( ( 1.0 + ( c * x ) ) * k );
7575
}
7676
}

lib/node_modules/@stdlib/stats/base/dists/bradford/pdf/lib/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
// MODULES //
2222

2323
var isnan = require( '@stdlib/math/base/assert/is-nan' );
24-
var ln = require( '@stdlib/math/base/special/ln' );
24+
var log1p = require( '@stdlib/math/base/special/log1p' );
2525

2626

2727
// MAIN //
@@ -76,7 +76,7 @@ function pdf( x, c ) {
7676
) {
7777
return NaN;
7878
}
79-
k = ln( 1.0 + c );
79+
k = log1p( c );
8080
return c / ( ( 1.0 + ( c * x ) ) * k );
8181
}
8282

lib/node_modules/@stdlib/stats/base/dists/bradford/pdf/test/test.factory.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ tape( 'the created function evaluates the pdf for `x` given small `c`', function
126126
t.equal( y, expected[i], 'x: '+x[i]+'. c: '+c[i]+', y: '+y+', expected: '+expected[i] );
127127
} else {
128128
delta = abs( y - expected[ i ] );
129-
tol = 3.9 * EPS * abs( expected[ i ] );
129+
tol = 2.0 * EPS * abs( expected[ i ] );
130130
t.ok( delta <= tol, 'within tolerance. x: '+x[ i ]+'. c: '+c[i]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' );
131131
}
132132
}

lib/node_modules/@stdlib/stats/base/dists/bradford/pdf/test/test.pdf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ tape( 'the function evaluates the pdf for `x` given small parameter `c`', functi
107107
t.equal( y, expected[i], 'x: '+x[i]+'. c:'+c[i]+', y: '+y+', expected: '+expected[i] );
108108
} else {
109109
delta = abs( y - expected[ i ] );
110-
tol = 3.9 * EPS * abs( expected[ i ] );
110+
tol = 2.0 * EPS * abs( expected[ i ] );
111111
t.ok( delta <= tol, 'within tolerance. x: '+x[ i ]+'. c: '+c[i]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' );
112112
}
113113
}

0 commit comments

Comments
 (0)