Skip to content

docs: remove comments, set isNegative to uint8_t in math/base/special/gammaln #2732

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
* limitations under the License.
*/

/**
* Header file containing function declarations.
*/
#ifndef STDLIB_MATH_BASE_SPECIAL_GAMMALN_H
#define STDLIB_MATH_BASE_SPECIAL_GAMMALN_H

Expand Down
10 changes: 5 additions & 5 deletions lib/node_modules/@stdlib/math/base/special/gammaln/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ static double polyval_w( const double x ) {
* // returns 0.0
*/
double stdlib_base_gammaln( const double x ) {
bool isNegative;
uint8_t isNegative;
int32_t flg;
double nadj;
double xc;
Expand All @@ -429,10 +429,10 @@ double stdlib_base_gammaln( const double x ) {
}
xc = x;
if ( xc < 0.0 ) {
isNegative = true;
isNegative = 1;
xc = -xc;
} else {
isNegative = false;
isNegative = 0;
}

// If |x| < 2**-56, return -ln(|x|)
Expand Down Expand Up @@ -483,7 +483,7 @@ double stdlib_base_gammaln( const double x ) {
flg = 2;
}
}
switch ( flg ) { // eslint-disable-line default-case
switch ( flg ) {
case 0:
z = y * y;
p1 = A1C + ( z * polyval_a1( z ) );
Expand Down Expand Up @@ -513,7 +513,7 @@ double stdlib_base_gammaln( const double x ) {
q = RC + ( y * polyval_r( y ) );
r = ( 0.5 * y ) + ( p / q );
z = 1.0; // gammaln(1+s) = ln(s) + gammaln(s)
switch ( flg ) { // eslint-disable-line default-case
switch ( flg ) {
case 7:
z *= y + 6.0;

Expand Down
Loading