Skip to content

Commit 4318bf1

Browse files
feat: add C implementation for stats/base/dists/pareto-type1/median by adding stdlib_pow
--- 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: missing_dependencies - 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: na ---
1 parent 7eb0b6b commit 4318bf1

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

lib/node_modules/@stdlib/stats/base/dists/pareto-type1/median/manifest.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
"libpath": [],
4040
"dependencies": [
4141
"@stdlib/math/base/napi/binary",
42-
"@stdlib/math/base/assert/is-nan"
42+
"@stdlib/math/base/assert/is-nan",
43+
"@stdlib/math/base/special/pow"
4344
]
4445
},
4546
{
@@ -54,7 +55,8 @@
5455
"libraries": [],
5556
"libpath": [],
5657
"dependencies": [
57-
"@stdlib/math/base/assert/is-nan"
58+
"@stdlib/math/base/assert/is-nan",
59+
"@stdlib/math/base/special/pow"
5860
]
5961
},
6062
{
@@ -69,7 +71,8 @@
6971
"libraries": [],
7072
"libpath": [],
7173
"dependencies": [
72-
"@stdlib/math/base/assert/is-nan"
74+
"@stdlib/math/base/assert/is-nan",
75+
"@stdlib/math/base/special/pow"
7376
]
7477
}
7578
]

lib/node_modules/@stdlib/stats/base/dists/pareto-type1/median/src/main.c

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

1919
#include "stdlib/stats/base/dists/pareto-type1/median.h"
2020
#include "stdlib/math/base/assert/is_nan.h"
21-
#include <math.h>
21+
#include "stdlib/math/base/special/pow.h"
2222

2323
/**
2424
* Returns the median of a Pareto (Type I) distribution.
@@ -40,5 +40,5 @@ double stdlib_base_dists_pareto_type1_median( const double alpha, const double b
4040
) {
4141
return 0.0 / 0.0; // NaN
4242
}
43-
return beta * pow( 2.0, 1.0/alpha ) ;
43+
return beta * stdlib_base_pow( 2.0, 1.0/alpha ) ;
4444
}

0 commit comments

Comments
 (0)