File tree 2 files changed +5
-8
lines changed
lib/node_modules/@stdlib/math/base/special/gammaln
include/stdlib/math/base/special
2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change 16
16
* limitations under the License.
17
17
*/
18
18
19
- /**
20
- * Header file containing function declarations.
21
- */
22
19
#ifndef STDLIB_MATH_BASE_SPECIAL_GAMMALN_H
23
20
#define STDLIB_MATH_BASE_SPECIAL_GAMMALN_H
24
21
Original file line number Diff line number Diff line change @@ -403,7 +403,7 @@ static double polyval_w( const double x ) {
403
403
* // returns 0.0
404
404
*/
405
405
double stdlib_base_gammaln ( const double x ) {
406
- bool isNegative ;
406
+ uint8_t isNegative ;
407
407
int32_t flg ;
408
408
double nadj ;
409
409
double xc ;
@@ -429,10 +429,10 @@ double stdlib_base_gammaln( const double x ) {
429
429
}
430
430
xc = x ;
431
431
if ( xc < 0.0 ) {
432
- isNegative = true ;
432
+ isNegative = 1 ;
433
433
xc = - xc ;
434
434
} else {
435
- isNegative = false ;
435
+ isNegative = 0 ;
436
436
}
437
437
438
438
// If |x| < 2**-56, return -ln(|x|)
@@ -483,7 +483,7 @@ double stdlib_base_gammaln( const double x ) {
483
483
flg = 2 ;
484
484
}
485
485
}
486
- switch ( flg ) { // eslint-disable-line default-case
486
+ switch ( flg ) {
487
487
case 0 :
488
488
z = y * y ;
489
489
p1 = A1C + ( z * polyval_a1 ( z ) );
@@ -513,7 +513,7 @@ double stdlib_base_gammaln( const double x ) {
513
513
q = RC + ( y * polyval_r ( y ) );
514
514
r = ( 0.5 * y ) + ( p / q );
515
515
z = 1.0 ; // gammaln(1+s) = ln(s) + gammaln(s)
516
- switch ( flg ) { // eslint-disable-line default-case
516
+ switch ( flg ) {
517
517
case 7 :
518
518
z *= y + 6.0 ;
519
519
You can’t perform that action at this time.
0 commit comments