Skip to content

Conversation

hrshya
Copy link
Contributor

@hrshya hrshya commented Mar 31, 2025

Resolves none .

Description

What is the purpose of this pull request?

This pull request:

  • replaces manual for loop in examples for math/base/special/log2, math/base/special/log10, math/base/special/logf, math/base/special/logit, math/base/special/maxabs and math/base/special/maxabsf packages.

Related Issues

Does this pull request have any related issues?

This pull request:

  • resolves no related issues.

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.


@stdlib-js/reviewers

@stdlib-bot stdlib-bot added Math Issue or pull request specific to math functionality. Needs Review A pull request which needs code review. labels Mar 31, 2025
@stdlib-bot
Copy link
Contributor

Coverage Report

Package Statements Branches Functions Lines
math/base/special/log10 $\color{green}307/307$
$\color{green}+100.00\%$
$\color{green}16/16$
$\color{green}+100.00\%$
$\color{green}2/2$
$\color{green}+100.00\%$
$\color{green}307/307$
$\color{green}+100.00\%$
math/base/special/log2 $\color{green}290/290$
$\color{green}+100.00\%$
$\color{green}16/16$
$\color{green}+100.00\%$
$\color{green}2/2$
$\color{green}+100.00\%$
$\color{green}290/290$
$\color{green}+100.00\%$
math/base/special/logf $\color{green}172/172$
$\color{green}+100.00\%$
$\color{green}5/5$
$\color{green}+100.00\%$
$\color{green}2/2$
$\color{green}+100.00\%$
$\color{green}172/172$
$\color{green}+100.00\%$
math/base/special/logit $\color{green}191/191$
$\color{green}+100.00\%$
$\color{green}13/13$
$\color{green}+100.00\%$
$\color{green}2/2$
$\color{green}+100.00\%$
$\color{green}191/191$
$\color{green}+100.00\%$
math/base/special/maxabs $\color{green}160/160$
$\color{green}+100.00\%$
$\color{green}5/5$
$\color{green}+100.00\%$
$\color{green}2/2$
$\color{green}+100.00\%$
$\color{green}160/160$
$\color{green}+100.00\%$
math/base/special/maxabsf $\color{green}161/161$
$\color{green}+100.00\%$
$\color{green}5/5$
$\color{green}+100.00\%$
$\color{green}2/2$
$\color{green}+100.00\%$
$\color{green}161/161$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this PR.

@kgryte kgryte added Documentation Improvements, additions, or changes to documentation. and removed Needs Review A pull request which needs code review. labels Apr 1, 2025
Copy link
Member

@kgryte kgryte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kgryte kgryte merged commit bb378ff into stdlib-js:develop Apr 1, 2025
66 checks passed
for ( i = 0; i < 100; i++ ) {
console.log( 'logf( %d, %d ) = %d', x[ i ], b[ i ], logf( x[ i ], b[ i ] ) );
}
logEachMap( 'logf( %0.4f, %0.4f ) = %0.4f', x, b, logf );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stdlib-bot This should become

logEachMap( 'logf( %d, %d ) = %0.4f', x, b, logf );

since we don't want to display decimal points for integers.

for ( i = 0; i < 100; i++ ) {
console.log( 'logf( %d, %d ) = %d', x[ i ], b[ i ], logf( x[ i ], b[ i ] ) );
}
logEachMap( 'logf( %0.4f, %0.4f ) = %0.4f', x, b, logf );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stdlib-bot This should become

logEachMap( 'logf( %d, %d ) = %0.4f', x, b, logf );

since we don't want to display decimal points for integers.

x = round( randu() * 100.0 );
console.log( 'log10(%d) = %d', x, log10( x ) );
}
logEachMap( 'log10(%0.4f) = %0.4f', x, log10 );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stdlib-bot This should become

logEachMap( 'log10(%d) = %0.4f', x, log10 );

since we don't want to display decimal points for integers.

x = round( randu() * 100.0 );
console.log( 'log10(%d) = %d', x, log10( x ) );
}
logEachMap( 'log10(%0.4f) = %0.4f', x, log10 );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stdlib-bot This should become

logEachMap( 'log10(%d) = %0.4f', x, log10 );

since we don't want to display decimal points for integers.

x = round( randu() * 100.0 );
console.log( 'log2(%d) = %d', x, log2( x ) );
}
logEachMap( 'log2(%0.4f) = %0.4f', x, log2 );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stdlib-bot This should become

logEachMap( 'log2(%d) = %0.4f', x, log2 );

since we don't want to display decimal points for integers.

x = round( randu() * 100.0 );
console.log( 'log2(%d) = %d', x, log2( x ) );
}
logEachMap( 'log2(%0.4f) = %0.4f', x, log2 );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stdlib-bot This should become

logEachMap( 'log2(%d) = %0.4f', x, log2 );

since we don't want to display decimal points for integers.

@hrshya hrshya deleted the docs/log2 branch April 10, 2025 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Improvements, additions, or changes to documentation. Math Issue or pull request specific to math functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants