Skip to content

Commit a9cf9eb

Browse files
committed
style: fix indentation and add missing final newlines
--- 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: missing_dependencies - 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 4648a0c commit a9cf9eb

6 files changed

Lines changed: 77 additions & 78 deletions

File tree

lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/benchmark/c/benchmark.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static double benchmark( void ) {
9898
double r[ 100 ];
9999
double q[ 100 ];
100100
double y;
101-
double t;
101+
double t;
102102
int32_t i;
103103

104104
for ( i = 0; i < 100; i++ ) {

lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/binding.gyp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,4 +167,4 @@
167167
], # end actions
168168
}, # end target copy_addon
169169
], # end targets
170-
}
170+
}

lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/examples/c/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,4 +143,4 @@ run: $(c_targets)
143143
clean:
144144
$(QUIET) -rm -f *.o *.out
145145

146-
.PHONY: clean
146+
.PHONY: clean

lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/src/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@ clean-addon:
6767
#/
6868
clean: clean-addon
6969

70-
.PHONY: clean
70+
.PHONY: clean

lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/src/addon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@
2020
#include "stdlib/math/base/napi/quaternary.h"
2121

2222
// cppcheck-suppress shadowFunction
23-
STDLIB_MATH_BASE_NAPI_MODULE_DDDD_D( stdlib_base_dists_studentized_range_cdf );
23+
STDLIB_MATH_BASE_NAPI_MODULE_DDDD_D( stdlib_base_dists_studentized_range_cdf );

lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/src/main.c

Lines changed: 72 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -32,48 +32,48 @@
3232
#include <stdint.h>
3333

