Skip to content

Commit 6544e40

Browse files
committed
fix: inline constant value
--- 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: 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: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 4418e62 commit 6544e40

2 files changed

Lines changed: 4 additions & 12 deletions

File tree

lib/node_modules/@stdlib/stats/base/dists/halfnormal/mean/manifest.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@
3939
"libpath": [],
4040
"dependencies": [
4141
"@stdlib/math/base/napi/unary",
42-
"@stdlib/math/base/assert/is-nan",
43-
"@stdlib/math/base/special/sqrt",
44-
"@stdlib/constants/float64/pi"
42+
"@stdlib/math/base/assert/is-nan"
4543
]
4644
},
4745
{
@@ -56,9 +54,7 @@
5654
"libraries": [],
5755
"libpath": [],
5856
"dependencies": [
59-
"@stdlib/math/base/assert/is-nan",
60-
"@stdlib/math/base/special/sqrt",
61-
"@stdlib/constants/float64/pi"
57+
"@stdlib/math/base/assert/is-nan"
6258
]
6359
},
6460
{
@@ -73,9 +69,7 @@
7369
"libraries": [],
7470
"libpath": [],
7571
"dependencies": [
76-
"@stdlib/math/base/assert/is-nan",
77-
"@stdlib/math/base/special/sqrt",
78-
"@stdlib/constants/float64/pi"
72+
"@stdlib/math/base/assert/is-nan"
7973
]
8074
}
8175
]

lib/node_modules/@stdlib/stats/base/dists/halfnormal/mean/src/main.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@
1818

1919
#include "stdlib/stats/base/dists/halfnormal/mean.h"
2020
#include "stdlib/math/base/assert/is_nan.h"
21-
#include "stdlib/math/base/special/sqrt.h"
22-
#include "stdlib/constants/float64/pi.h"
2321

24-
static const double SQRT_TWO_OVER_PI = stdlib_base_sqrt( 2.0 / STDLIB_CONSTANT_FLOAT64_PI );
22+
static const double SQRT_TWO_OVER_PI = 0.7978845608028654; // sqrt(2/π)
2523

2624
/**
2725
* Returns the expected value for a half-normal distribution with scale parameter `sigma`.

0 commit comments

Comments
 (0)