Skip to content

Commit b633157

Browse files
authored
docs: remove comments, set isNegative to uint8_t in math/base/special/gammaln
PR-URL: #2732 Reviewed-by: Philipp Burckhardt <[email protected]>
1 parent 759e667 commit b633157

File tree

2 files changed

+5
-8
lines changed
  • lib/node_modules/@stdlib/math/base/special/gammaln

2 files changed

+5
-8
lines changed

lib/node_modules/@stdlib/math/base/special/gammaln/include/stdlib/math/base/special/gammaln.h

-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
* limitations under the License.
1717
*/
1818

19-
/**
20-
* Header file containing function declarations.
21-
*/
2219
#ifndef STDLIB_MATH_BASE_SPECIAL_GAMMALN_H
2320
#define STDLIB_MATH_BASE_SPECIAL_GAMMALN_H
2421

lib/node_modules/@stdlib/math/base/special/gammaln/src/main.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ static double polyval_w( const double x ) {
403403
* // returns 0.0
404404
*/
405405
double stdlib_base_gammaln( const double x ) {
406-
bool isNegative;
406+
uint8_t isNegative;
407407
int32_t flg;
408408
double nadj;
409409
double xc;
@@ -429,10 +429,10 @@ double stdlib_base_gammaln( const double x ) {
429429
}
430430
xc = x;
431431
if ( xc < 0.0 ) {
432-
isNegative = true;
432+
isNegative = 1;
433433
xc = -xc;
434434
} else {
435-
isNegative = false;
435+
isNegative = 0;
436436
}
437437

438438
// If |x| < 2**-56, return -ln(|x|)
@@ -483,7 +483,7 @@ double stdlib_base_gammaln( const double x ) {
483483
flg = 2;
484484
}
485485
}
486-
switch ( flg ) { // eslint-disable-line default-case
486+
switch ( flg ) {
487487
case 0:
488488
z = y * y;
489489
p1 = A1C + ( z * polyval_a1( z ) );
@@ -513,7 +513,7 @@ double stdlib_base_gammaln( const double x ) {
513513
q = RC + ( y * polyval_r( y ) );
514514
r = ( 0.5 * y ) + ( p / q );
515515
z = 1.0; // gammaln(1+s) = ln(s) + gammaln(s)
516-
switch ( flg ) { // eslint-disable-line default-case
516+
switch ( flg ) {
517517
case 7:
518518
z *= y + 6.0;
519519

0 commit comments

Comments
 (0)