Skip to content

Commit e71bc27

Browse files
authored
chore: fix indentation
Signed-off-by: Philipp Burckhardt <[email protected]>
1 parent f46baf5 commit e71bc27

File tree

1 file changed

+16
-16
lines changed
  • lib/node_modules/@stdlib/stats/base/dists/chi/logpdf/src

1 file changed

+16
-16
lines changed

lib/node_modules/@stdlib/stats/base/dists/chi/logpdf/src/main.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,20 @@
3636
* // returns ~-1.309
3737
*/
3838
double stdlib_base_dists_chi_logpdf( const double x, const double k ) {
39-
double out;
40-
double kh;
41-
if ( stdlib_base_is_nan( x ) || stdlib_base_is_nan( k ) || k < 0.0 ) {
42-
return 0.0 / 0.0; // NaN
43-
}
44-
if ( k == 0.0 ) {
45-
// Point mass at 0...
46-
return ( x == 0.0 ) ? STDLIB_CONSTANT_FLOAT64_PINF : STDLIB_CONSTANT_FLOAT64_NINF;
47-
}
48-
if ( x < 0.0 || x == STDLIB_CONSTANT_FLOAT64_PINF ) {
49-
return STDLIB_CONSTANT_FLOAT64_NINF;
50-
}
51-
kh = k / 2.0;
52-
out = ( ( 1.0 - kh ) * STDLIB_CONSTANT_FLOAT64_LN2 ) + ( ( k - 1.0 ) * stdlib_base_ln( x ) ) - ( ( x * x ) / 2.0 );
53-
out -= stdlib_base_gammaln( kh );
54-
return out;
39+
double out;
40+
double kh;
41+
if ( stdlib_base_is_nan( x ) || stdlib_base_is_nan( k ) || k < 0.0 ) {
42+
return 0.0 / 0.0; // NaN
43+
}
44+
if ( k == 0.0 ) {
45+
// Point mass at 0...
46+
return ( x == 0.0 ) ? STDLIB_CONSTANT_FLOAT64_PINF : STDLIB_CONSTANT_FLOAT64_NINF;
47+
}
48+
if ( x < 0.0 || x == STDLIB_CONSTANT_FLOAT64_PINF ) {
49+
return STDLIB_CONSTANT_FLOAT64_NINF;
50+
}
51+
kh = k / 2.0;
52+
out = ( ( 1.0 - kh ) * STDLIB_CONSTANT_FLOAT64_LN2 ) + ( ( k - 1.0 ) * stdlib_base_ln( x ) ) - ( ( x * x ) / 2.0 );
53+
out -= stdlib_base_gammaln( kh );
54+
return out;
5555
}

0 commit comments

Comments
 (0)