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 Jan 17, 2025
1 parent 1982868 commit 434116c
Show file tree
Hide file tree
Showing 17 changed files with 131 additions and 114 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.

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
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
<section class="release" id="unreleased">

## Unreleased (2024-12-01)
## Unreleased (2025-01-17)

<section class="commits">

### Commits

<details>

- [`0900838`](https://github.com/stdlib-js/stdlib/commit/090083855a65254591477cb58966d7b232f3c365) - **refactor:** update `math/base/special/hypot` to follow latest project conventions [(#4765)](https://github.com/stdlib-js/stdlib/pull/4765) _(by Vivek Maurya, Athan Reines)_
- [`9e689ff`](https://github.com/stdlib-js/stdlib/commit/9e689ffcb7c6223afc521f1e574b42f10921cf5e) - **chore:** fix indentation in manifest.json files _(by Philipp Burckhardt)_

</details>
Expand All @@ -24,9 +25,11 @@

### Contributors

A total of 1 person contributed to this release. Thank you to this contributor:
A total of 3 people contributed to this release. Thank you to the following contributors:

- Athan Reines
- Philipp Burckhardt
- Vivek Maurya

</section>

Expand Down
41 changes: 25 additions & 16 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
#
# Contributors listed in alphabetical order.

Aadish Jain <[email protected]>
Aayush Khanna <[email protected]>
Abhijit Raut <[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,6 +26,9 @@ Dan Rose <[email protected]>
Daniel Killenberger <[email protected]>
Daniel Yu <[email protected]>
Debashis Maharana <[email protected]>
Desh Deepak Kant <[email protected]>
Dhruv Arvind Singh <[email protected]>
Divyansh Seth <[email protected]>
Dominic Lim <[email protected]>
Dominik Moritz <[email protected]>
Dorrin Sotoudeh <[email protected]>
Expand All @@ -44,13 +50,14 @@ 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]>
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]>
Expand All @@ -59,37 +66,41 @@ 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]>
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]>
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 +109,7 @@ Snehil Shah <[email protected]>
Soumajit Chatterjee <[email protected]>
Spandan Barve <[email protected]>
Stephannie Jiménez Gacha <[email protected]>
Suraj kumar <[email protected]>
Suraj Kumar <[email protected]>
Tirtadwipa Manunggal <[email protected]>
Tudor Pagu <[email protected]>
Tufailahmed Bargir <[email protected]>
Expand All @@ -108,12 +119,10 @@ 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]>
olenkabilonizhka <[email protected]>
orimiles5 <[email protected]>
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.
20 changes: 8 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,20 +152,16 @@ h = hypot( 5.0, NaN );
<!-- eslint no-undef: "error" -->

```javascript
var randu = require( '@stdlib/random-base-randu' );
var round = require( '@stdlib/math-base-special-round' );
var discreteUniform = require( '@stdlib/random-array-discrete-uniform' );
var hypot = require( '@stdlib/math-base-special-hypot' );
var x;
var y;
var h;
var i;
var len = 100;
var x = discreteUniform( len, -50, 50 );
var y = discreteUniform( len, -50, 50 );
for ( i = 0; i < 100; i++ ) {
x = round( randu()*100.0 ) - 50.0;
y = round( randu()*100.0 ) - 50.0;
h = hypot( x, y );
console.log( 'h(%d,%d) = %d', x, y, h );
var i;
for ( i = 0; i < len; i++ ) {
console.log( 'h(%d,%d) = %d', x[ i ], y[ i ], hypot( x[ i ], y[ i ] ) );
}
```

Expand Down Expand Up @@ -301,7 +297,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
20 changes: 13 additions & 7 deletions benchmark/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
// MODULES //

var bench = require( '@stdlib/bench-harness' );
var randu = require( '@stdlib/random-base-randu' );
var isnan = require( '@stdlib/math-base-assert-is-nan' );
var uniform = require( '@stdlib/random-array-uniform' );
var pkg = require( './../package.json' ).name;
var hypot = require( './../lib' );

Expand All @@ -37,16 +37,19 @@ var opts = {
// MAIN //

bench( pkg, function benchmark( b ) {
var len;
var x;
var y;
var z;
var i;

len = 100;
x = uniform( len, -50, 50 );
y = uniform( len, -50, 50 );

b.tic();
for ( i = 0; i < b.iterations; i++ ) {
x = ( randu()*100.0 ) - 50.0;
y = ( randu()*100.0 ) - 50.0;
z = hypot( x, y );
z = hypot( x[ i % len ], y[ i % len ] );
if ( isnan( z ) ) {
b.fail( 'should not return NaN' );
}
Expand All @@ -60,16 +63,19 @@ bench( pkg, function benchmark( b ) {
});

bench( pkg+'::built-in', opts, function benchmark( b ) {
var len;
var x;
var y;
var z;
var i;

len = 100;
x = uniform( len, -50, 50 );
y = uniform( len, -50, 50 );

b.tic();
for ( i = 0; i < b.iterations; i++ ) {
x = ( randu()*100.0 ) - 50.0;
y = ( randu()*100.0 ) - 50.0;
z = Math.hypot( x, y ); // eslint-disable-line stdlib/no-builtin-math
z = Math.hypot( x[ i % len ], y[ i % len ] ); // eslint-disable-line stdlib/no-builtin-math
if ( isnan( z ) ) {
b.fail( 'should not return NaN' );
}
Expand Down
11 changes: 7 additions & 4 deletions benchmark/benchmark.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

var resolve = require( 'path' ).resolve;
var bench = require( '@stdlib/bench-harness' );
var randu = require( '@stdlib/random-base-randu' );
var isnan = require( '@stdlib/math-base-assert-is-nan' );
var uniform = require( '@stdlib/random-array-uniform' );
var tryRequire = require( '@stdlib/utils-try-require' );
var pkg = require( './../package.json' ).name;

Expand All @@ -39,16 +39,19 @@ var opts = {
// MAIN //

bench( pkg+'::native', opts, function benchmark( b ) {
var len;
var x;
var y;
var z;
var i;

len = 100;
x = uniform( len, -50, 50 );
y = uniform( len, -50, 50 );

b.tic();
for ( i = 0; i < b.iterations; i++ ) {
x = ( randu()*100.0 ) - 50.0;
y = ( randu()*100.0 ) - 50.0;
z = hypot( x, y );
z = hypot( x[ i % len ], y[ i % len ] );
if ( isnan( z ) ) {
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 @@ -91,17 +91,20 @@ static double rand_double( void ) {
*/
static double benchmark( void ) {
double elapsed;
double x;
double y;
double x[ 100 ];
double y[ 100 ];
double z;
double t;
int i;

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

t = tic();
for ( i = 0; i < ITERATIONS; i++ ) {
x = ( 100.0*rand_double() ) - 50.0;
y = ( 100.0*rand_double() ) - 50.0;
z = stdlib_base_hypot( x, y );
z = stdlib_base_hypot( x[ i % 100 ], y[ i % 100 ] );
if ( z != z ) {
printf( "should not return NaN\n" );
break;
Expand Down
18 changes: 7 additions & 11 deletions examples/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,14 @@

'use strict';

var randu = require( '@stdlib/random-base-randu' );
var round = require( '@stdlib/math-base-special-round' );
var discreteUniform = require( '@stdlib/random-array-discrete-uniform' );
var hypot = require( './../lib' );

var x;
var y;
var h;
var i;
var len = 100;
var x = discreteUniform( len, -50, 50 );
var y = discreteUniform( len, -50, 50 );

for ( i = 0; i < 100; i++ ) {
x = round( randu()*100.0 ) - 50.0;
y = round( randu()*100.0 ) - 50.0;
h = hypot( x, y );
console.log( 'h(%d,%d) = %d', x, y, h );
var i;
for ( i = 0; i < len; i++ ) {
console.log( 'h(%d,%d) = %d', x[ i ], y[ i ], hypot( x[ i ], y[ i ] ) );
}
Loading

0 comments on commit 434116c

Please sign in to comment.