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 Dec 23, 2024
1 parent d27391f commit 88b8ce8
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,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
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: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<section class="release" id="unreleased">

## Unreleased (2024-12-15)
## Unreleased (2024-12-23)

<section class="features">

Expand All @@ -22,6 +22,8 @@

<details>

- [`2ea848b`](https://github.com/stdlib-js/stdlib/commit/2ea848b62b686e1e9d861f7df25ece23a7d80798) - **style:** update to use tabs for indentation _(by Philipp Burckhardt)_
- [`6a0d6b8`](https://github.com/stdlib-js/stdlib/commit/6a0d6b861f8e2079a501ca4e46a9175440eedb46) - **style:** update to use tabs for indentation _(by Philipp Burckhardt)_
- [`ff25e13`](https://github.com/stdlib-js/stdlib/commit/ff25e1324e1507cc076078e82badce7fdf7915f6) - **docs:** remove excess whitespace _(by Philipp Burckhardt)_
- [`15878f9`](https://github.com/stdlib-js/stdlib/commit/15878f9056d9e0e4bae0411870655316bf68dff3) - **feat:** add `math/base/special/maxf` [(#2816)](https://github.com/stdlib-js/stdlib/pull/2816) _(by Gunj Joshi)_

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

Aadish Jain <jain.aadishj@gmail.com>
Aayush Khanna <aayushiitbhu23@gmail.com>
Abhijit Raut <abhijitmraut8010@gmail.com>
Adarsh Palaskar <adarshpalaskar99@gmail.com>
Aditya Sapra <adityaework@gmail.com>
Ahmed Atwa <Ahmedatwa866@yahoo.com>
Ahmed Kashkoush <ahmedkashkoush464@gmail.com>
Ahmed Khaled <kahmd1444@gmail.com>
Aleksandr <112382387+alextes90@users.noreply.github.com>
Ali Salesi <ali_sal1381@yahoo.com>
Aman Bhansali <bhansali.1@iitj.ac.in>
Expand All @@ -24,6 +26,8 @@ Dan Rose <danoftheroses@gmail.com>
Daniel Killenberger <daniel.killenberger@gmail.com>
Daniel Yu <40680511+Daniel777y@users.noreply.github.com>
Debashis Maharana <debashismaharana7854@gmail.com>
Desh Deepak Kant <118960904+DeshDeepakKant@users.noreply.github.com>
Divyansh Seth <59174836+sethdivyansh@users.noreply.github.com>
Dominic Lim <46486515+domlimm@users.noreply.github.com>
Dominik Moritz <domoritz@gmail.com>
Dorrin Sotoudeh <dorrinsotoudeh123@gmail.com>
Expand All @@ -46,11 +50,10 @@ Jordan Gallivan <115050475+Jordan-Gallivan@users.noreply.github.com>
Joris Labie <joris.labie1@gmail.com>
Justin Dennison <justin1dennison@gmail.com>
Karthik Prakash <116057817+skoriop@users.noreply.github.com>
Khaldon <kahmd1444@gmail.com>
Kohantika Nath <145763549+kohantikanath@users.noreply.github.com>
Krishnendu Das <86651039+itskdhere@users.noreply.github.com>
Kshitij-Dale <152467202+Kshitij-Dale@users.noreply.github.com>
Lovelin <100030865+lovelindhoni@users.noreply.github.com>
Lovelin Dhoni J B <100030865+lovelindhoni@users.noreply.github.com>
Manik Sharma <maniksharma.rke@gmail.com>
Manvith M <148960168+manvith2003@users.noreply.github.com>
Marcus Fantham <mfantham@users.noreply.github.com>
Expand All @@ -61,6 +64,7 @@ Mohammad Kaif <mdkaifprofession@gmail.com>
Momtchil Momtchev <momtchil@momtchev.com>
Muhammad Haris <harriskhan047@outlook.com>
Naresh Jagadeesan <naresh.naresh000@gmail.com>
Naveen Kumar <stupiddint@gmail.com>
Neeraj Pathak <neerajrpathak710@gmail.com>
Nishant Shinde <97207366+nishant-s7@users.noreply.github.com>
Nithin Katta <88046362+nithinkatta@users.noreply.github.com>
Expand All @@ -71,10 +75,11 @@ Ori Miles <97595296+orimiles5@users.noreply.github.com>
Philipp Burckhardt <pburckhardt@outlook.com>
Prajwal Kulkarni <prajwalkulkarni76@gmail.com>
Pranav Goswami <goswami.4@iitj.ac.in>
Praneki <97080887+PraneGIT@users.noreply.github.com>
Pratik <97464067+Pratik772846@users.noreply.github.com>
Pranjal Jha <97080887+PraneGIT@users.noreply.github.com>
Prashant Kumar Yadav <144602492+0PrashantYadav0@users.noreply.github.com>
Pratik Singh <97464067+Pratik772846@users.noreply.github.com>
Pratyush Kumar Chouhan <pratyushkumar0308@gmail.com>
Priyansh <88396544+itsspriyansh@users.noreply.github.com>
Priyansh Prajapati <88396544+itsspriyansh@users.noreply.github.com>
Priyanshu Agarwal <113460573+AgPriyanshu18@users.noreply.github.com>
Pushpendra Chandravanshi <pushpendrachandravanshi4@gmail.com>
Raunak Kumar Gupta <raunakmodanwal321@gmail.com>
Expand All @@ -93,7 +98,7 @@ Sarthak Paandey <145528240+SarthakPaandey@users.noreply.github.com>
Saurabh Singh <saurabhsraghuvanshi@gmail.com>
Seyyed Parsa Neshaei <spneshaei@users.noreply.github.com>
Shashank Shekhar Singh <shashankshekharsingh1205@gmail.com>
Shivam <11shivam00@gmail.com>
Shivam Ahir <11shivam00@gmail.com>
Shraddheya Shendre <shendreshraddheya@gmail.com>
Shubh Mehta <93862397+Shubh942@users.noreply.github.com>
Shubham Mishra <shubh622005@gmail.com>
Expand All @@ -116,7 +121,6 @@ Vivek maurya <155618190+vivekmaurya001@users.noreply.github.com>
Xiaochuan Ye <tap91624@gmail.com>
Yaswanth Kosuru <116426380+yaswanthkosuru@users.noreply.github.com>
Yernar Yergaziyev <yernar.yergaziyev@erg.kz>
naveen <stupiddint@gmail.com>
olenkabilonizhka <62379231+olenkabilonizhka@users.noreply.github.com>
rainn <88160429+AmCodesLame@users.noreply.github.com>
rei2hu <reimu@reimu.ws>
20 changes: 10 additions & 10 deletions examples/c/example.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
#include <stdio.h>

int main( void ) {
float x;
float y;
float v;
int i;
float x;
float y;
float v;
int i;

for ( i = 0; i < 100; i++ ) {
x = ( ( (float)rand() / (float)RAND_MAX ) * 200.0f ) - 100.0f;
y = ( ( (float)rand() / (float)RAND_MAX ) * 200.0f ) - 100.0f;
v = stdlib_base_maxf( x, y );
printf( "x: %f, y: %f, maxf(x, y): %f\n", x, y, v );
}
for ( i = 0; i < 100; i++ ) {
x = ( ( (float)rand() / (float)RAND_MAX ) * 200.0f ) - 100.0f;
y = ( ( (float)rand() / (float)RAND_MAX ) * 200.0f ) - 100.0f;
v = stdlib_base_maxf( x, y );
printf( "x: %f, y: %f, maxf(x, y): %f\n", x, y, v );
}
}
32 changes: 16 additions & 16 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,20 @@
* // returns 0.0f
*/
float stdlib_base_maxf( const float x, const float y ) {
if ( stdlib_base_is_nanf( x ) || stdlib_base_is_nanf( y ) ) {
return 0.0f / 0.0f; // NaN
}
if ( x == STDLIB_CONSTANT_FLOAT32_PINF || y == STDLIB_CONSTANT_FLOAT32_PINF ) {
return STDLIB_CONSTANT_FLOAT32_PINF;
}
if ( x == y && x == 0.0f ) {
if ( stdlib_base_is_positive_zerof( x ) ) {
return x;
}
return y;
}
if ( x > y ) {
return x;
}
return y;
if ( stdlib_base_is_nanf( x ) || stdlib_base_is_nanf( y ) ) {
return 0.0f / 0.0f; // NaN
}
if ( x == STDLIB_CONSTANT_FLOAT32_PINF || y == STDLIB_CONSTANT_FLOAT32_PINF ) {
return STDLIB_CONSTANT_FLOAT32_PINF;
}
if ( x == y && x == 0.0f ) {
if ( stdlib_base_is_positive_zerof( x ) ) {
return x;
}
return y;
}
if ( x > y ) {
return x;
}
return y;
}

0 comments on commit 88b8ce8

Please sign in to comment.