-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
feat: add C implementation for math/base/special/minmax
#1939
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Planeshifter
added
Needs Review
A pull request which needs code review.
Native Addons
Issue involves or relates to Node.js native add-ons.
C
Issue involves or relates to C.
labels
Mar 18, 2024
kgryte
changed the title
feat: add C implementation for math/base/special/minmax
feat: add C implementation for Mar 18, 2024
math/base/special/minmax
Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
Planeshifter
requested changes
Mar 24, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR! Left some comments that will need to be addressed.
lib/node_modules/@stdlib/math/base/special/minmax/test/test.native..js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/math/base/special/minmax/include/stdlib/math/base/special/minmax.h
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/math/base/special/minmax/benchmark/c/native/benchmark.c
Outdated
Show resolved
Hide resolved
Planeshifter
added
Needs Changes
Pull request which needs changes before being merged.
and removed
Needs Review
A pull request which needs code review.
labels
Mar 24, 2024
Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
kgryte
reviewed
Apr 1, 2024
Comment on lines
+39
to
+61
if ( stdlib_base_is_nan( x ) || stdlib_base_is_nan( y ) ) { | ||
*min = 0.0 / 0.0; // NaN | ||
*max = 0.0 / 0.0; // NaN | ||
return; | ||
} | ||
if( x == y && x == 0.0 ) { | ||
if ( stdlib_base_is_negative_zero ( x ) ) { | ||
*min = x; | ||
*max = y; | ||
return; | ||
} | ||
*min = y; | ||
*max = x; | ||
return; | ||
} | ||
if ( x < y ) { | ||
*min = x; | ||
*max = y; | ||
return; | ||
} | ||
*min = y; | ||
*max = x; | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have mixed tab and space indentation. It should be TAB indentation.
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C
Issue involves or relates to C.
Math
Issue or pull request specific to math functionality.
Native Addons
Issue involves or relates to Node.js native add-ons.
Needs Changes
Pull request which needs changes before being merged.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #2106 .
Description
This pull request:
Related Issues
This pull request:
Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers