Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Feb 25, 2025
1 parent 8c5c2af commit 4afeda2
Show file tree
Hide file tree
Showing 16 changed files with 122 additions and 56 deletions.
3 changes: 1 addition & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ indent_style = tab
[*.{f,f.txt}]
indent_style = space
indent_size = 2
insert_final_newline = false

# Set properties for shell files:
[*.{sh,sh.txt}]
Expand Down Expand Up @@ -121,7 +120,7 @@ indent_style = tab
[*.{md,md.txt}]
indent_style = space
indent_size = 4
trim_trailing_whitespace = false
trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim.
# Set properties for `usage.txt` files:
[usage.txt]
Expand Down
1 change: 0 additions & 1 deletion .github/.keepalive

This file was deleted.

2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/xlogy) of the main repository where we’ll review and provide feedback.

If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib.
If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib.

We look forward to receiving your contribution! :smiley:
4 changes: 2 additions & 2 deletions .github/workflows/test_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ jobs:
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

# Run workflow job if `publish` workflow run is successful or when the workflow is manually run:
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
# Run workflow job if `publish` workflow run is successful or when the workflow is manually triggered or on a schedule:
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }}

# Define the sequence of job steps...
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_published_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ jobs:
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

# Run workflow job if `publish` workflow run is successful or when the workflow is manually run:
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
# Run workflow job if `publish` workflow run is successful or when the workflow is manually triggered or on a schedule:
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }}

# Define the job's steps:
steps:
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,7 @@ jsconfig.json
# Other editor files #
######################
.idea/

# Cursor #
##########
.cursorignore
39 changes: 37 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,41 @@

> Package changelog.
<section class="release" id="unreleased">

## Unreleased (2025-02-25)

<section class="commits">

### Commits

<details>

- [`1de4fb4`](https://github.com/stdlib-js/stdlib/commit/1de4fb47e423e6ed0b9777cbb1194245ba1fe349) - **bench:** update random value generation [(#5404)](https://github.com/stdlib-js/stdlib/pull/5404) _(by Karan Anand, Athan Reines)_

</details>

</section>

<!-- /.commits -->

<section class="contributors">

### Contributors

A total of 2 people contributed to this release. Thank you to the following contributors:

- Athan Reines
- Karan Anand

</section>

<!-- /.contributors -->

</section>

<!-- /.release -->

<section class="release" id="v0.3.0">

## 0.3.0 (2024-07-28)
Expand All @@ -26,7 +61,7 @@
- [`2777e4b`](https://github.com/stdlib-js/stdlib/commit/2777e4be161869d09406e3b17947d24c64b47af2) - **bench:** resolve lint errors in benchmarks _(by Athan Reines)_
- [`9ed7d0e`](https://github.com/stdlib-js/stdlib/commit/9ed7d0e7d57edb5ad0dfb65c944bed87d475cbf3) - **chore:** add missing trailing newlines _(by Philipp Burckhardt)_
- [`dc20da0`](https://github.com/stdlib-js/stdlib/commit/dc20da0604fe2798e20e757277072fefc876da3c) - **chore:** update package meta data [(#1856)](https://github.com/stdlib-js/stdlib/pull/1856) _(by stdlib-bot, Philipp Burckhardt)_
- [`665c735`](https://github.com/stdlib-js/stdlib/commit/665c7357a0439decbaecb80519ce017d87a15f04) - **feat:** add C implementation for `math/base/special/xlogy` _(by Rutam, Pranav)_
- [`665c735`](https://github.com/stdlib-js/stdlib/commit/665c7357a0439decbaecb80519ce017d87a15f04) - **feat:** add C implementation for `math/base/special/xlogy` _(by Rutam Kathale, Pranav)_

</details>

Expand All @@ -43,7 +78,7 @@ A total of 4 people contributed to this release. Thank you to the following cont
- Athan Reines
- Philipp Burckhardt
- Pranav Goswami
- Rutam
- Rutam Kathale

</section>

Expand Down
57 changes: 40 additions & 17 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
#
# Contributors listed in alphabetical order.

Aadish Jain <[email protected]>
Aayush Khanna <[email protected]>
Abhijit Raut <[email protected]>
Abhishek Jain <[email protected]>
Adarsh Palaskar <[email protected]>
Aditya Sapra <[email protected]>
AgPriyanshu18 <[email protected]>
Ahmed Atwa <[email protected]>
Ahmed Kashkoush <[email protected]>
Ahmed Khaled <[email protected]>
Aleksandr <[email protected]>
Ali Salesi <[email protected]>
Aman Bhansali <[email protected]>
Expand All @@ -23,14 +27,21 @@ Dan Rose <[email protected]>
Daniel Killenberger <[email protected]>
Daniel Yu <[email protected]>
Debashis Maharana <[email protected]>
Desh Deepak Kant <[email protected]>
Dev Goel <[email protected]>
Dhruv Arvind Singh <[email protected]>
Divyansh Seth <[email protected]>
Dominic Lim <[email protected]>
Dominik Moritz <[email protected]>
Dorrin Sotoudeh <[email protected]>
EuniceSim142 <[email protected]>
Frank Kovacs <[email protected]>
GK Bishnoi <[email protected]>
Gaurav <[email protected]>
Golden Kumar <[email protected]>
Gunj Joshi <[email protected]>
Gururaj Gurram <[email protected]>
Gururaj Gurram <[email protected]>
Harsh <[email protected]>
HarshaNP <[email protected]>
Harshita Kalani <[email protected]>
Hridyanshu <[email protected]>
Expand All @@ -44,52 +55,61 @@ Joey Reed <[email protected]>
Jordan Gallivan <[email protected]>
Joris Labie <[email protected]>
Justin Dennison <[email protected]>
Karan Anand <[email protected]>
Karthik Prakash <[email protected]>
Khaldon <[email protected]>
Kohantika Nath <[email protected]>
Krishnam Agarwal <[email protected]>
Krishnendu Das <[email protected]>
Kshitij-Dale <[email protected]>
Lovelin <[email protected]>
Lovelin Dhoni J B <[email protected]>
Manik Sharma <[email protected]>
Manvith M <[email protected]>
Marcus Fantham <[email protected]>
Matt Cochrane <[email protected]>
Mihir Pandit <[email protected]>
Milan Raj <[email protected]>
Mohammad Bin Aftab <[email protected]>
Mohammad Kaif <[email protected]>
Momtchil Momtchev <[email protected]>
Muhammad Haris <[email protected]>
Naresh Jagadeesan <[email protected]>
Naveen Kumar <[email protected]>
Neeraj Pathak <[email protected]>
NightKnight <Ahmedatwa866@yahoo.com>
Nishant Shinde <[email protected].com>
Nithin Katta <[email protected]>
Nourhan Hasan <[email protected]>
Ognjen Jevremović <[email protected]>
Oneday12323 <[email protected]>
Ori Miles <[email protected]>
Philipp Burckhardt <[email protected]>
Prajwal Kulkarni <[email protected]>
Pranav Goswami <[email protected]>
Praneki <[email protected]>
Pratik <[email protected]>
Pranjal Jha <[email protected]>
Prashant Kumar Yadav <[email protected]>
Pratik Singh <[email protected]>
Pratyush Kumar Chouhan <[email protected]>
Priyansh <[email protected]>
Priyansh Prajapati <[email protected]>
Priyanshu Agarwal <[email protected]>
Pushpendra Chandravanshi <[email protected]>
RISHAV <[email protected]>
Raunak Kumar Gupta <[email protected]>
Rejoan Sardar <[email protected]>
Ricky Reusser <[email protected]>
Ridam Garg <[email protected]>
Rishav <[email protected]>
Rishav Tarway <[email protected]>
Robert Gislason <[email protected]>
Roman Stetsyk <[email protected]>
Rutam <[email protected]>
Rutam Kathale <[email protected]>
Ruthwik Chikoti <[email protected]>
Ryan Seal <[email protected]>
Rylan Yang <[email protected]>
Sai Srikar Dumpeti <[email protected]>
SarthakPaandey <[email protected]>
Sarthak Paandey <[email protected]>
Saurabh Singh <[email protected]>
Seyyed Parsa Neshaei <[email protected]>
Shabareesh Shetty <[email protected]>
Shashank Shekhar Singh <[email protected]>
Shivam <[email protected]>
Shivam Ahir <[email protected]>
Shraddheya Shendre <[email protected]>
Shubh Mehta <[email protected]>
Shubham Mishra <[email protected]>
Expand All @@ -98,7 +118,8 @@ Snehil Shah <[email protected]>
Soumajit Chatterjee <[email protected]>
Spandan Barve <[email protected]>
Stephannie Jiménez Gacha <[email protected]>
Suraj kumar <[email protected]>
Suhaib Ilahi <[email protected]>
Suraj Kumar <[email protected]>
Tirtadwipa Manunggal <[email protected]>
Tudor Pagu <[email protected]>
Tufailahmed Bargir <[email protected]>
Expand All @@ -108,12 +129,14 @@ UtkershBasnet <[email protected]>
Vaibhav Patel <[email protected]>
Varad Gupta <[email protected]>
Vinit Pandit <[email protected]>
Vivek Maurya <[email protected]>
Xiaochuan Ye <[email protected]>
Yaswanth Kosuru <[email protected]>
Yernar Yergaziyev <[email protected]>
naveen <[email protected]>
nishant-s7 <[email protected]>
Yuvi Mittal <[email protected]>
ekambains <[email protected]>
fadiothman22 <[email protected]>
olenkabilonizhka <[email protected]>
orimiles5 <97595296+orimiles5@users.noreply.github.com>
pranav-1720 <123018993+pranav-1720@users.noreply.github.com>
rainn <[email protected]>
rei2hu <[email protected]>
yaswanth <[email protected]>
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Copyright (c) 2016-2024 The Stdlib Authors.
Copyright (c) 2016-2025 The Stdlib Authors.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ See [LICENSE][stdlib-license].

## Copyright

Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
Copyright &copy; 2016-2025. The Stdlib [Authors][stdlib-authors].

</section>

Expand Down
9 changes: 5 additions & 4 deletions benchmark/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// MODULES //

var bench = require( '@stdlib/bench-harness' );
var randu = require( '@stdlib/random-base-randu' );
var uniform = require( '@stdlib/random-array-uniform' );
var isnan = require( '@stdlib/math-base-assert-is-nan' );
var pkg = require( './../package.json' ).name;
var xlogy = require( './../lib' );
Expand All @@ -35,11 +35,12 @@ bench( pkg, function benchmark( b ) {
var y;
var i;

x = uniform( 100, 0.0, 10.0 );
y = uniform( 100, 0.0, 10.0 );

b.tic();
for ( i = 0; i < b.iterations; i++ ) {
x = randu() * 10.0;
y = randu() * 10.0;
out = xlogy( x, y );
out = xlogy( x[ i % x.length ], y[ i % y.length ] );
if ( isnan( out ) ) {
b.fail( 'should not return NaN' );
}
Expand Down
9 changes: 5 additions & 4 deletions benchmark/benchmark.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

var resolve = require( 'path' ).resolve;
var bench = require( '@stdlib/bench-harness' );
var randu = require( '@stdlib/random-base-randu' );
var uniform = require( '@stdlib/random-array-uniform' );
var isnan = require( '@stdlib/math-base-assert-is-nan' );
var tryRequire = require( '@stdlib/utils-try-require' );
var pkg = require( './../package.json' ).name;
Expand All @@ -44,11 +44,12 @@ bench( pkg+'::native', opts, function benchmark( b ) {
var y;
var i;

x = uniform( 100, 0.0, 100.0 );
y = uniform( 100, 0.0, 5.0 );

b.tic();
for ( i = 0; i < b.iterations; i++ ) {
x = ( randu()*100.0 );
y = ( randu()*5.0 );
out = xlogy( x, y );
out = xlogy( x[ i % x.length ], y[ i % y.length ] );
if ( isnan( out ) ) {
b.fail( 'should not return NaN' );
}
Expand Down
13 changes: 8 additions & 5 deletions benchmark/c/native/benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,21 @@ static double rand_double( void ) {
* @return elapsed time in seconds
*/
static double benchmark( void ) {
double x[ 100 ];
double y[ 100 ];
double elapsed;
double out;
double x;
double y;
double t;
int i;

for ( i = 0; i < 100; i++ ) {
x[ i ] = 100.0 * rand_double();
y[ i ] = 5.0 * rand_double();
}

t = tic();
for ( i = 0; i < ITERATIONS; i++ ) {
x = ( 100.0*rand_double() );
y = ( 5.0*rand_double() );
out = stdlib_base_xlogy( x, y );
out = stdlib_base_xlogy( x[ i%100 ], y[ i%100 ] );
if ( out != out ) {
printf( "should not return NaN\n" );
break;
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"devDependencies": {
"@stdlib/constants-float64-eps": "^0.2.2",
"@stdlib/math-base-special-abs": "^0.2.2",
"@stdlib/random-array-uniform": "^0.2.1",
"@stdlib/random-base-randu": "^0.2.1",
"@stdlib/utils-try-require": "^0.2.2",
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
Expand Down
14 changes: 7 additions & 7 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,28 +45,28 @@ tape( 'main export is a function', function test( t ) {

tape( 'the function returns `NaN` when provided `NaN` for any parameter', function test( t ) {
var out = xlogy( NaN, 2.0 );
t.strictEqual( isnan( out ), true, 'returns NaN' );
t.strictEqual( isnan( out ), true, 'returns expected value' );

out = xlogy( 0.0, NaN );
t.strictEqual( isnan( out ), true, 'returns NaN' );
t.strictEqual( isnan( out ), true, 'returns expected value' );

out = xlogy( 3.4, NaN );
t.strictEqual( isnan( out ), true, 'returns NaN' );
t.strictEqual( isnan( out ), true, 'returns expected value' );

out = xlogy( NaN, NaN );
t.strictEqual( isnan( out ), true, 'returns NaN' );
t.strictEqual( isnan( out ), true, 'returns expected value' );
t.end();
});

tape( 'the function returns `0` when `x = 0` and `y` is a number', function test( t ) {
var out = xlogy( 0.0, 2.0 );
t.strictEqual( out, 0.0, 'returns 0' );
t.strictEqual( out, 0.0, 'returns expected value' );

out = xlogy( 0.0, 0.0 );
t.strictEqual( out, 0.0, 'returns 0' );
t.strictEqual( out, 0.0, 'returns expected value' );

out = xlogy( 0.0, -3.0 );
t.strictEqual( out, 0.0, 'returns 0' );
t.strictEqual( out, 0.0, 'returns expected value' );

t.end();
});
Expand Down
Loading

0 comments on commit 4afeda2

Please sign in to comment.