3434
static const double WEIGHT[ 20 ] = {
35-
0.0176140071391521,
36-
0.0406014298003869,
37-
0.0626720483341091,
38-
0.0832767415767048,
39-
0.10193011981724,
40-
0.118194531961518,
41-
0.131688638449177,
42-
0.142096109318382,
43-
0.149172986472604,
44-
0.152753387130726,
45-
0.152753387130726,
46-
0.149172986472604,
47-
0.142096109318382,
48-
0.131688638449177,
49-
0.118194531961518,
50-
0.10193011981724,
51-
0.0832767415767048,
52-
0.0626720483341091,
53-
0.0406014298003869,
54-
0.0176140071391521
35+
0.0176140071391521,
36+
0.0406014298003869,
37+
0.0626720483341091,
38+
0.0832767415767048,
39+
0.10193011981724,
40+
0.118194531961518,
41+
0.131688638449177,
42+
0.142096109318382,
43+
0.149172986472604,
44+
0.152753387130726,
45+
0.152753387130726,
46+
0.149172986472604,
47+
0.142096109318382,
48+
0.131688638449177,
49+
0.118194531961518,
50+
0.10193011981724,
51+
0.0832767415767048,
52+
0.0626720483341091,
53+
0.0406014298003869,
54+
0.0176140071391521
5555
};
5656
static const double ROOT[ 20 ] = {
57-
0.993128599185095,
58-
0.963971927277914,
59-
0.912234428251326,
60-
0.839116971822219,
61-
0.746331906460151,
62-
0.636053680726515,
63-
0.510867001950827,
64-
0.37370608871542,
65-
0.227785851141645,
66-
0.0765265211334973,
67-
-0.0765265211334973,
68-
-0.227785851141645,
69-
-0.37370608871542,
70-
-0.510867001950827,
71-
-0.636053680726515,
72-
-0.746331906460151,
73-
-0.839116971822219,
74-
-0.912234428251326,
75-
-0.963971927277914,
76-
-0.993128599185095
57+
0.993128599185095,
58+
0.963971927277914,
59+
0.912234428251326,
60+
0.839116971822219,
61+
0.746331906460151,
62+
0.636053680726515,
63+
0.510867001950827,
64+
0.37370608871542,
65+
0.227785851141645,
66+
0.0765265211334973,
67+
-0.0765265211334973,
68+
-0.227785851141645,
69+
-0.37370608871542,
70+
-0.510867001950827,
71+
-0.636053680726515,
72+
-0.746331906460151,
73+
-0.839116971822219,
74+
-0.912234428251326,
75+
-0.963971927277914,
76+
-0.993128599185095
7777
};
7878
static double CUTOFF = 7.071; // 10 / sqrt(2)
7979
static double p0 = 220.2068679123761e0;
@@ -239,7 +239,7 @@ static double prangeVInf( const double w, const double r ) {
239239
* @returns integral value
240240
*/
241241
static double f26( const double q, const double za, const double aii, const double c, const double r, const double v, const double l ) {
242-
double aux1;
242+
double aux1;
243243
double yyi;
244244
double aux;
245245

@@ -273,19 +273,19 @@ static double f26( const double q, const double za, const double aii, const doub
273273
* @returns integral value
274274
*/
275275
static double gausslegdquad( const double q, const double aii, const double r, const double ci, const double a, const double b, const double n, const double v, const double l ) {
276-
double wsum = 0.0;
277-
double cmm = ( b - a ) / 2.0;
278-
double d = ( b + a ) / 2.0;
279-
int32_t j;
280-
for( j = 0; j < n; j++ ) {
281-
if ( ROOT[ j ] == 0.0 ) {
282-
wsum += WEIGHT[ j ] * f26( q, d, aii, ci, r, v, l );
283-
} else {
284-
wsum += WEIGHT[ j ] *
285-
( f26( q, ( ROOT[ j ] * cmm ) + d, aii, ci, r, v, l ) );
286-
}
287-
}
288-
return cmm * wsum;
276+
double wsum = 0.0;
277+
double cmm = ( b - a ) / 2.0;
278+
double d = ( b + a ) / 2.0;
279+
int32_t j;
280+
for( j = 0; j < n; j++ ) {
281+
if ( ROOT[ j ] == 0.0 ) {
282+
wsum += WEIGHT[ j ] * f26( q, d, aii, ci, r, v, l );
283+
} else {
284+
wsum += WEIGHT[ j ] *
285+
( f26( q, ( ROOT[ j ] * cmm ) + d, aii, ci, r, v, l ) );
286+
}
287+
}
288+
return cmm * wsum;
289289
}
290290

291291
/**
@@ -314,32 +314,31 @@ static double gausslegdquad( const double q, const double aii, const double r, c
314314
* // returns ~0.01
315315
*/
316316
double stdlib_base_dists_studentized_range_cdf( const double q, const double r, const double v, const double nranges ) {
317-
double probinic;
318-
double auxprob;
317+
double probinic;
318+
double auxprob;
319319
double found;
320320
double ll;
321321
double a;
322322

323-
if ( stdlib_base_is_nan( q ) || stdlib_base_is_nan( r ) || stdlib_base_is_nan( v ) ) {
324-
return 0.0 / 0.0; //NaN
325-
}
326-
if ( r < 2.0 || v < 2.0 ) {
327-
return 0.0 / 0.0;
328-
}
329-
330-
else if ( !stdlib_base_is_positive_integer( nranges ) ) {
331-
return 0.0 / 0.0;
332-
}
333-
if ( v == 1 ) {
334-
if ( r < 10 ) {
323+
if ( stdlib_base_is_nan( q ) || stdlib_base_is_nan( r ) || stdlib_base_is_nan( v ) ) {
324+
return 0.0 / 0.0; //NaN
325+
}
326+
if ( r < 2.0 || v < 2.0 ) {
327+
return 0.0 / 0.0;
328+
}
329+
else if ( !stdlib_base_is_positive_integer( nranges ) ) {
330+
return 0.0 / 0.0;
331+
}
332+
if ( v == 1 ) {
333+
if ( r < 10 ) {
335334
ll = 1.0 + ( 1.0 / ( (2.0 * r) + 3.0 ) );
336335
} else if ( r <= 100 ) {
337336
ll = 1.0844 + ( (1.119 - 1.0844) / 90.0 * (r - 10.0) );
338337
} else {
339338
ll = 1.119 + ( 1.0 / r );
340339
}
341-
}
342-
else if ( v == 2 ) {
340+
}
341+
else if ( v == 2 ) {
343342
ll = 0.968;
344343
}
345344
else if ( v <= 100 ) {
@@ -361,9 +360,9 @@ double stdlib_base_dists_studentized_range_cdf( const double q, const double r,
361360
if ( q == STDLIB_CONSTANT_FLOAT64_PINF ) {
362361
return 1.0;
363362
}
364-
if (
365-
v > 25000 ||
366-
gausslegdquad( q, 0, r, nranges, -1.0, 1.0, 20, v, ll ) == 0
363+
if (
364+
v > 25000 ||
365+
gausslegdquad( q, 0, r, nranges, -1.0, 1.0, 20, v, ll ) == 0
367366
) {
368367
return stdlib_base_pow( prangeVInf( q, r ), nranges );
369368
}

0 commit comments

Comments
 (0)