Skip to content

Commit 8ecba02

Browse files
committed
test(lib): addressed commit comments (commit 1f5d85a) #5712
test: rearranged reference section in README.md of normal/quantile and added closing </section> and traling comment for <section class="c">, arranged L96-102 in order of length in benchmark.c of same location and used sqrt_two library in main.c of same location --- 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: passed - 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: missing_dependencies - 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: --- --- 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 befe02c commit 8ecba02

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

lib/node_modules/@stdlib/stats/base/dists/normal/quantile/README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,6 @@ for ( i = 0; i < 10; i++ ) {
152152

153153
<!-- /.examples -->
154154

155-
<!-- Section to include cited references. If references are included, add a horizontal rule *before* the section. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
156-
157-
<section class="references">
158-
159155
<!-- C interface documentation. -->
160156

161157
* * *
@@ -249,6 +245,18 @@ int main( void ) {
249245

250246
</section>
251247

248+
<!-- /.examples -->
249+
250+
</section>
251+
252+
<!-- /.c -->
253+
254+
<!-- Section to include cited references. If references are included, add a horizontal rule *before* the section. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
255+
256+
<section class="references">
257+
258+
</section>
259+
252260
<!-- /.references -->
253261

254262
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->

lib/node_modules/@stdlib/stats/base/dists/normal/quantile/benchmark/c/benchmark.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,13 @@ static double random_uniform( const double min, const double max ) {
9393
* @return elapsed time in seconds
9494
*/
9595
static double benchmark( void ) {
96+
int i;
97+
double t;
98+
double y;
9699
double elapsed;
97100
double p[ 100 ];
98101
double mu[ 100 ];
99102
double sigma[ 100 ];
100-
double y;
101-
double t;
102-
int i;
103103

104104
for ( i = 0; i < 100; i++ ) {
105105
p[ i ] = random_uniform( 0.0, 1.0 );

lib/node_modules/@stdlib/stats/base/dists/normal/quantile/src/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "stdlib/math/base/assert/is_nan.h"
2121
#include "stdlib/math/base/special/sqrt.h"
2222
#include "stdlib/math/base/special/erfinv.h"
23+
#include "stdlib/constants/float64/sqrt_two.h"
2324

2425
/**
2526
* Evaluates the quantile function for a normal distribution with mean `mu` and standard deviation `sigma` at a probability `p`.
@@ -47,5 +48,5 @@ double stdlib_base_dists_normal_quantile( const double p, const double mu, const
4748
if ( sigma == 0.0 ) {
4849
return mu;
4950
}
50-
return mu + ( ( sigma * stdlib_base_sqrt( 2.0 ) ) * stdlib_base_erfinv( ( 2.0 * p ) - 1.0 ) );
51+
return mu + ( ( sigma * STDLIB_CONSTANT_FLOAT64_SQRT2 ) * stdlib_base_erfinv( ( 2.0 * p ) - 1.0 ) );
5152
}

0 commit comments

Comments
 (0)